Other Parts Discussed in Thread: TMS570LS3137
There appears to be a bug in either the IDE or the compiler. I'll let you decide which.
I've cut this function down to the bare bones, the problem occurs when I try to view the contents of parameters sent to a function, when there are more than 4 parameters that are not 32 bit values. In the example below I have 8 x 8bit parameters. When I try to view var5 to var8 they read zero, but var1 to var4 come out correctly.
The code looks like this...
Doesn't get a lot more trivial than that. Here's what happens when I view it using CCS...
Now if you add up the value of all the parameters it comes to 36 (0x24). The memory browser on the right show the stack. The first 4 parameters are packed into a 32 bit space, then comes the return value in 16 bit space, then padding for 16 bits (I guess), the next 4 parameter each take up 32 bits. The IDE seems to be picking up the wrong space.
Why the last 4 8-bit parameter are packed into the stack frame in a different way to the first ones is a mystery, but the result comes out correctly. It does, however, make it difficult to debug. Sending 8 x 32 bit values works fine.
Regards
Andy



