Skip to content

Commit

Permalink
Use newlib-nano by default for 512k flash STM32 boards
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
UncleGrumpy committed Oct 14, 2024
1 parent 4b82c37 commit bfd80d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platforms/stm32/cmake/compile-flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set(CXX_WARN_FLAGS "${COMMON_WARN_FLAGS}")
# Use C and C++ compiler optimizatons for size and speed.
if (${CMAKE_FLASH_SIZE} STREQUAL "ROM_512K")
set(OPTIMIZE_FLAG "-Os")
set(LINKER_FLAGS "${LINKER_FLAGS} -specs=nano.specs")
else()
set(OPTIMIZE_FLAG "-O2")
endif()
Expand Down

0 comments on commit bfd80d5

Please sign in to comment.