From f755a0371de36d4b2a88786ccc8064350d23c740 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Mon, 3 Sep 2018 11:42:10 +0200 Subject: [PATCH] Use check_python_dependencies everywhere as order-only-prerequisite --- components/app_update/Makefile.projbuild | 2 +- components/bootloader/Makefile.projbuild | 2 +- components/esptool_py/Makefile.projbuild | 10 +++++----- components/partition_table/Makefile.projbuild | 4 ++-- make/project.mk | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/app_update/Makefile.projbuild b/components/app_update/Makefile.projbuild index a21e047b8b..f4cf1d0555 100644 --- a/components/app_update/Makefile.projbuild +++ b/components/app_update/Makefile.projbuild @@ -49,7 +49,7 @@ $(BLANK_OTA_DATA_FILE): partition_table_get_info blank_ota_data: $(BLANK_OTA_DATA_FILE) -erase_ota: partition_table_get_info check_python_dependencies +erase_ota: partition_table_get_info | check_python_dependencies @echo $(if $(OTA_DATA_OFFSET), "Erase ota_data [addr=$(OTA_DATA_OFFSET) size=$(OTA_DATA_SIZE)] ...", $(error "ERROR: Partition table does not have ota_data partition.")) $(ESPTOOLPY_SERIAL) erase_region $(OTA_DATA_OFFSET) $(OTA_DATA_SIZE) diff --git a/components/bootloader/Makefile.projbuild b/components/bootloader/Makefile.projbuild index d8fa2a5ca4..ba8855c274 100644 --- a/components/bootloader/Makefile.projbuild +++ b/components/bootloader/Makefile.projbuild @@ -56,7 +56,7 @@ bootloader: $(BOOTLOADER_BIN) | check_python_dependencies ESPTOOL_ALL_FLASH_ARGS += $(BOOTLOADER_OFFSET) $(BOOTLOADER_BIN) -bootloader-flash: $(BOOTLOADER_BIN) $(call prereq_if_explicit,erase_flash) check_python_dependencies +bootloader-flash: $(BOOTLOADER_BIN) $(call prereq_if_explicit,erase_flash) | check_python_dependencies $(ESPTOOLPY_WRITE_FLASH) 0x1000 $^ else ifdef CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH diff --git a/components/esptool_py/Makefile.projbuild b/components/esptool_py/Makefile.projbuild index 5e082a2e9b..c3ce445ddd 100644 --- a/components/esptool_py/Makefile.projbuild +++ b/components/esptool_py/Makefile.projbuild @@ -58,14 +58,14 @@ APP_BIN_UNSIGNED ?= $(APP_BIN) $(APP_BIN_UNSIGNED): $(APP_ELF) $(ESPTOOLPY_SRC) | check_python_dependencies $(ESPTOOLPY) elf2image $(ESPTOOL_FLASH_OPTIONS) $(ESPTOOL_ELF2IMAGE_OPTIONS) -o $@ $< -flash: all_binaries $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) partition_table_get_info check_python_dependencies +flash: all_binaries $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) partition_table_get_info | check_python_dependencies @echo "Flashing binaries to serial port $(ESPPORT) (app at offset $(APP_OFFSET))..." ifdef CONFIG_SECURE_BOOT_ENABLED @echo "(Secure boot enabled, so bootloader not flashed automatically. See 'make bootloader' output)" endif $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS) -app-flash: $(APP_BIN) $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) partition_table_get_info check_python_dependencies +app-flash: $(APP_BIN) $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) partition_table_get_info | check_python_dependencies @echo "Flashing app to serial port $(ESPPORT), offset $(APP_OFFSET)..." $(ESPTOOLPY_WRITE_FLASH) $(APP_OFFSET) $(APP_BIN) @@ -73,7 +73,7 @@ app-flash: $(APP_BIN) $(ESPTOOLPY_SRC) $(call prereq_if_explicit,erase_flash) pa # at the project level as long as qualified path COMPONENT_SUBMODULES += $(COMPONENT_PATH)/esptool -erase_flash: check_python_dependencies +erase_flash: | check_python_dependencies @echo "Erasing entire flash..." $(ESPTOOLPY_SERIAL) erase_flash @@ -90,14 +90,14 @@ endif # note: if you want to run miniterm from command line, can simply run # miniterm.py on the console. The '$(PYTHON) -m serial.tools.miniterm' # is to allow for the $(PYTHON) variable overriding the python path. -simple_monitor: check_python_dependencies $(call prereq_if_explicit,%flash) +simple_monitor: $(call prereq_if_explicit,%flash) | check_python_dependencies $(MONITOR_PYTHON) -m serial.tools.miniterm --rts 0 --dtr 0 --raw $(ESPPORT) $(MONITORBAUD) PRINT_FILTER ?= MONITOR_OPTS := --baud $(MONITORBAUD) --port $(ESPPORT) --toolchain-prefix $(CONFIG_TOOLPREFIX) --make "$(MAKE)" --print_filter "$(PRINT_FILTER)" -monitor: check_python_dependencies $(call prereq_if_explicit,%flash) +monitor: $(call prereq_if_explicit,%flash) | check_python_dependencies $(summary) MONITOR [ -f $(APP_ELF) ] || echo "*** 'make monitor' target requires an app to be compiled and flashed first." [ -f $(APP_ELF) ] || echo "*** Run 'make flash monitor' to build, flash and monitor" diff --git a/components/partition_table/Makefile.projbuild b/components/partition_table/Makefile.projbuild index 5d04636b1a..db60ee7381 100644 --- a/components/partition_table/Makefile.projbuild +++ b/components/partition_table/Makefile.projbuild @@ -76,7 +76,7 @@ export OTA_DATA_SIZE PARTITION_TABLE_FLASH_CMD = $(ESPTOOLPY_SERIAL) write_flash $(PARTITION_TABLE_OFFSET) $(PARTITION_TABLE_BIN) ESPTOOL_ALL_FLASH_ARGS += $(PARTITION_TABLE_OFFSET) $(PARTITION_TABLE_BIN) -partition_table: $(PARTITION_TABLE_BIN) partition_table_get_info check_python_dependencies +partition_table: $(PARTITION_TABLE_BIN) partition_table_get_info | check_python_dependencies @echo "Partition table binary generated. Contents:" @echo $(SEPARATOR) $(GEN_ESP32PART) $< @@ -84,7 +84,7 @@ partition_table: $(PARTITION_TABLE_BIN) partition_table_get_info check_python_de @echo "Partition flashing command:" @echo "$(PARTITION_TABLE_FLASH_CMD)" -partition_table-flash: $(PARTITION_TABLE_BIN) check_python_dependencies +partition_table-flash: $(PARTITION_TABLE_BIN) | check_python_dependencies @echo "Flashing partition table..." $(PARTITION_TABLE_FLASH_CMD) diff --git a/make/project.mk b/make/project.mk index f3ceeba1a0..364f729706 100644 --- a/make/project.mk +++ b/make/project.mk @@ -13,7 +13,7 @@ .PHONY: build-components menuconfig defconfig all build clean all_binaries check-submodules size size-components size-files size-symbols list-components MAKECMDGOALS ?= all -all: all_binaries check_python_dependencies +all: all_binaries | check_python_dependencies # see below for recipe of 'all' target # # # other components will add dependencies to 'all_binaries'. The @@ -485,16 +485,16 @@ app-clean: $(addprefix component-,$(addsuffix -clean,$(notdir $(COMPONENT_PATHS) $(summary) RM $(APP_ELF) rm -f $(APP_ELF) $(APP_BIN) $(APP_MAP) -size: check_python_dependencies $(APP_ELF) +size: $(APP_ELF) | check_python_dependencies $(PYTHON) $(IDF_PATH)/tools/idf_size.py $(APP_MAP) -size-files: check_python_dependencies $(APP_ELF) +size-files: $(APP_ELF) | check_python_dependencies $(PYTHON) $(IDF_PATH)/tools/idf_size.py --files $(APP_MAP) -size-components: check_python_dependencies $(APP_ELF) +size-components: $(APP_ELF) | check_python_dependencies $(PYTHON) $(IDF_PATH)/tools/idf_size.py --archives $(APP_MAP) -size-symbols: check_python_dependencies $(APP_ELF) +size-symbols: $(APP_ELF) | check_python_dependencies ifndef COMPONENT $(error "ERROR: Please enter the component to look symbols for, e.g. COMPONENT=heap") else