Forum: ARM programming with GCC/GNU tools Sections padding "*fill*" in .map

von Dustin S. (dbrazeau)

Rate this post
0 useful
not useful
After compiling and linking I get an ouput map file.  I there there is a
bunch of fill that take up room in memory.  I found that objcopy has
an option --gap-fill which allows you to select what to fill in these
gaps with.  I was wondering if there is any way to eliminate these gaps
altogether? i.e. remove section padding or something like that.


von Clifford S. (clifford)

Rate this post
0 useful
not useful
They only take up unused memory. The gaps will be determined by the
alignment and location of sections defined in your linker script. So you
would need to modify teh script to close the gaps. Filling with 0xFF
will mean that the memory won't need to be programmed (since 0xFF is the
Flash erase state), on the other hand filling with 0x00 means that the
memory cannot be re-programmed without erasing, which may be more

Typically you might want to program the entire flash memory even if only
a part of it is used. objcopy can create a load file that exactly fits
your devices flash memory even though your code is unlikely to do so.

In short I think you are worrying about nothing - if you application
fits, that is.



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.