call make bootloader from make

This commit is contained in:
David Holdeman 2024-02-03 19:06:33 -06:00 committed by rusefillc
parent f77ea47981
commit 14c38631c6
3 changed files with 5 additions and 11 deletions

View File

@ -46,7 +46,7 @@ endif
# C++ specific options here (added to USE_OPT). # C++ specific options here (added to USE_OPT).
ifeq ($(USE_CPPOPT),) ifeq ($(USE_CPPOPT),)
# constexpr float expf_taylor_impl probably needs just c++14 but why not go with 17? # 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 # gcc-10 c++ 20 depricated uses of volatile errors
USE_CPPOPT += -Wno-deprecated USE_CPPOPT += -Wno-deprecated
endif endif

View File

@ -12,6 +12,7 @@ BUNDLEFILES = \
$(BOUTS) $(BOUTS)
ifeq ($(USE_OPENBLT),yes) ifeq ($(USE_OPENBLT),yes)
BOOTLOADER_BIN = bootloader/blbuild/openblt_$(PROJECT_BOARD).bin
BOOTLOADER_HEX = bootloader/blbuild/openblt_$(PROJECT_BOARD).hex BOOTLOADER_HEX = bootloader/blbuild/openblt_$(PROJECT_BOARD).hex
BOUTS = deliver/openblt.bin BOUTS = deliver/openblt.bin
else else
@ -21,6 +22,9 @@ ifeq ($(INCLUDE_ELF),yes)
endif endif
endif endif
$(BOOTLOADER_HEX) $(BOOTLOADER_BIN) &:
$(MAKE) -C bootloader -r
$(BUILDDIR)/$(PROJECT).map: $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).map: $(BUILDDIR)/$(PROJECT).elf
$(OUTS): deliver/%: $(BUILDDIR)/% $(OUTS): deliver/%: $(BUILDDIR)/%

View File

@ -20,16 +20,6 @@ echo "Entering $SCRIPT_NAME with board [$PROJECT_BOARD] and CPU [$PROJECT_CPU] a
mkdir -p .dep 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' # todo: start using env variable for number of threads or for '-r'
make bundle -j$(nproc) -r make bundle -j$(nproc) -r