Page 1 of 1

Adding custom module size info to 'make size' output

Posted: Mon Jan 07, 2019 10:13 am
by wayne
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

Re: Adding

Posted: Mon Jan 07, 2019 7:06 pm
by dhylands
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.

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

Posted: Mon Jan 07, 2019 8:27 pm
by wayne
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.