STM32C031: Reducing Flash Usage Without Losing Debugging
Hi,
I’m working with an STM32C031 and have written bare-metal firmware based on the CubeMX-generated framework. When I compile in Debug mode, the firmware uses about 79% of the available flash. Switching to Release mode reduces this to around 45%, which is a big improvement.
I’d like to further minimize code size while still retaining as much debugging capability as possible.
A couple of questions if someone could advise:
1. What techniques and/or compiler/linker options do you recommend?
2. where and how do I set any such settings? I assume in CMakeLists.txt? but not sure.
Thank you
