Fix Makefile order dependency issue causing non-parallel to fail.
@@ -537,13 +537,7 @@ $(BUILD):
$(FW_DIR):
$(MKDIR) -p $@
-BOOTLOADER_OBJS: FIRMWARE_OBJS
- $(MAKE) -C $(BOOTLDR_DIR) BUILD=$(BUILD)/$(BOOTLDR_DIR) CFLAGS="$(BOOTLDR_CFLAGS) -MMD"
-
-UVC_OBJS: FIRMWARE_OBJS
- $(MAKE) -C $(UVC_DIR) BUILD=$(BUILD)/$(UVC_DIR) CFLAGS="$(UVC_CFLAGS) -MMD"
-
-FIRMWARE_OBJS:
+FIRMWARE_OBJS: | $(BUILD) $(FW_DIR)
$(MAKE) -C $(CMSIS_DIR) BUILD=$(BUILD)/$(CMSIS_DIR) CFLAGS="$(CFLAGS) -fno-strict-aliasing -MMD"
$(MAKE) -C $(STHAL_DIR) BUILD=$(BUILD)/$(STHAL_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(MICROPY_DIR)/ports/stm32 BUILD=$(BUILD)/$(MICROPY_DIR) BOARD=$(TARGET) QSTR_DEFS="$(OMV_QSTR_DEFS)"
@@ -555,6 +549,12 @@ ifeq ($(CUBEAI), 1)
$(MAKE) -C $(CUBEAI_DIR) BUILD=$(BUILD)/$(CUBEAI_DIR) CFLAGS="$(CFLAGS) -fno-strict-aliasing -MMD"
endif
+UVC_OBJS: FIRMWARE_OBJS
+ $(MAKE) -C $(UVC_DIR) BUILD=$(BUILD)/$(UVC_DIR) CFLAGS="$(UVC_CFLAGS) -MMD"
+
+BOOTLOADER_OBJS: FIRMWARE_OBJS
+ $(MAKE) -C $(BOOTLDR_DIR) BUILD=$(BUILD)/$(BOOTLDR_DIR) CFLAGS="$(BOOTLDR_CFLAGS) -MMD"
+
# This target generates the main/app firmware image located at 0x08010000
$(FIRMWARE): FIRMWARE_OBJS
$(CPP) -P -E -I$(OMV_BOARD_CONFIG_DIR) $(OMV_DIR)/stm32fxxx.ld.S > $(BUILD)/stm32fxxx.lds
@@ -580,7 +580,7 @@ $(UVC): FIRMWARE_OBJS UVC_OBJS
$(PYTHON) $(MKDFU) -b $(MAIN_APP_ADDR):$(FW_DIR)/$(UVC).bin $(FW_DIR)/$(UVC).dfu
# This target generates a combined bootloader+main firmware image.
-$(OPENMV): $(BOOTLOADER) $(UVC) $(FIRMWARE) | $(BUILD) $(FW_DIR)
+$(OPENMV): $(BOOTLOADER) $(UVC) $(FIRMWARE)
$(CAT) $(FW_DIR)/$(BOOTLOADER).bin $(FW_DIR)/$(FIRMWARE).bin > $(FW_DIR)/$(OPENMV).bin
$(PYTHON) $(MKDFU) -b 0x08000000:$(FW_DIR)/$(BOOTLOADER).bin -b $(MAIN_APP_ADDR):$(FW_DIR)/$(FIRMWARE).bin $(FW_DIR)/$(OPENMV).dfu
$(SIZE) $(FW_DIR)/$(BOOTLOADER).elf
