2026-01-08 1:31 AM
Hello,
I have observed this issue in version 6.16.1 across several MCU series (F3, F4, H5, H7), though it appears likely that all earlier versions are affected.
The generated .cmake toolchain files incorrectly treat the --specs=nano.specs option as linker-only. This option should be applied globally, as it also affects the system include paths used during compilation. Specifically, it causes the compiler to include arm-none-eabi/include/newlib-nano/newlib.h instead of the standard arm-none-eabi/include/newlib.h.
While this mismatch probably does not break ABI compatibility—since the structures provided from the standard headers are larger than those used in the compiled newlib-nano library—it does negate the RAM usage benefits of newlib-nano. This is particularly problematic when using the USE_NEWLIB_REENTRANT FreeRTOS option.
Regards,
Peter
Solved! Go to Solution.
2026-01-09 8:05 AM
Great! Works perfectly. Thanks!
2026-01-09 8:07 AM
Nice! Perhaps STM32CubeMX should be modified to generate the gcc-arm-none-eabi.cmake file like this too.
2026-01-14 1:03 AM
Hello @Erlkoenig
Thank you for posting the workaround,
In fact, this issue is raised internally to dedicated team for further investigation. (Ticket 225091 This is an internal tracking number and is not accessible or usable by customers).)
KR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.