Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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] | 111 | 0 | 14 |
[lib]/c_nano.a | 12735 | 464 | 12 |
[lib]/gcc.a | 3132 | 0 | 0 |
[lib]/misc | 208 | 12 | 28 |
[lib]/nosys.a | 32 | 0 | 0 |
[lib]/stdc++_nano.a | 158 | 0 | 0 |
bldc/bldc.o | 808 | 0 | 0 |
comms/comms.o | 4180 | 0 | 0 |
main.o | 61 | 0 | 0 |
mbed-os/drivers | 2780 | 4 | 100 |
mbed-os/hal | 2946 | 4 | 84 |
mbed-os/platform | 5054 | 260 | 261 |
mbed-os/rtos | 16267 | 168 | 6073 |
mbed-os/targets | 13973 | 4 | 504 |
Subtotals | 62445 | 916 | 7076 |
+-----+-+-+--+
Total Static RAM memory (data + bss): 7992 bytes
Total Flash memory (text + data): 63361 bytes
Regards, Seth