General Forums >> Interesting Projects and Tutorials

Pages: 1
blak3r



Reged: Feb 03 2006
Posts: 44
MapFileUtil - creates sortable table of how much RAM and ROM each object uses.
      #98932 - Tue Feb 24 2009 11:09 PM Attachment (128 downloads)

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 10 anonymous users are browsing this forum.

Moderator:  jtemples, mikerj, Dan Henry, Andrew L 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is enabled
      UBBCode is enabled

Rating:
Topic views: 1727

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5