Git Product home page Git Product logo

mapviewer's Introduction

MapViewer

MapViewer is a Windows (C#/.NET)application that displays information extracted from the MAP file (generated by the GNU linker LD) and from the ELF executable image. It displays the module/file wise split of resources consumed along with details of individual symbols found within each module/file. Each view can be filtered and sorted dynaimically allowing the user to quickly calculate the sizes of various modules and symbols or identify those modules that are perhaps unintentionally included in a project. All the list view magic is courtesy of ObjectListView

The application looks like this:

It was primarily developed for use with the FTDI FT900 Microcontroller and associated toolchain but is generic enough to be useable for other GCC based toolchains. I've tested it with Microchip's XC16 compiler and should also be useful for XC32 (with some minimal porting).

I've written a blog post with more details on the application here. Prebuild executables are available under the releases.

Usage Guide

  1. Input the paths to the MAP and ELF image in the text boxes.
  2. Click on the Settings button and configure the path to Binutils NM and READELF provided by your toolchain.
  3. Update the Segment to Sections mapping if your target is not FT32 or XC16 (PIC24)
  4. Close the settings and click on the "Analyze" button.
  5. Right click on the Lists to export to CSV/HTML files
  6. [new feature] If you linked with the -cref option, a tree view of the module "dependcies" is shown for each module you select. This shows you the modules that depend on/are users of the selected module. And allows you to easily answer questions like "which application files are responsible for the inclusion of floating point library routines in my project?" for instance. Note that the this view is a bit incomplete in that paths are truncated if the same node appears twice on it. The information looks like this:

Support

Buy Me a Coffee at ko-fi.com

mapviewer's People

Contributors

budarriola avatar christoph-nils avatar govind-mukundan avatar itzandroidtab avatar joeynovak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapviewer's Issues

Fails to populate olv_SymbolView

Sorry I am a noob programmer (specially C#)

When I click on a file on the left it does not populate the list on the right
image

the problem seems to arise because

  • s.ModuleName is empty
  • hence m1 is empty (in l.660)
  • and assertion on l.662 fails
    image

any idea why this is happening?

Compile error $$$

A lot of compile errors like this:

Error 1 Unexpected character '$' W:\esp8266\tools\mapViewer\MapViewer-master\MapParser\MapParser.cs 197 41 MapViewer

Appears from those kind of lines

Debug.WriteLineIf(DEBUG,$"{Data[i].SectionName}\t{Data[i].LoadAddress.ToString("X")}\t{Data[i].Size.ToString("X")}\t{Data[i].Size}\t{Data[i].ModuleName}\t");

I'm using VS2012 express.
Can you fix them?

Thanks,

mapviewer lags when using module filters

when using module filter mapviewer lags and it starts to have high cpu usage
note i use mapviewer with gnu arm toolchain (gcc-arm-none-eabi) which has NM and READELF

Build Error

I tried to build the project with SharpDevelop, is this IDE supported (noob with C#)
Actually the project is opened When I build it fails with the following errors :

E:\test\MapViewer-master\MapParser\MapParser.cs(197,41) : Error CS1056: Caractère '$' inattendu
E:\test\MapViewer-master\MapParser\MapParser.cs(202,38) : Error CS1056: Caractère '$' inattendu
E:\test\MapViewer-master\MapParser\MapParser.cs(309,38) : Error CS1056: Caractère '$' inattendu
E:\test\MapViewer-master\MapParser\MapParser.cs(310,38) : Error CS1056: Caractère '$' inattendu
E:\test\MapViewer-master\MapParser\MapParser.cs(311,38) : Error CS1056: Caractère '$' inattendu
Build failed. (00:00:02.2911177)

"Caractère '$' inattendu" means "Unexpected Char".

All of them are debug output so I commented thes lines, but then many errors show up :

E:\test\MapViewer-master\MapParser\Cref.cs(76,68) : Error CS1525: Terme d'expression non valide '.'
E:\test\MapViewer-master\MapParser\Cref.cs(76,69) : Error CS1003: Erreur de syntaxe, ':' attendu
E:\test\MapViewer-master\MapParser\Cref.cs(76,79) : Error CS1002: ; attendu
E:\test\MapViewer-master\MapParser\Cref.cs(76,79) : Error CS1525: Terme d'expression non valide ')'
E:\test\MapViewer-master\MapParser\Cref.cs(78,47) : Error CS1525: Terme d'expression non valide '.'
E:\test\MapViewer-master\MapParser\Cref.cs(78,48) : Error CS1003: Erreur de syntaxe, ':' attendu
E:\test\MapViewer-master\MapParser\Cref.cs(79,17) : Error CS1525: Terme d'expression non valide 'else'
E:\test\MapViewer-master\MapParser\Cref.cs(79,21) : Error CS1002: ; attendu
E:\test\MapViewer-master\MapParser\MapParser.cs(207,26) : Error CS1525: Terme d'expression non valide '.'
E:\test\MapViewer-master\MapParser\MapParser.cs(207,27) : Error CS1003: Erreur de syntaxe, ':' attendu
E:\test\MapViewer-master\MapParser\SymParser.cs(78,26) : Error CS1525: Terme d'expression non valide '.'
E:\test\MapViewer-master\MapParser\SymParser.cs(78,27) : Error CS1003: Erreur de syntaxe, ':' attendu

Feature Request: Wildcards in segment/section mapping

Hello! Fantastic tool!

I'm using it with Microchip's XC16 complier, and having a lot of success in tracking down what's using my memory. On this 16-bit complier specifically though, for everything addressed above 0x8000 in memory, I need to access it through their "EDS" window. In order to do that, I flag variables to be placed there with an attribute. when the complier generates the sections, it specifies generated names for the variables I've placed there.

Here's an example of the data memory readout from the map:

"data" Memory  [Origin = 0x1000, Length = 0xd000]

section                    address      alignment gaps    total length  (dec)
-------                    -------      --------------    -------------------
.bss                        0x1000                   0          0x4232  (16946)
.data                       0x5232                   0           0x440  (1088)
.bss                        0x5672                   0           0x314  (788)
.data                       0x5986                   0            0xae  (174)
.bss                        0x5a34                   0            0x4e  (78)
.data                       0x5a82                   0            0x4c  (76)
.bss                        0x5ace                   0            0x52  (82)
.data                       0x5b20                   0            0x26  (38)
.bss                        0x5b46                   0             0xe  (14)
.data                       0x5b54                   0             0x8  (8)
.bss                        0x5b5c                   0             0x4  (4)
_000000000768F0A0601c1dc9    0xb300                   0          0x2800  (10240)
_000000000770BE60601c1dc8    0xdb00                   0           0x200  (512)
_000000000741A320601c1b9b    0xdd00                   0            0x20  (32)
_000000000770BB40601c1dc8    0xdd80                   0           0x200  (512)
_0000000007F9F280601c1dc5    0xdf80                   0            0x80  (128)

                 Total "data" memory used (bytes):         0x7800  (30720) 57%

All of those sections starting with _000 are variables/functions placed in the EDS (above 0x8000) memory area. For teh time being, I'm manually adding each of those names to the BSSSeg2SecMap, but as I change things the complier likes to move them around. Being able to add a section named something like _00* would be fantastic to pick up all of those auto-generated segments!

Cheers again for the fantastic tool!

Using MapViewer with STM32F7

Hi govind!

Awesome tool you wrote here :)

I'm trying to investigate the memory used on my STM32F7 but I'm running into the following error:

image

The paths all seem fine, no spaces or weird characters.

image

Any idea what can be done to make the tool work?
Thanks!

Regards
Julian

XC32 compatibility

Hello,
I wanted to use this tool to analyze .map and .elf from a build that uses the XC32 toolchain. I've realize that the app is made for XC16 primary. Is there anyway you guy can make a XC32 compatibility release? I'm having a problem where the BSS and DATA of a module isn't matching up to the right window that display symbols and dependencies BSS and DATA. The TEXT match though.

Error when press "Analize"

Then I press "Analize" button, I have error message "The specified file cannot be found"(please see: https://github.com/ksrp1984/temp/blob/main/ErrorWindow.jpg).
Run aplication on Windows 10.
Also, the size of the sections are not exactly correctly displayed.
MapViewer shows:
TEXT(total) == 33646, BSS(Total) == 1438, DATA(total) == 4066
But compiler (Eclipse+GCC) shows:
TEXT(total) == 36344, BSS(Total) == 2992, DATA(total) == 1528

Error Analyzing Map File

Getting the below error. Made sure there is no space or special character in the path file and gave full path to map file, elf file and NM/ELF reader paths. Also tried running as administrator. Can you point me to the issue?

Thank You in advance

image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.