chore: only use nano lib when required (#6655)

This commit is contained in:
Malte Langermann
2025-10-17 14:37:09 +10:00
committed by GitHub
parent e70826928e
commit 71fd386f1a
4 changed files with 12 additions and 5 deletions
+7 -2
View File
@@ -41,7 +41,7 @@ option(DEBUG_SEGGER_RTT "Debug output to Segger RTT" OFF)
option(DEBUG_WINDOWS "Turn on windows traces" OFF)
option(DEBUG_YAML "Turn on YAML traces" OFF)
option(DEBUG_LABELS "Turn on Labels traces" OFF)
option(NANO "Use nano newlib and binalloc")
option(NANO "Use nano newlib and binalloc" ON)
option(TEST_BUILD_WARNING "Warn this is a test build" OFF)
option(MODULE_PROTOCOL_FCC "Add support for FCC modules" ON)
option(MODULE_PROTOCOL_LBT "Add support for EU/LBT modules" ON)
@@ -611,9 +611,14 @@ set(LINKER_SCRIPT firmware.ld)
target_link_options(firmware PRIVATE
-lm -T${LINKER_DIR}/${LINKER_SCRIPT}
-Wl,-Map=firmware.map,--cref,--no-warn-mismatch,--gc-sections
--specs=nano.specs
)
if(NANO)
target_link_options(firmware PRIVATE
--specs=nano.specs
)
endif()
if (DEFINED TARGET_FLASH_SIZE)
# message("TARGET_FLASH_SIZE = ${TARGET_FLASH_SIZE}")
target_link_options(firmware PRIVATE
+1
View File
@@ -22,6 +22,7 @@ set(PPM_LIMITS_SYMETRICAL YES)
set(USB_SERIAL ON CACHE BOOL "Enable USB serial (CDC)")
set(ROTARY_ENCODER YES)
set(HARDWARE_EXTERNAL_MODULE YES)
set(NANO OFF)
# for size report script
set(CPU_TYPE_FULL STM32F429xI)
+1
View File
@@ -21,6 +21,7 @@ set(RTC_BACKUP_RAM YES)
set(PPM_LIMITS_SYMETRICAL YES)
set(USB_SERIAL ON CACHE BOOL "Enable USB serial (CDC)")
set(HARDWARE_EXTERNAL_MODULE YES)
set(NANO OFF)
# for size report script
set(CPU_TYPE_FULL STM32F429xI)