mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
make: 'make all' default target builds everything, 'make flash' flashes everything
Also added 'make help' target which prints some useful usage summary.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#
|
||||
|
||||
BOOTLOADER_COMPONENT_PATH := $(COMPONENT_PATH)
|
||||
EXTRA_CLEAN_TARGETS += bootloader-clean
|
||||
BOOTLOADER_BUILD_DIR=$(BUILD_DIR_BASE)/bootloader
|
||||
BOOTLOADER_BIN=$(BOOTLOADER_BUILD_DIR)/bootloader.bin
|
||||
|
||||
@@ -23,7 +22,7 @@ $(BOOTLOADER_BIN): $(COMPONENT_PATH)/src/sdkconfig
|
||||
LDFLAGS= \
|
||||
CFLAGS= \
|
||||
BUILD_DIR_BASE=$(BOOTLOADER_BUILD_DIR) \
|
||||
make -C $(BOOTLOADER_COMPONENT_PATH)/src MAKEFLAGS= V=$(V) TARGET_BIN_LAYOUT="$(BOOTLOADER_TARGET_BIN_LAYOUT)"
|
||||
make -C $(BOOTLOADER_COMPONENT_PATH)/src MAKEFLAGS= V=$(V) TARGET_BIN_LAYOUT="$(BOOTLOADER_TARGET_BIN_LAYOUT)" $(BOOTLOADER_BIN)
|
||||
|
||||
bootloader-clean:
|
||||
$(Q) PROJECT_PATH= \
|
||||
@@ -34,10 +33,16 @@ bootloader-clean:
|
||||
BUILD_DIR_BASE=$(BOOTLOADER_BUILD_DIR) \
|
||||
make -C $(BOOTLOADER_COMPONENT_PATH)/src clean MAKEFLAGS= V=$(V)
|
||||
|
||||
clean: bootloader-clean
|
||||
|
||||
bootloader: $(BOOTLOADER_BIN)
|
||||
@echo "Bootloader built. Default flash command is:"
|
||||
@echo "$(ESPTOOLPY_SERIAL) write_flash 0x1000 $(BOOTLOADER_BIN)"
|
||||
|
||||
all_binaries: $(BOOTLOADER_BIN)
|
||||
|
||||
ESPTOOL_ALL_FLASH_ARGS += 0x1000 $(BOOTLOADER_BIN)
|
||||
|
||||
# synchronise the project level config to the component's
|
||||
# config
|
||||
$(COMPONENT_PATH)/src/sdkconfig: $(PROJECT_PATH)/sdkconfig
|
||||
|
@@ -10,6 +10,3 @@ COMPONENTS := esptool_py
|
||||
#adding it in the main/Makefile directory.
|
||||
|
||||
include $(SDK_PATH)/make/project.mk
|
||||
|
||||
# override configured app offset, as bootloader "app" is at 0x1000
|
||||
CONFIG_APP_OFFSET := 0x1000
|
||||
|
Reference in New Issue
Block a user