Seeing something that seems like I'm doing the right thing, but I'm not. We're bumping into flash size limitations, and according to the map file, there is debug info in places (for example, .debug_macro, .debug_ranges). In the debugging settings under the project properties I can change from maximum to none, and the debug sections are gone from the map, but the ROM image is exactly the same size. Am I missing something? We do have size optimization turned on. Can we remove the debug info to make it smaller?
David,
debug information does not count for code size, it does not get programmed/downloaded into the target, see Debug vs. Release? | MCU on Eclipse .
You can check your actual code size with the 'size' utility (see Code Size Information with gcc for ARM/Kinetis | MCU on Eclipse and text, data and bss: Code and Data Size Explained | MCU on Eclipse .
There are several other options (including -Os) which affect code size.
Or what you are using from the libraries: e.g. not using printf() and the like can reduce your code size by 10-20 kByte depending on usage. There -Lto (Link time Optimization) which optimizes across compilation units which can have a positive impact too.
I hope this helps,
Erich
Thanks Erich, we managed to free up space. I had forgotten that kernel logging was still turned on for MQX-Lite. We did look into the link-time optimization, but down in the guts of the MQX-Lite kernel turning that on created some alignment problems that led to run time errors.