chore: only use nano lib when required (#6655)
This commit is contained in:
@@ -41,7 +41,7 @@ option(DEBUG_SEGGER_RTT "Debug output to Segger RTT" OFF)
|
|||||||
option(DEBUG_WINDOWS "Turn on windows traces" OFF)
|
option(DEBUG_WINDOWS "Turn on windows traces" OFF)
|
||||||
option(DEBUG_YAML "Turn on YAML traces" OFF)
|
option(DEBUG_YAML "Turn on YAML traces" OFF)
|
||||||
option(DEBUG_LABELS "Turn on Labels 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(TEST_BUILD_WARNING "Warn this is a test build" OFF)
|
||||||
option(MODULE_PROTOCOL_FCC "Add support for FCC modules" ON)
|
option(MODULE_PROTOCOL_FCC "Add support for FCC modules" ON)
|
||||||
option(MODULE_PROTOCOL_LBT "Add support for EU/LBT 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
|
target_link_options(firmware PRIVATE
|
||||||
-lm -T${LINKER_DIR}/${LINKER_SCRIPT}
|
-lm -T${LINKER_DIR}/${LINKER_SCRIPT}
|
||||||
-Wl,-Map=firmware.map,--cref,--no-warn-mismatch,--gc-sections
|
-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)
|
if (DEFINED TARGET_FLASH_SIZE)
|
||||||
# message("TARGET_FLASH_SIZE = ${TARGET_FLASH_SIZE}")
|
# message("TARGET_FLASH_SIZE = ${TARGET_FLASH_SIZE}")
|
||||||
target_link_options(firmware PRIVATE
|
target_link_options(firmware PRIVATE
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ set(PPM_LIMITS_SYMETRICAL YES)
|
|||||||
set(USB_SERIAL ON CACHE BOOL "Enable USB serial (CDC)")
|
set(USB_SERIAL ON CACHE BOOL "Enable USB serial (CDC)")
|
||||||
set(ROTARY_ENCODER YES)
|
set(ROTARY_ENCODER YES)
|
||||||
set(HARDWARE_EXTERNAL_MODULE YES)
|
set(HARDWARE_EXTERNAL_MODULE YES)
|
||||||
|
set(NANO OFF)
|
||||||
|
|
||||||
# for size report script
|
# for size report script
|
||||||
set(CPU_TYPE_FULL STM32F429xI)
|
set(CPU_TYPE_FULL STM32F429xI)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ set(RTC_BACKUP_RAM YES)
|
|||||||
set(PPM_LIMITS_SYMETRICAL YES)
|
set(PPM_LIMITS_SYMETRICAL YES)
|
||||||
set(USB_SERIAL ON CACHE BOOL "Enable USB serial (CDC)")
|
set(USB_SERIAL ON CACHE BOOL "Enable USB serial (CDC)")
|
||||||
set(HARDWARE_EXTERNAL_MODULE YES)
|
set(HARDWARE_EXTERNAL_MODULE YES)
|
||||||
|
set(NANO OFF)
|
||||||
|
|
||||||
# for size report script
|
# for size report script
|
||||||
set(CPU_TYPE_FULL STM32F429xI)
|
set(CPU_TYPE_FULL STM32F429xI)
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ get_target_build_options() {
|
|||||||
BUILD_OPTIONS+="-DPCB=T15PRO"
|
BUILD_OPTIONS+="-DPCB=T15PRO"
|
||||||
;;
|
;;
|
||||||
tx15)
|
tx15)
|
||||||
BUILD_OPTIONS+="-DPCB=TX15 -DNANO=NO"
|
BUILD_OPTIONS+="-DPCB=TX15"
|
||||||
;;
|
;;
|
||||||
tx16s)
|
tx16s)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
||||||
@@ -156,10 +156,10 @@ get_target_build_options() {
|
|||||||
BUILD_OPTIONS+="-DPCB=PL18 -DPCBREV=NB4P"
|
BUILD_OPTIONS+="-DPCB=PL18 -DPCBREV=NB4P"
|
||||||
;;
|
;;
|
||||||
st16)
|
st16)
|
||||||
BUILD_OPTIONS+="-DPCB=ST16 -DNANO=NO"
|
BUILD_OPTIONS+="-DPCB=ST16"
|
||||||
;;
|
;;
|
||||||
pa01)
|
pa01)
|
||||||
BUILD_OPTIONS+="-DPCB=PA01 -DNANO=NO"
|
BUILD_OPTIONS+="-DPCB=PA01"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown target: $target_name"
|
echo "Unknown target: $target_name"
|
||||||
|
|||||||
Reference in New Issue
Block a user