This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

More Pointer Problems

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

Parents
  • NOW we're getting somewhere! I took out all the reentrant spcecifications on my process functions and it started to work correctly!

    HOWEVER, now I get once compiler warning per function that I am making recursive calls...

    From HelloCommands.c:

    BYTE process_Help(char *cmdBuffer) 
    {
        char *strHelp = "Help Message";
        cmdBuffer[0] = '\0';
        printf(strHelp);
        return TRUE;
    }
    

    produces the warning:
    *** WARNING L13: RECURSIVE CALL TO SEGMENT
        SEGMENT: ?CO?HELLOCOMMANDS
        CALLER:  ?PR?_PROCESS_HELP?HELLOCOMMANDS
    

    There is NOTHING recursive about that function, why am I getting this warning?

    Chris

Reply
  • NOW we're getting somewhere! I took out all the reentrant spcecifications on my process functions and it started to work correctly!

    HOWEVER, now I get once compiler warning per function that I am making recursive calls...

    From HelloCommands.c:

    BYTE process_Help(char *cmdBuffer) 
    {
        char *strHelp = "Help Message";
        cmdBuffer[0] = '\0';
        printf(strHelp);
        return TRUE;
    }
    

    produces the warning:
    *** WARNING L13: RECURSIVE CALL TO SEGMENT
        SEGMENT: ?CO?HELLOCOMMANDS
        CALLER:  ?PR?_PROCESS_HELP?HELLOCOMMANDS
    

    There is NOTHING recursive about that function, why am I getting this warning?

    Chris

Children