From 9660f703081c0ef0cd59edb47a719dc7838c42ee Mon Sep 17 00:00:00 2001 From: janek Date: Sun, 8 Dec 2024 16:12:27 +0100 Subject: [PATCH] Enable USB Serial for EN on DFPlayer build --- radio/src/targets/common/arm/stm32/CMakeLists.txt | 5 +++++ tools/build-flysky.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/radio/src/targets/common/arm/stm32/CMakeLists.txt b/radio/src/targets/common/arm/stm32/CMakeLists.txt index 2243e3b46f..93d6f9f256 100644 --- a/radio/src/targets/common/arm/stm32/CMakeLists.txt +++ b/radio/src/targets/common/arm/stm32/CMakeLists.txt @@ -93,6 +93,11 @@ if(DEBUG OR CLI OR USB_SERIAL) ../common/arm/stm32/usbd_cdc.cpp ) add_definitions(-DUSB_SERIAL) + +#disable USB_SERIAL if it will exceed flash size +if ((NOT TRANSLATIONS STREQUAL EN) AND DFPLAYER STREQUAL YES AND USB_MSD STREQUAL YES AND PCBI6X_ELRS STREQUAL YES AND PCBI6X_INAV STREQUAL YES AND USB_SERIAL STREQUAL YES) + remove_definitions(-DUSB_SERIAL) +endif() endif() set(STM32USB_SRC ${STM32USB_SRC} diff --git a/tools/build-flysky.py b/tools/build-flysky.py index 2a6b70aac3..95187ff2fc 100755 --- a/tools/build-flysky.py +++ b/tools/build-flysky.py @@ -21,7 +21,7 @@ "PCBI6X_ELRS": "YES", "PCBI6X_INAV": "YES", "DFPLAYER": "YES", - "USB_SERIAL": "NO", + "USB_SERIAL": "YES", }, "I6X_HELI": { "HELI": "YES",