Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Optimize debug profile flags for size #11126
Adjusts the debug profile to use similar size-optimized configurations.
This allows to compile also larger applications with debug profile. Especially on ROM constrained devices, it often is not possible to use the current speed-optimized profiles.
For example: device management client example with Thread stack (K64F + Thread + GCC)
With default GCC profile => does not fit.
16:01:13 Total Static RAM memory (data + bss): 70300(+70300) bytes
With Wisun stack this saves -321 KiB ROM.
This is similar to changes done for develop profile in #10813
Previously Client has been maintaining its own size-optimized compiler profiles as part of its delivery. It would be better for client to drop those, and Mbed OS to adopt more size-optimized profiles. (https://github.com/ARMmbed/mbed-cloud-client-example/tree/master/profiles).
Pull request type
Changed the Debug compiler profile to favor size optimization over speed optimization.
This brings massive ROM savings, and allows to use debug builds also with larger applications (for. ex. Mesh stack). Diff. for mbed-cloud-client-example with Wi-Sun stack. Total Static RAM memory (data + bss): 85120(-216) bytes Total Flash memory (text + data): 592668(-329296) bytes
kjbracey-arm left a comment
Tentative approval, as I'm not really a fan of
In practice I've found it to be not as good as advertised. But then, that was with older versions of GCC. Maybe it's improved. And I guess there's nothing stopping anyone from tweaking it to