build: Replace 'make download' with 'make flash'

This commit is contained in:
Alan C. Assis
2021-10-14 10:57:21 -03:00
committed by Gustavo Henrique Nihei
parent a7d8d9dd98
commit e0389ce1fb
11 changed files with 40 additions and 34 deletions
+8 -5
View File
@@ -449,15 +449,18 @@ ifeq ($(CONFIG_UBOOT_UIMAGE),y)
endif
$(call POSTBUILD, $(TOPDIR))
# download
# flash (or download : DEPRECATED)
#
# This is a helper target that will rebuild NuttX and download it to the target
# This is a helper target that will rebuild NuttX and flash it to the target
# system in one step. The operation of this target depends completely upon
# implementation of the DOWNLOAD command in the user Make.defs file. It will
# generate an error if the DOWNLOAD command is not defined.
# implementation of the FLASH command in the user Make.defs file. It will
# generate an error if the FLASH command is not defined.
flash: $(BIN)
$(call FLASH, $<)
download: $(BIN)
$(call DOWNLOAD, $<)
$(call FLASH, $<)
# bootloader
#
+8 -5
View File
@@ -408,15 +408,18 @@ ifeq ($(CONFIG_RAW_BINARY),y)
endif
$(call POSTBUILD, $(TOPDIR))
# download
# flash (or download : DEPRECATED)
#
# This is a helper target that will rebuild NuttX and download it to the target
# This is a helper target that will rebuild NuttX and flash it to the target
# system in one step. The operation of this target depends completely upon
# implementation of the DOWNLOAD command in the user Make.defs file. It will
# generate an error an error if the DOWNLOAD command is not defined.
# implementation of the FLASH command in the user Make.defs file. It will
# generate an error if the FLASH command is not defined.
flash: $(BIN)
$(call FLASH, $<)
download: $(BIN)
$(call DOWNLOAD, $<)
$(call FLASH, $<)
# bootloader
#
+4 -4
View File
@@ -188,12 +188,12 @@ endif
ESPTOOL_BAUD ?= 921600
# DOWNLOAD -- Download binary image via esptool.py
# FLASH -- Download a binary image via esptool.py
define DOWNLOAD
define FLASH
$(Q) if [ -z $(ESPTOOL_PORT) ]; then \
echo "DOWNLOAD error: Missing serial port device argument."; \
echo "USAGE: make download ESPTOOL_PORT=<port> [ ESPTOOL_BAUD=<baud> ] [ ESPTOOL_BINDIR=<dir> ]"; \
echo "FLASH error: Missing serial port device argument."; \
echo "USAGE: make flash ESPTOOL_PORT=<port> [ ESPTOOL_BAUD=<baud> ] [ ESPTOOL_BINDIR=<dir> ]"; \
exit 1; \
fi
esptool.py -c esp32 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS)
+4 -4
View File
@@ -181,12 +181,12 @@ endif
ESPTOOL_BAUD ?= 921600
# DOWNLOAD -- Download binary image via esptool.py
# FLASH -- Download a binary image via esptool.py
define DOWNLOAD
define FLASH
$(Q) if [ -z $(ESPTOOL_PORT) ]; then \
echo "DOWNLOAD error: Missing serial port device argument."; \
echo "USAGE: make download ESPTOOL_PORT=<port> [ ESPTOOL_BAUD=<baud> ]"; \
echo "FLASH error: Missing serial port device argument."; \
echo "USAGE: make flash ESPTOOL_PORT=<port> [ ESPTOOL_BAUD=<baud> ]"; \
exit 1; \
fi
esptool.py -c esp32c3 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS)
+4 -4
View File
@@ -181,12 +181,12 @@ endif
ESPTOOL_BAUD ?= 921600
# DOWNLOAD -- Download binary image via esptool.py
# FLASH -- Download a binary image via esptool.py
define DOWNLOAD
define FLASH
$(Q) if [ -z $(ESPTOOL_PORT) ]; then \
echo "DOWNLOAD error: Missing serial port device argument."; \
echo "USAGE: make download ESPTOOL_PORT=<port> [ ESPTOOL_BAUD=<baud> ] [ ESPTOOL_BINDIR=<dir> ]"; \
echo "FLASH error: Missing serial port device argument."; \
echo "USAGE: make flash ESPTOOL_PORT=<port> [ ESPTOOL_BAUD=<baud> ] [ ESPTOOL_BINDIR=<dir> ]"; \
exit 1; \
fi
esptool.py -c esp32s2 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS)