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.
A program created in CCS 5.5 with C5500 compiler v4.1.1 for a TMS320C5535 was crashing - single stepping appeared to show stack corruption. The --stack_size and --sys_stacksize C5500 linker options were both set to 0x200 which is the default in a newly created project.
The call_graph output from cg_xml v2.32.00 was reported a wcs of 1122 for main. The --stack_size linker option was increased from 0x200 to 0x500 (1280) and the program no longer crashed.
The cg_xml documentation for call_graph doesn't make it clear if the reported wcs for a C5500 device applies to the Data Stack and/or System Stack. i.e. does call_graph know how the reported stack usage is split between the Data Stack / System Stack?
[single stepping shows both the Data Stack and System Stack are being used]
Chester Gillon said:The cg_xml documentation for call_graph doesn't make it clear if the reported wcs for a C5500 device applies to the Data Stack and/or System Stack
It only applies to the data stack. What does this mean for the system stack?
I presume you use the stack configuration the C55x cpu manual calls Dual 16-bit stack with fast return. The is the configuration set up by the vectors.asm code in the compiler RTS library. In that case, the data stack and system stack grow independently, and the system stack grows slower. If you are relying on the default stack configuration the HW uses at power up, then you use 32-bit stack with slow return. In that configuration, both the data stack and system stack grow at the same rate.
Thanks and regards,
-George