Cortex M3 Process Stack
The CTL documentation states that it is prefferable for an application to use the Process stack rather than the main stack.
How do I go about this?
Thanks
-
One of the solution / project properties is:
Runtime Memory Area Options: Process Stack Size
If this value is non-zero (and the preprocessor definition USE_PROCESS_STACK is present - which it seems to be by default) then the stacks you allocate for each CTL task will be process stacks.
This is preferred because you can get by with a smaller total allocation for stack since interrupts will always use the system stack (so you don't need to allocate enough space for all interrupts onto each and every CTL task stack).
Note: The above is correct for Crossworks for Arm 2.2. From what I understand, version 2.3 code currently must have non-zero Process Stack Size otherwise your code can crash.
Please sign in to leave a comment.
Comments
2 comments