[build] Fix building with semihosting enabled (#7206)
commitde8ed12570fb035c315a2f4e8c84e5384e2f2008
authorAlberto García Hierro <alberto@garciahierro.com>
Tue, 17 Dec 2019 07:20:41 +0000 (17 07:20 +0000)
committerBertrand Songis <bsongis@gmail.com>
Tue, 17 Dec 2019 07:20:41 +0000 (17 08:20 +0100)
tree849077f39467600295a2c388ae16ac29ac72d068
parent16c9a92f497819d1d5b8307a5bb6a29cba428fb9
[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