This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS displays wrong value for some function parameters

Other Parts Discussed in Thread: TMS570LS1227

I'm calling a function that takes 5 parameters via a function pointer.  CCS displays the incorrect value for the 5th parameter...all others are correct.  The actual value of the 5th parameter is the value passed to the function since the code executes properly.  In the example below CCS shows that pBuffer is 0 but executing the code takes the path for pBuffer equal to 0x5555.

Since this is an ARM processor the 5th parameter is passed on the stack rather than a register.  The stack value for the 5th parameter is 0x00005555.  It appears that CCS is displaying the wrong 16 bits of this stack value.  If I modify the stack location to 0xAAAA5555 then CCS says pBuffer is 0xAAAA.

- Windows 8.1 (with latest updates)

- CCS V6.1.0.00104

TI Compiler V5.2.4

TMS570LS1227 Hercules Development Kit

typedef void (*RCV_CALLBACK_T)

(

uint16 macPort, /* receiving MAC port number */

uint32 srcIpAddr, /* source IP address */

uint16 udpSrcPort, /* UDP source port */

uint16 udpDstPort, /* UDP destination port */

uint16 pBuffer /* stack buffer containing the UDP packet */

);

void demoApp(void) {

RCV_CALLBACK_T rcvFunc;

rcvFunc = test_rcvcmpl;

(*(rcvFunc))(0x1111, 0x22222222, 0x3333, 0x4444, 0x5555);

}

 

static void test_rcvcmpl (

uint16 macPort, /* receiving mac port number */

uint32 srcIpAddr, /* source IP address */

uint16 udpSrcPort, /* udp source port */

uint16 udpDstPort, /* udp destination port */

uint16 pBuffer /* stack buffer containing the UDP packet */

)

{

if(pBuffer == 0)

{

demoAppInit();

}

else if (pBuffer == 0x5555)

{

demoAppInit();

}

}

  • RickV316 said:
    Since this is an ARM processor the 5th parameter is passed on the stack rather than a register.  The stack value for the 5th parameter is 0x00005555.  It appears that CCS is displaying the wrong 16 bits of this stack value.  If I modify the stack location to 0xAAAA5555 then CCS says pBuffer is 0xAAAA.

    Sorry about the very long delay in responding to this issue. Somehow this thread seems to have got overlooked.

    If this is still an issue, could you please send us a small example project that we can use to reproduce the issue?