Adding custom module size info to 'make size' output

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
wayne
Posts: 5
Joined: Wed Mar 09, 2016 2:58 pm

Adding custom module size info to 'make size' output

Post by wayne » Mon Jan 07, 2019 10:13 am

Hi,

I've created a custom C module for https://github.com/bbcmicrobit/micropython.git (Version 0.9x) by adding a suitable `micropython/source/mymodule.cmake` file and my source.

Running`make size` doesn't show the size info for my libraries as they don't have .map files generated that can be to passed to the mbed `tools.memap` utility used in the MicroPython Makefile 'size' target.

Please could someone let me know how do I tell the MicroPython/Yotta build system (in my 'mymodule.cmake'?) to generate map file(s) for my module?

Thanks
Wayne
Last edited by wayne on Mon Jan 07, 2019 8:25 pm, edited 1 time in total.

User avatar
dhylands
Posts: 3177
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Adding

Post by dhylands » Mon Jan 07, 2019 7:06 pm

I'm not familiar with your build system, but the map files are produced by the linker.

In the normal micropython build, you pass the option `-Map foo.map` to the linker to produce a foo.map file.

.map files aren't produced for libraries, only for the final executable.

wayne
Posts: 5
Joined: Wed Mar 09, 2016 2:58 pm

Re: Adding custom module size info to 'make size' output

Post by wayne » Mon Jan 07, 2019 8:27 pm

I'm hoping someone who worked on the microbit port of MicroPython could shine some light for me please, as it's the build system for that port.

Post Reply