This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I read my .map file?

I am trying to free up some RAM on my nRF because I am getting Fatal error 0x4, NRF_ERROR_NO_MEM when I try to increase the size of a 2D array. 

I do not understand how to read my map file. This is the file that contains all my symbols, correct? I sorted all the symbols by size and this is what I get: 

Apparently all the ".debug_str" take up 11 MB total? That's a lot but if it's all in flash then I don't care. I want to free up RAM. How do I list only the RAM symbols? Do I just delete the entire ".text" section from the .map file?

I filtered out all the ".debug" symbols and I'm left with this: 

First of all, what is the difference between ".bss.ucHeap" and ."heap"? 

Secondly, I changed my makefile to make the heap size = 0 and my stack size bigger (from 2048 bytes to 3072), but my application STILL Fatal errors with 0x04 when I try to increase the size of a 2D array from [2][75] to [2][140]. I am only using 130 more bytes in the array. Why can't my stack handle it if I just increased its size from 2048 bytes to 3072? I am not using malloc() anywhere. 

New map file after stack/heap modification: 

  

Parents Reply Children
No Data
Related