Hello Henrik,
Further to Fabio's insight -
I assume that the variable m_time is global. If so, during the ANSI initialisation process, the variable should have been assigned a default value of zero. However, it is also possible that, when you created the CW project, you elected not to allow ANSI initialisation code, and this may account for your problem.
If this is the situation, and few variables are affected by the lack of general initialisation, you might explicitly initialise the variable within main() function
The "uninitialised memory" error message would be applicable to full chip simulation only.
Regards,
Mac