mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
build: Replace 'make download' with 'make flash'
This commit is contained in:
committed by
Gustavo Henrique Nihei
parent
a7d8d9dd98
commit
e0389ce1fb
+8
-5
@@ -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
@@ -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
|
||||
#
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user