From de8ed12570fb035c315a2f4e8c84e5384e2f2008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garc=C3=ADa=20Hierro?= Date: Tue, 17 Dec 2019 07:20:41 +0000 Subject: [PATCH] [build] Fix building with semihosting enabled (#7206) Remove -DSEMIHOSTING from the bootloader CFLAGS unconditionally. -DSEMIHOSTING is passed to the bootloader by the parent project when SEMIHOSTING=ON, however the bootloader wouldn't fit on flash with semihosting enabled. If we leave the -DSEMIHOSTING flag, we would get a compilation error on non-horus radios (since -DDEBUG is removed) and a link time error on horus (since the bootloader won't fit in its allocated flash region). --- radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt b/radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt index 8e4e8160a..5bc11cc2d 100644 --- a/radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt +++ b/radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt @@ -134,6 +134,7 @@ endif() remove_definitions(-DDISK_CACHE) remove_definitions(-DLUA) remove_definitions(-DCLI) +remove_definitions(-DSEMIHOSTING) remove_definitions(-DUSB_SERIAL) remove_definitions(-DWATCHDOG)