This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, I am trying to generate a detailed memory map from just a .out file. I need all the detail exactly like the map that comes out of the linker with -m. Changes have been made to the original source code hence I am trying to generate this original map from just the original .out. Recompiling it is therefore not an option (that I am aware of). It doesn't look like the cl2000 linker can have a .out as an input. I have tried using hex2000.exe with its --map==test.map but it only produces a summary of the memory map. Basically it only lists sections but not the individual object files and functions (with their location and size). Is there any known method or trick that I can use? Are there some switches or options that I am missing on the hex2000 command?
hex2000.exe --map=test.map -i test.out -o test.hex -order MS -romwidth 16
thanks
Unfortunately, there is no method that can give you ...
all the detail exactly like the map that comes out of the linker with -m
There are only partial solutions that can show you some of that information. Here, in no particular order, are some techniques I recommend. I am confident you will find them helpful, though less helpful than a linker map file.
You can see information about the functions by using a command similar to ...
ofd2000 --func_info file.out
The OFD utility ofd2000 is documented in the C28x assembly tools manual. Information on the --func_info option is in this article (ignore all the parts about using Excel). This shows you some details about each function in the program. The important detail in your case is the name of the source file for the function. This command relies on the debug information in the program. If that information is not present, then no output appears.
To see all the global symbols, in address order, run this command ...
nm2000 -g -n file.out
The utility nm2000 is documented in the same manual. The symbols with T next to them are functions. The rest of the symbols are related to data. This gives you some sense of what is going on with regard to data.
A complete disassembly of the program may be useful. Use this command ...
dis2000 --all file.out
The utility dis2000 is also documented in the same manual. This is another way to see what is going on with regard to data.
All of those utilities support the option --help. Use that to see all of the options. Feel free to experiment with them. Another way to learn about these utilities is to build tiny programs that do one unusual thing, then see how that unusual thing shows up in the output of these utilities. In many cases, you can scale that technique up to your actual program.
I'm sorry there is not a better solution.
Thanks and regards,
-George
Thanks George. I have explored all the utilities but you have given me some new info so thanks for that. FYI I can actually find the memory map info for functions using just a .out. In Code Composer if you load the program (.out) then select View then select Symbol Browser then click the Functions tab you can get the start and end address of each function. It is very tedious though as it wont let me select more than one function at a time so I cant copy it into another document to do all the processing I need. Anyway some info is definitley better than none.
Thanks