diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index 4a7b2b27b8..c70b55cb1e 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -104,10 +104,16 @@ else OOCD_BOARD = $($(TARGET).OOCD_BOARD) endif -ifndef NO_LUFTBOOT +# default: assume the luftboot bootloader is used +# if luftboot is not used define NO_LUFTBOOT to a value != 0 OOCD_START_SECTOR = 4 -else +ASSUMING_LUFTBOOT = "yes" +ifdef NO_LUFTBOOT +$(shell echo luftboot: $(NO_LUFTBOOT)) +ifneq ($(NO_LUFTBOOT),0) OOCD_START_SECTOR = 0 +ASSUMING_LUFTBOOT = "no" +endif endif # input files @@ -272,6 +278,7 @@ upload: $(OBJDIR)/$(TARGET).bin else ifeq ($(FLASH_MODE),JTAG) ifeq ($(BMP_PORT),) upload: $(OBJDIR)/$(TARGET).hex + @echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)" @echo "Using OOCD = $(OOCD)" @echo " OOCD\t$<" $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \ diff --git a/conf/boards/lisa_m_1.0.makefile b/conf/boards/lisa_m_1.0.makefile index b74fdb3303..a4d9b33f69 100644 --- a/conf/boards/lisa_m_1.0.makefile +++ b/conf/boards/lisa_m_1.0.makefile @@ -8,7 +8,9 @@ BOARD=lisa_m BOARD_VERSION=1.0 BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" +ifndef NO_LUFTBOOT NO_LUFTBOOT=1 +endif ARCH=stm32 $(TARGET).ARCHDIR = $(ARCH)