Hello
I looked at this one a little bit more in detail.
Basically you need to do the following:
1 - Create a new MSL library file, where _MSL_OS_TIME_SUPPORT, _MSL_TIME_T_AVAILABLE and
_MSL_CLOCK_T_AVAILABLE are set.
2- Replace the MSL library file used in your project by the newly created one
3- According to the file {Install}\Help\PDF\MSL_C_Reference.pdf, chapter "Configuring MSL C" section
"Configuring Time and Clock" you need to provide your own implementation of following functions:
__get_time, __to_gm_time, __to_local_time, __isdst and__get_clock. Please refer to the
above stated manual to gather info on what these functions are actually doing.
For point 1 above I would proceed as follows:
- Open the MSL library project. For MCF52235 it is
{Install}\E68K_Support\msl\MSL_C\MSL_E68k\Project\MSL_C_CF_SZ.mcp file
- Check which MSL library you are currently linking in your project (C_4i_CF_SZ_MSL.a,
C_TRK_4i_CF_SZ_MSL.a....)
- Select the corresponding Build target (4i ColdFire SZ, TRK 4i ColdFire SZ, ...)
- In the MSL library project window switch to the Target Tab
- Select "Project" -> "Create Target"
- Specify a name for the new target and tell the IDE you want to clone the target you have identified
above
- Select the target target you have just create by clicking on the red target icon in front of the build
target name. You should see a black arrow in the target.
- Open the target setting dialog (Type ALT + F7).
- Switch to the "Coldfire Target" panel and specify a new name for the new library file (for example
C_4i_CF_SZ_Time_MSL.a)
- In the "C/C++ Preprocessor" panel, add following line: "#include <ansi_prefix_Time.h>"
- Create the file ansi_prefix_Time.h by duplicating the file ansi_prefix.E68k.h and renaming it to
ansi_prefix_Time.h.
- In ansi_prefix_Time.h set _MSL_OS_TIME_SUPPORT, _MSL_TIME_T_AVAILABLE and
_MSL_CLOCK_T_AVAILABLE to 1.
- Build the new library.
I would also specify "#include <ansi_prefix_Time.h>" in your project's "C/C++ Preprocessor" panel.
I hope this helps.
CrasyCat