Tool/software: Code Composer Studio
Hello TI support team,
Could you be so kind to help me with a questions related to a stack and its size definition?
After reading the following thread I'm a bit confused about using the option --stack_size:
Right now within my project I have the following linker file instructions:
USER_STACK (RW) : origin=0x08000000 length=0x00000F00
SVC_STACK (RW) : origin=0x08000F00 length=0x000000F0
FIQ_STACK (RW) : origin=0x08000FF0 length=0x000000F0
IRQ_STACK (RW) : origin=0x080010E0 length=0x000000F0
ABORT_STACK (RW) : origin=0x080011D0 length=0x000000F0
UNDEF_STACK (RW) : origin=0x080012C0 length=0x000000F0
At the same time, during startup each mode stack pointer is set to the corresponding memory area address.
Additionally I don't have declaration of the .stack section within the linker file. Everything works fine with such a configuration (at least I don't see any issues :)).
Do I really need to use --stack_size option in this case? What is the purpose of this option if stack memory is completely described by the linker file and stack pointers are set by the application?
Also the mentioned above thread contains the following information:
1. --stack_size=0x800 is defined in CCS linker options (your 2nd picture)
2. The memory section used for stack is defined in cmd file (your 1st picture). This region should be >= --stack_size defined in CCS linker options
3. The starting address of stack in cmd file should be consistent with the starting address defined in sys_core.asm
Why the marked condition has to be fulfilled? If I have several regions (separate stack area for each mode) which stack_size has to be used? Less than size of the USER mode stack region or...?
Thanks in advance for your help!