You are here

Stack usage of PSoC5 | Cypress Semiconductor

Stack usage of PSoC5

Summary: 3 Replies, Latest post by U2 on 06 Dec 2011 01:04 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
user_460349's picture
1362 posts


I have a project using PSoC 5 and would like to know how much stack memory is being used. Does anyone aware of utility function for this purpose?

I am now assigning 8k for the stack and think it should be enought but would like to know what percentage it acutally is being used. Don't want to have a stack overflow problem after releasing the product.

I have do the same checking for a PSoC 1 project by filling the stack RAM with 0x55 and check the stack RAM after runing to project for a few days and try to perform all the function of the product. I know it is not 100% as it may not exercise the wrost combination but it would give at least a better value than just guesting.

Any one has experience with GCC ARM compiler to show me how it can be done? or utility functions that can be used?




danaxe's picture
3 posts

I have a similar issue. I'm out of RAM and havn't used much (myself). After you have compiled and linked yor program you can see in the output window how much sram is used

Flash used: 73320 of 262144 bytes (28.0 %).
SRAM used: 59776 of 65536 bytes (91.2 %).

I want to now what memory areas reside in the 59776 bytes. I have a project with FreeRTOS, the TOTAL_HEAP_SIZE = 8192

I cannot find where all that memory is allocated. I would like a .lst file to see what variables and arrays are allocated.


danaxe's picture
3 posts

I found the file with the information I looked for, the .map file in the debug directory. I also found the (debug) arrays that took the memory, :) allways nice to find the cause.

uday's picture
Cypress Employee
569 posts

 You might want to check this thread,

Log in to post new comments.