In addition the -cref option will print the cross-reference table which is very useful when you want to track down references to symbols. Scrolling down the map file you'll encounter a section named Linker script and memory map. This contains a breakdown of the memory contribution of each and every file that was linked into the final image. To illustrate the analysis I have created a simple project of two files. All the explanations will be based on this simple project. The text region of the example project looks like this: 'Finished building target: MapParser.elf' Compiling this project with the followingįt32-elf-gcc -I"C:/Program Files (x86)/FTDI/FT90x Toolchain/Toolchain/hardware/include" -O0 -g -fvar-tracking -fvar-tracking-assignments -Wall -c -fmessage-length=0 -ffunction-sections -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "./main.c"įt32-elf-gcc -I"C:/Program Files (x86)/FTDI/FT90x Toolchain/Toolchain/hardware/include" -O0 -g -fvar-tracking -fvar-tracking-assignments -Wall -c -fmessage-length=0 -ffunction-sections -MMD -MP -MF"test.d" -MT"test.d" -o "test.o" "./test.c"įt32-elf-gcc -L"C:/Program Files (x86)/FTDI/FT90x Toolchain/Toolchain/hardware/lib" -Wl,-gc-sections -Wl,-entry=_start -Wl,-print-map > Linker.map -Xlinker -cref -Xlinker -verbose -o "MapParser.elf".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |