CW ColdFire v6.4, target MCF5307, Linker doesn't see functions for time support.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW ColdFire v6.4, target MCF5307, Linker doesn't see functions for time support.

2,525 Views
Veter
Contributor I
I am using CW for ColdFire version 6.4. My target is MCF5307. I have enabled time support in "ansi_prefix.E68k.h". I have defined __get_clock, __get_time, __isdst, __to_gm_time in main.c file. The project does not compile and linker throws error stating that these functions are not defined. The exact errors are:
Link Error: Undefined : "__get_clock"
Referenced from "clock" in C_TRK_4i_CF_MSL.a

Link Error: UKndefined: "__get_time"
Referenced from "time" in C_TRK_4i_CF_MSL.a

Link Error: Undefined : "__isdst"
Referenced from "__msl_time2tm" in C_TRK_4i_CF_MSL.a
Referenced from "localtime" in C_TRK_4i_CF_MSL.a
Referenced from "localtime_s" in C_TRK_4i_CF_MSL.a

Link Error: Undefined : "__to_gm_time"
Referenced from "gmtime" in C_TRK_4i_CF_MSL.a

Link failed.
Could any  one tell me what I'm doing wrong and how to force linker to see these functions?
Please see attached PackAndGo.zip with project sources and ansi_prefix.E68k.txt file.
Thank you!
 
Message Edited by t.dowe on 2009-09-04 11:30 AM
Labels (1)
0 Kudos
3 Replies

374 Views
Veter
Contributor I
I'm not able to attached PackAndGo.zip, it's too big.
Attached is main function (see main.txt) where required functions are defined.
 
Thank you!
 
Message Edited by t.dowe on 2009-09-04 11:30 AM
0 Kudos

374 Views
Veter
Contributor I
MSL_C_Ref/Configuring MSL C/COnfiguring Time and Clock states that "Time and clock stub functions are in the time_xxx.c platform file, where xxx is the platform, such as Mac or Win".  This statement is not entirely correct. I am using Win XP Pro, however my clock stub functions are not in time_win.c, but in the time_api.c.
 
Including <time_api.h> solved the problem.
Help documentation for CW for ColdFire need to be less misleading.
0 Kudos

374 Views
CrasyCat
Specialist III
Hello
 
Please look at this thread for information on how to extend MSL library to support time functions.
 
CrasyCat
0 Kudos