Hi,
How to calculate the free Ram and Flash after I loaded bootloader + SD + App on a running nRF52840?
I want to know ways to measure during critical RAM load too.
HW: PCA10056
Hi,
How to calculate the free Ram and Flash after I loaded bootloader + SD + App on a running nRF52840?
I want to know ways to measure during critical RAM load too.
HW: PCA10056
Hi,
To find the free flash space, you should add up the size of everything you need to store in flash. Typically it is as described in the Bootloader memory layout documentation. Summing up:
You can use the same approach to find the RAM usage. You need to add:
This will let you know how much RAM is unused, but it does not tell you if the stack is unnecessarily large. There is no straightforward way of detecting that. You can use a stack guard in form of a known pattern you write to the stack memory and run the application (with as good coverage as possible) before you inspect the stack to see how much if it has been used. I do not see a need for this unless you are very constrained on RAM, though.