mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 04:47:47 +08:00
tools/espressif: add esptool version check to Espressif build system
This commit is contained in:
committed by
Alin Jerpelea
parent
9d9857acd2
commit
5592145dc7
@@ -68,6 +68,8 @@ ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
|
||||
|
||||
# Configure the variables according to build environment
|
||||
|
||||
ESPTOOL_MIN_VERSION := 4.8.0
|
||||
|
||||
ifdef ESPTOOL_BINDIR
|
||||
ifeq ($(CONFIG_ESP32C3_APP_FORMAT_LEGACY),y)
|
||||
BL_OFFSET := 0x0
|
||||
@@ -162,6 +164,7 @@ endef
|
||||
# MERGEBIN -- Merge raw binary files into a single file
|
||||
|
||||
define MERGEBIN
|
||||
@python3 tools/espressif/check_esptool.py -v $(ESPTOOL_MIN_VERSION)
|
||||
$(Q) if [ -z $(ESPTOOL_BINDIR) ]; then \
|
||||
echo "MERGEBIN error: Missing argument for binary files directory."; \
|
||||
echo "USAGE: make ESPTOOL_BINDIR=<dir>"; \
|
||||
@@ -218,13 +221,7 @@ else
|
||||
ifeq ($(CONFIG_ESP32C3_APP_FORMAT_LEGACY),y)
|
||||
define MKIMAGE
|
||||
$(Q) echo "MKIMAGE: ESP32-C3 binary"
|
||||
$(Q) if ! esptool.py version 1>/dev/null 2>&1; then \
|
||||
echo ""; \
|
||||
echo "esptool.py not found. Please run: \"pip install esptool==4.8.dev4\""; \
|
||||
echo ""; \
|
||||
echo "Run make again to create the nuttx.bin image."; \
|
||||
exit 1; \
|
||||
fi
|
||||
@python3 tools/espressif/check_esptool.py -v $(ESPTOOL_MIN_VERSION)
|
||||
$(Q) if [ -z $(FLASH_SIZE) ]; then \
|
||||
echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \
|
||||
exit 1; \
|
||||
|
||||
Reference in New Issue
Block a user