6 years, 5 months ago.

Shrinking the flash footprint on a NUCLEO_F302R8

Here are some of the steps that I have done to get to my current build: gcc version 7.2.1 C++14 flag on in the debug build profile. added Mbed OS 5 support to the target.json Removed all of the features with mbedignore added the ndebug=1 and flush-at-exit:false to the app.json.

My application is a BLDC motor controller with a serial protocol so I don't need any of the IP infrastructure but removing the whole features directory does seem to effect the flash footprint at all. I would like to use the rtos but is there a way to shrink that 16k Same question for targets. I don't think I need that much more space but to be at capacity when starting develop seems a bad place to be.

+-----+-+-+--+

Module.text.data.bss

+-----+-+-+--+

[fill]111014
[lib]/c_nano.a1273546412
[lib]/gcc.a313200
[lib]/misc2081228
[lib]/nosys.a3200
[lib]/stdc++_nano.a15800
bldc/bldc.o80800
comms/comms.o418000
main.o6100
mbed-os/drivers27804100
mbed-os/hal2946484
mbed-os/platform5054260261
mbed-os/rtos162671686073
mbed-os/targets139734504
Subtotals624459167076

+-----+-+-+--+ Total Static RAM memory (data + bss): 7992 bytes Total Flash memory (text + data): 63361 bytes

Regards, Seth

Be the first to answer this question.