The driving force behind this project was to create a view of the map file data that would show which objects are consuming the most ROM and RAM. This utility will take in a map file and will output something that looks like:
This allows me to easily visualize what modules are using the most program space or data space so I can focus on optimizing them.
The utility was written in Java. To run the code you run:
Code:
java -jar MapFileUtil.jar [MAP_FILE_PATH]
[MAP_FILE_PATH] is optional. Set it to the full path of where the .map file can be found.
If ommitted, it will search the current working directory for files with a .map extention.
I put the jar file in a folder in my project called build. Then, I added the following code to run as a Post-build step:
Code:
java -jar "${project_loc}/build/MapFileUtil.jar"
Another thing this utility will do is create a version of the map file without the call graph info. I've somehow managed to create a call graph which consumes 450 megs! I'm currently using PICC18-STD 9.50pl3 which doesn't allow you to turn off call graph generation. So, I cannot easily open the map file and scroll through it without consuming most of my ram. So, this utility exports the map file without the call graph.
Attached:
1) Source Code in case you want to modify.
2) A runnable jar file.
3) A .exe file which should work for windows users. I got a strange error in hitide when i tried to use it... but you can drop it in your build directory and double click it and it'll work.
I hope someone finds this useful as well.
Regards,
Blake Robertson