PelionIoT / mbed-bootloader

Generic bootloader to be used in conjunction with Pelion Device Management Client
https://www.pelion.com/iot-device-management/
Apache License 2.0
54 stars 90 forks source link

Trace size reduction #103

Closed evgenibo closed 3 years ago

evgenibo commented 3 years ago

Reduce size of traces in bootloaders in order to reduce overall bootloader application size. The idea is to redirect traces directly to serial by implementing a thin driver (similar to UC bootloaders) and avoid the overhead of mbed-os and standard c library when using printf. If USE_DIRECT_SERIAL_OUTPUT flag set - traces redirected directly to serial. If USE_PRINTF flag set- printf used for traces. default configuration is USE_DIRECT_SERIAL_OUTPUT.

For bootloaders that configured with external storage (and are bigger), disabling fflush saves additional space (up to 2 KB)