Stack usage of PSoC5

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

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?

   

Thanks

   

Lawrence

0 Likes
4 Replies
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

 You might want to check this thread, http://www2.cypress.com/?app=forum&rID=56286

0 Likes
JoBr_1593366
Level 5
Level 5
100 sign-ins 50 questions asked 100 replies posted
    

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.

   
   

How do you fill the stack RAM with 0x55 and then check it later?  I'm using PSoC4 but I assume the command is similar?

0 Likes