1293 - Lattice Diamond: MAP: How can I see what addresses my functions/variables have been mapped to?  How can I get a memory map report?

1293 - Lattice Diamond: MAP: How can I see what addresses my functions/variables have been mapped to?  How can I get a memory map report?

Lattice Diamond: MAP: Generating a linker map file shows the memory locations the code is targetted to. This is a good way to ensure the generated program image matches the platform architecture. For example, in a certain application confirming that the boot code really is targeted for the SPI flash at offset 0x100000.

To create a map file, simply add the following the text to the C/C++ SPE Linker Options: -Wl,-Map,file.map

The "-Wl," passes the remainder to the GNU linker and the -Map is the "generate a map file" command. The comma is needed between the -Map and the file name, don't use a space or put the string in quotes.

The map file will be written into the same directory as the elf image.