build system: Fix bug where erase_flash was always invoked for flash

Order-only prerequisites do not work for phony targets!
This commit is contained in:
Angus Gratton
2016-12-22 16:32:19 +11:00
parent a760eb3980
commit abb7668af7
4 changed files with 20 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ bootloader: $(BOOTLOADER_BIN)
ESPTOOL_ALL_FLASH_ARGS += $(BOOTLOADER_OFFSET) $(BOOTLOADER_BIN)
bootloader-flash: $(BOOTLOADER_BIN) | erase_flash
bootloader-flash: $(BOOTLOADER_BIN) $(call prereq_if_explicit,erase_flash)
$(ESPTOOLPY_WRITE_FLASH) 0x1000 $^
else ifdef CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH