Skip to content

Commit

Permalink
Merge pull request #1333 from UncleGrumpy/stm32_build_config
Browse files Browse the repository at this point in the history
Allow continuing to support 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.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
  • Loading branch information
bettio committed Oct 14, 2024
2 parents 6bfa91e + bfd80d5 commit 878f522
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 878f522

Please sign in to comment.