Giter VIP home page Giter VIP logo

micropython-examine-mem-maps's Introduction

micropython-examine-mem-maps

##Aims: The Micropython compile process generates a gcc style .map file. This file explains how memory is mapped to Blocks, Regions and Symbols. Use D3 to visualise this information and add user interaction.

  • Show useful aspects of the data to see where memory is allocated and how much is used. (some)
  • Allow comparisons between versions of map files. (not yet)

Note that the Microsoft .map format is completely different and not supported here yet.

##Currently V1 Allows several files to be processed at the same time and shown as thumbnail pie charts at top of page.

  • These can be clicked on and refocus the main pie chart when selected.
  • When selected the main pie chart will morph between them and show byte sizes and percents. Bit of effort in here to make it smoothly interpolate each region even if some regions are missing in some maps.
  • This v1 is a starter to get the map files read, regions extracted and exported for displaying in D3 style.
  • all in the html file. Associated d3.min.js file is standard.
  • The program read_maps_v1.py reads .map files and exports a csv.
  • List of map files is hardcoded.
  • Exports only the main regions listed in a variable called CATS.
    • E.g. .bss, heap, .rodata, .text,...

Its weak in several areas:

  • does not yet parse all the symbols but structure is there.
  • exports in csv only - needs to be a more complex json structure.
  • does not organise the parsed data into the Blocks.
  • E.g. in RAM block - which regions. and in each region - which symbols.

v1

v2

Now starter project is there so next step is to:

In python file:

  • parse symbols better.
  • group by Block.
  • allow several pointers to all point to same memory addresses.
  • export in json.

In D3 file:

  • read the json style instead of csv.
  • add nested bar graph vertically down LHS, next to main pie chart.
  • allow expansion/contraction of groupings in this chart.
    • (e.g. open .text to see symbols inside and close again to hide them).
  • refocus pie chart on parent structure of selection.

v3

Allow for comparison between any two selected thumbnail pie chart.

Show the differences in memory size and where that is. more complex style of diff may not be required. Play with it to see what's the best solution for this problem.

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.