b. If I wanted to find the memory map of the binary, i.e. ROM space used, addresses used, how can I generate this map?
Look at demo_tasking.gpr, package Linker:
package Linker is
-- --create-map-file isn't supported in this configuration
for Default_Switches ("ada") use
(
"-Wl,-Map," & Project'Project_Dir & Project'Name & ".map"
);
end Linker;
Project’Project_Dir is the directory where the .gpr file is, and Project’Name is the .gpr file’s name (in this case, demo_tasking). As you can see from the comment, there should be a --create-map-file switch to automate this, but it doesn’t work with the current cross-compiler. I think I know why, and it should be fixed in the next compiler release I make.
Builder'Default_Switches ("ada") should contain "--create-map-file".
If you specify Project'Object_Dir, there's an additional step, because gprbuild changes directory to Object_Dir before the link: package Linker should contain
for Map_File_Option use "-Wl,-Map," & Project'Project_Dir;
Last edit: Simon Wright 2015-08-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
srini said, in [tickets:#9],
b. If I wanted to find the memory map of the binary, i.e. ROM space used, addresses used, how can I generate this map?
Look at
demo_tasking.gpr
, packageLinker
:Project’Project_Dir
is the directory where the .gpr file is, andProject’Name
is the .gpr file’s name (in this case,demo_tasking
). As you can see from the comment, there should be a--create-map-file
switch to automate this, but it doesn’t work with the current cross-compiler. I think I know why, and it should be fixed in the next compiler release I make.Related
Tickets:
#9With GNAT GPL 2015 (and with the GCC 5.1.0 OS X port at Sourceforge),
--create-map-file
is supported.Builder'Default_Switches ("ada")
should contain"--create-map-file"
.If you specify
Project'Object_Dir
, there's an additional step, because gprbuild changes directory toObject_Dir
before the link:package Linker
should containLast edit: Simon Wright 2015-08-18