Decoding MAP file


#1

So I have an application running on the photon but I’m about at the end of the user memory available.

The output with I build with api is

Memory use:
text	   data	    bss	    dec	    hex	filename
128196	   1224	  18272	 147692	  240ec	/workspace/target/workspace.elf

I would like to understand what is using all the program memory so I compiled with Eclipse and GCC and now I have the .map file in the ouput folder of my application.

But I’m not sure what I’m looking at exactly. Any suggestions? I’m not sure how I can post the map file here.


#2

Since the biggest chunk of memory usage is text I’d suppose it’s the actual code.
Most of it will be your own code and depending on what functions, features and libraries you use you’ll see extra demand due to on-demand linking of required modules.

Without seeing your code, there is little else we could say.

For a general understanding of the memory usage table you can look here


#3

yes this is the code. But I would like to know what part of the code is using all the memory.

I worked with Microchip PIC32 few years ago and the map file was much easier to understand.

What is all the debug_xxx sections?


#4

@Suprazz, I use this lovely .map file analyzer. It isn’t Particle specific but it will help you nonetheless.

http://danieleff.com/stm32/map_analizer/


#5

wow perfect! Thanks!