diff --git a/firmware/bootloader/Makefile b/firmware/bootloader/Makefile index 8ae29fd87f..ed84adad30 100644 --- a/firmware/bootloader/Makefile +++ b/firmware/bootloader/Makefile @@ -46,7 +46,7 @@ endif # C++ specific options here (added to USE_OPT). ifeq ($(USE_CPPOPT),) # constexpr float expf_taylor_impl probably needs just c++14 but why not go with 17? - USE_CPPOPT = -std=c++20 -Wno-register -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits -Winvalid-pch + USE_CPPOPT = -std=c++20 -Wno-register -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits # gcc-10 c++ 20 depricated uses of volatile errors USE_CPPOPT += -Wno-deprecated endif diff --git a/firmware/bundle.mk b/firmware/bundle.mk index 007849dff5..5d979075c0 100644 --- a/firmware/bundle.mk +++ b/firmware/bundle.mk @@ -12,6 +12,7 @@ BUNDLEFILES = \ $(BOUTS) ifeq ($(USE_OPENBLT),yes) + BOOTLOADER_BIN = bootloader/blbuild/openblt_$(PROJECT_BOARD).bin BOOTLOADER_HEX = bootloader/blbuild/openblt_$(PROJECT_BOARD).hex BOUTS = deliver/openblt.bin else @@ -21,6 +22,9 @@ ifeq ($(INCLUDE_ELF),yes) endif endif +$(BOOTLOADER_HEX) $(BOOTLOADER_BIN) &: + $(MAKE) -C bootloader -r + $(BUILDDIR)/$(PROJECT).map: $(BUILDDIR)/$(PROJECT).elf $(OUTS): deliver/%: $(BUILDDIR)/% diff --git a/firmware/config/boards/common_script.sh b/firmware/config/boards/common_script.sh index ee4b7fa1af..e1516f436f 100644 --- a/firmware/config/boards/common_script.sh +++ b/firmware/config/boards/common_script.sh @@ -20,16 +20,6 @@ echo "Entering $SCRIPT_NAME with board [$PROJECT_BOARD] and CPU [$PROJECT_CPU] a mkdir -p .dep -if [ "$USE_OPENBLT" = "yes" ]; then - # TODO: why is this rm necessary? - # TODO: probably make/gcc do not like two separate projects (primary firmware and bootloader) co-existing in same folder structure? - cd bootloader - make -j$(nproc) - cd .. - [ -e bootloader/blbuild/openblt_$PROJECT_BOARD.hex ] || { echo "FAILED to compile OpenBLT by $SCRIPT_NAME with $PROJECT_BOARD"; exit 1; } -fi - -rm -f pch/pch.h.gch/* # todo: start using env variable for number of threads or for '-r' make bundle -j$(nproc) -r