Skip to content

Commit bfd80d5

Browse files
committed
Use newlib-nano by default for 512k flash STM32 boards
For STM32 devices with 512k flash newlib-nano needs to be used otherwise the compiled binary is too large to leave space for user applications. Signed-off-by: Winford <winford@object.stream>
1 parent 4b82c37 commit bfd80d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/platforms/stm32/cmake/compile-flags.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ set(CXX_WARN_FLAGS "${COMMON_WARN_FLAGS}")
3636
# Use C and C++ compiler optimizatons for size and speed.
3737
if (${CMAKE_FLASH_SIZE} STREQUAL "ROM_512K")
3838
set(OPTIMIZE_FLAG "-Os")
39+
set(LINKER_FLAGS "${LINKER_FLAGS} -specs=nano.specs")
3940
else()
4041
set(OPTIMIZE_FLAG "-O2")
4142
endif()

0 commit comments

Comments
 (0)