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
Chris, please could you re-post your code samples using the <pre> and </pre> tags, so that the layout is preserved and we can read them! See the link 'Tips for Posting Messages' in the lefthand sidebar http://www.keil.com/forum/tips.asp Have you read the section on memory-specific and generic pointers in the manual?
Nope, I haven't read those sections in the manual. Are they in the "C51 Compiler" Book or one of the others? Thanks, Chris Beattie
Hmmm, This sounds more and more like a memory problem on your target. Have you verified that the XDATA actually works? What chip are you using? Jon
Okay, I read that part of the manual and tried to change my code to the following:
BYTE process_Help(char xdata *cmdBuffer) reentrant { char xdata *strHelp = "Help Message"; cmdBuffer[0] = '\0'; printf(strHelp); return TRUE; }