How do I change the stack sizes?
The ARM7, ARM9 and XScale maintain six separate stacks:
- System/User mode stack.
- Supervisor mode stack
- IRQ mode stack
- FIQ mode stack
- Abort mode stack.
- Undefined mode stack.
The Cortex-M maintains two separate stacks:
- Main stack.
- Process stack.
To change the size of a stack section:
- Select your application project in the Project Explorer window.
- Right click to bring up the Project Explorer context menu and select Edit Properties to open the Project Properties dialog.
- Select the configuration(s) you wish the change to apply to using the Configuration drop down.
- Select the Runtime Memory Area tab to bring forward the stack and heap size properties.
- You should see the Stack Size properties, set the property for the stack you wish to change to be the required maximum stack size in bytes.
Note that the Cortex-M main and process stack properties will only appear in CrossWorks for ARM V2.x and above, with V1.x the main stack size was specified by the System/User mode stack property and there was no support in the GUI for setting up the process stack.
You should be aware that stack sizes are set on a per-configuration basis, so you are advised to change the stack sizes in an inherited configuration such as Debug, Release, or (preferably) Common
Please sign in to leave a comment.