Hi,
I usually use (at the end of the development) a compiler option that removes unused data/code. From Atollic toolchain for ST here's the option to activate it.
Where can I find these options on MCUxpresso?
regards,
gaston
Solved! Go to Solution.
This is about grouping code and data items into single sections:
-ffunction-sections -fdata-sections
They should be set by default already in the SDK projects:
And for the linker to remove unused ones:
--gc-sections
I hope this helps,
Erich
This is about grouping code and data items into single sections:
-ffunction-sections -fdata-sections
They should be set by default already in the SDK projects:
And for the linker to remove unused ones:
--gc-sections
I hope this helps,
Erich
Hi there,
-ffunction-sections and -fdata-sections MCU compiler flags are set in my project; and also --gc-sections MCU linker flag. However, lots of unused standard functions are linked to my application, such as read_r, _realloc_r, etc.
The build configuration is using my own linker script and I have unchecked 'Do not use default libraries (-nodefaultlibs)' at Tool Settings >> MCU Linker >> General
Any clue of what can be happening here?
Thanks in advance!
Attach you map file. This may give some clues
I'm sorry but I can't provide this information.
I’m sorry, but I can’t help without it.
AFAIK, MCUXpresso has this option set automatically for Release builds.