- Tue Nov 16, 2021 10:41 am
davydnorris wrote:There's SDK functions that can help
void system_print_meminfo (void);
Thank you for responding, and I wasn't clear in what I asked. I use those already and they just show runtime ram usage.
data : 0x3ffe8000 ~ 0x3ffe837d, len: 893
rodata: 0x3ffe8380 ~ 0x3ffe9758, len: 5080
bss : 0x3ffe9758 ~ 0x3ffefb30, len: 25560
heap : 0x3ffefb30 ~ 0x3fffc000, len: 50384
I'm looking for a runtime method to show or let me calculate flash memory usage of the application. For instance, my test application scans ALL 4MB of the flash sectors 0-1023 and just checks for something besides 0xFF in a byte. If the entire sector is 0xFF, it's considered empty. This is what I get:
empty sectors 8 - 15
empty sectors 84 - 1017
empty sectors 1022 - 1022
The app is stored in flash sectors starting at 1. From my scanning app, it appears the app is done by sector 83. What I want is for some method or methodology to calculate that app length without having to do this brute force scan.