- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The amount of RAM that can be checked at PSoC Creater's build or in the Resource Meter view is the sum of the stack size and heap size that reserved space in advance, not the size actually used during program operation.
Is there a way to check the actual stack size and heap size?
Software version PSoC Creator 4.2 (4.2.0.641)
Best Regards,
Naoaki Morimoto
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, there is no functionality to monitor runtime heap/stack size in PSoC Creator.
Regarding the stack, even though it is not runtime monitor, it can be checked with PSoC Creator Debugger mode.
0) Implement the debug code to fill the known value (e.g 0xAA55) in stack area in beginning of main() function.
1) Start debug in PSoC Creator (PC is stopped at b/o main() fuction)
2) Run the software
3) Stop the software
4) Check how many data in stack area is changed from the know value (e.g. 0xAA55).
The above example has been introduced in AN89056, even though it is not exactly same.
Specially, please refer to the section 6.8 Stack Overflow Test in AN89056.
https://www.cypress.com/file/141001/download
And AN89056_Ram project (SelfTest_Stack.c) in zip file.