I am unable to enable the mktime, localtime etc. functions.
This is what I have done:
1) I have opened the library project here: C:\Freescale\CW MCU v10.5\MCU\ARM_GCC_Support\ewl
2) Edited ansi-parms.h:
/* time and clock support */
#ifndef _EWL_OS_TIME_SUPPORT
#define _EWL_OS_TIME_SUPPORT 1 <---- this is the only thing I changed in the file.
#endif
#ifndef _EWL_CLOCK_T_AVAILABLE
#define _EWL_CLOCK_T_AVAILABLE 1
#endif
#ifndef _EWL_TIME_T_AVAILABLE
#define _EWL_TIME_T_AVAILABLE 1
#endif
#ifndef _EWL_TM_STRUCT_AVAILABLE
#define _EWL_TM_STRUCT_AVAILABLE 1
#endif
#ifndef _EWL_TIME_T_IS_LOCALTIME
#define _EWL_TIME_T_IS_LOCALTIME 1
#endif
3) clean all
4) rebuild all. Everything looks fine, no errors.
5) Then import my project again and clean/build.
Same error. undefined reference to 'mktime' or whatever other time function I call.
The file date/time match the build time but the size of the libraries don't change. I'm not sure how to rebuild the libraries to have the time (or other non-default) features enabled.
Does anyone have the same experience and a solution? Or just a solution? Direction?
Thanks in advance.
Ian
Thanks Earl! I appreciate your work on this. I'm setting up and testing it now. Will let you know how it works out.
Ian
Hello IAN:
As far as I know those time functions are not implemented because they would be dependent on the hardware. You would have to implement those functions by your own based on the device, using the RTC. The libraries contain that option because it is ANSI standard.
Regards!
Jorge Gonzalez