Here's another good one. Again, works fine on simulator/debugger, but not on the target hardware. If I do this: BYTE process_Help(char *cmdBuffer) reentrant { cmdBuffer[0] = '\0'; printf( "Help Message"); return TRUE; } everything works fine. But if I do this: BYTE process_Help(char *cmdBuffer) reentrant { char *strHelp = "Help Message"; cmdBuffer[0] = '\0'; printf(strHelp); return TRUE; } it works fine on the simulator/debugger, but nothing is displayed when executed on the target hardware. Any/All help welcome and appreciated. Thanks, Chris Beattie
That's probably because the linker is detecting a call to the function in both interrupt and non-interrupt functions. That makes it necessary to declare the called function reentrant so a simulated stack can be configured in the the appropriate memory. You'll need to configure your startup.a51 file for this and add it to your project if you already haven't.
If this is true, then you are in a real mess because printf is non reentrant. Also if this is true, you should be getting L15 : multiple call to segment errors, which you did not mentioned.
Not getting any L15 errors, just the L13's...
I don't think this is the case, but if it were, what do I need to set up in the startup.a51 to allow for it? I've already included it and customized it to some extent. Thanks, Chris