Skip to content

Commit 878f522

Browse files
committed
Merge pull request #1333 from UncleGrumpy/stm32_build_config
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
2 parents 6bfa91e + bfd80d5 commit 878f522

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)