The available free RAM for your program on the 20736/37 should be just under 30K (28K I believe)
20732 is closer to 17K
Unfortunately, there is not a make file option to enable code optimization.
Here's a thread you may find useful: BCM20732 Memory Map Architecture
What is the maximum stack size?
A: The app thread stack size is 1K (1024 bytes).
Is this stack is included in 28K RAM or extra?. Where is the stack located? At the end of RAM foot print?
To make sure that I understand correctly
user stack(1024bytes) = Dynamic allocation section and it starts after Application code/data section.
On power-up, Is stack pointer is initialized to beginning address of the stack section (and address increments) or end address of the stack section(and address decrements).
What information goes in to stack ? Application function call pointers and local variables.
Sorry for so many questions but want to make sure that we are with in available stack size and it is not overflowing.
I will ask one of the developers to respond as you have exceeded my knowledge of the inner-workings of the stack.
1 of 1 people found this helpful
> user stack(1024bytes) = Dynamic allocation section and it starts after Application code/data section
Yes, default application thread stack size is 1024 bytes an is allocated after the application code is copied into internal SRAM.
> What information goes in to stack ? Application function call pointers and local variables.
Yes, and this is a descending stack.
See Re: Porting an app from the 20732S to the 20736S towards the end of the discussion. The app can check if the app thread stack overflowed at some point in the past before the call to the API described in this. But this should be treated as a postmortem step, so if the overflow clobbered other thread stacks/data, then the app may crash long before it gets back to your application's thread context.