diff --git a/arch/risc-v/src/esp32c3-legacy/Bootloader.mk b/arch/risc-v/src/esp32c3-legacy/Bootloader.mk index 8ad3fd37dee4b..d4a3b6c5ba6b6 100644 --- a/arch/risc-v/src/esp32c3-legacy/Bootloader.mk +++ b/arch/risc-v/src/esp32c3-legacy/Bootloader.mk @@ -143,17 +143,17 @@ ifeq ($(CONFIG_ESP32C3_SECURE_BOOT_BUILD_SIGNED_BINARIES),y) echo ""; \ echo "$(RED)bootloader error:$(RST) Bootloader signing key $(BOLD)$(CONFIG_ESP32C3_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)$(RST) does not exist."; \ echo "Generate using:"; \ - echo " espsecure.py generate_signing_key --version 2 $(CONFIG_ESP32C3_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)"; \ + echo " espsecure generate_signing_key --version 2 $(CONFIG_ESP32C3_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)"; \ echo ""; \ exit 1; \ fi $(Q) echo "Signing Bootloader" - espsecure.py sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o $(BOOTLOADER_SIGNED_BIN) $(BOOTLOADER_BIN) + espsecure sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o $(BOOTLOADER_SIGNED_BIN) $(BOOTLOADER_BIN) else $(Q) echo "" $(Q) echo "$(YELLOW)Bootloader not signed. Sign the bootloader before flashing.$(RST)" $(Q) echo "To sign the bootloader, you can use this command:" - $(Q) echo " espsecure.py sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o mcuboot-esp32c3.signed.bin mcuboot-esp32c3.bin" + $(Q) echo " espsecure sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o mcuboot-esp32c3.signed.bin mcuboot-esp32c3.bin" $(Q) echo "" endif endif diff --git a/arch/xtensa/src/esp32/Bootloader.mk b/arch/xtensa/src/esp32/Bootloader.mk index 072abff7939fc..e7ba7bef59a37 100644 --- a/arch/xtensa/src/esp32/Bootloader.mk +++ b/arch/xtensa/src/esp32/Bootloader.mk @@ -178,17 +178,17 @@ ifeq ($(CONFIG_ESP32_SECURE_BOOT_BUILD_SIGNED_BINARIES),y) echo ""; \ echo "$(RED)bootloader error:$(RST) Bootloader signing key $(BOLD)$(CONFIG_ESP32_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)$(RST) does not exist."; \ echo "Generate using:"; \ - echo " espsecure.py generate_signing_key --version 2 $(CONFIG_ESP32_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)"; \ + echo " espsecure generate_signing_key --version 2 $(CONFIG_ESP32_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)"; \ echo ""; \ exit 1; \ fi $(Q) echo "Signing Bootloader" - espsecure.py sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o $(BOOTLOADER_SIGNED_BIN) $(BOOTLOADER_BIN) + espsecure sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o $(BOOTLOADER_SIGNED_BIN) $(BOOTLOADER_BIN) else $(Q) echo "" $(Q) echo "$(YELLOW)Bootloader not signed. Sign the bootloader before flashing.$(RST)" $(Q) echo "To sign the bootloader, you can use this command:" - $(Q) echo " espsecure.py sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o mcuboot-esp32.signed.bin mcuboot-esp32.bin" + $(Q) echo " espsecure sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o mcuboot-esp32.signed.bin mcuboot-esp32.bin" $(Q) echo "" endif endif diff --git a/arch/xtensa/src/esp32s2/Bootloader.mk b/arch/xtensa/src/esp32s2/Bootloader.mk index 1ea1889dc455a..cd066078aef8a 100644 --- a/arch/xtensa/src/esp32s2/Bootloader.mk +++ b/arch/xtensa/src/esp32s2/Bootloader.mk @@ -174,17 +174,17 @@ ifeq ($(CONFIG_ESP32S2_SECURE_BOOT_BUILD_SIGNED_BINARIES),y) echo ""; \ echo "$(RED)bootloader error:$(RST) Bootloader signing key $(BOLD)$(CONFIG_ESP32S2_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)$(RST) does not exist."; \ echo "Generate using:"; \ - echo " espsecure.py generate_signing_key --version 2 $(CONFIG_ESP32S2_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)"; \ + echo " espsecure generate_signing_key --version 2 $(CONFIG_ESP32S2_SECURE_BOOT_BOOTLOADER_SIGNING_KEY)"; \ echo ""; \ exit 1; \ fi $(Q) echo "Signing Bootloader" - espsecure.py sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o $(BOOTLOADER_SIGNED_BIN) $(BOOTLOADER_BIN) + espsecure sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o $(BOOTLOADER_SIGNED_BIN) $(BOOTLOADER_BIN) else $(Q) echo "" $(Q) echo "$(YELLOW)Bootloader not signed. Sign the bootloader before flashing.$(RST)" $(Q) echo "To sign the bootloader, you can use this command:" - $(Q) echo " espsecure.py sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o mcuboot-esp32s2.signed.bin mcuboot-esp32s2.bin" + $(Q) echo " espsecure sign_data --version 2 --keyfile $(BOOTLOADER_SIGN_KEY) -o mcuboot-esp32s2.signed.bin mcuboot-esp32s2.bin" $(Q) echo "" endif endif diff --git a/tools/esp32/Config.mk b/tools/esp32/Config.mk index d3aa9c654539f..4f2457554687f 100644 --- a/tools/esp32/Config.mk +++ b/tools/esp32/Config.mk @@ -156,7 +156,7 @@ define HELP_FLASH_BOOTLOADER $(Q) echo "" $(Q) echo "$(YELLOW)Security features enabled, so bootloader not flashed automatically.$(RST)" $(Q) echo "Use the following command to flash the bootloader:" - $(Q) echo " esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(FLASH_BL)" + $(Q) echo " esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(FLASH_BL)" $(Q) echo "" endef @@ -179,7 +179,7 @@ define MERGEBIN $(ESPTOOL_FLASH_OPTS) \ ) \ ) - esptool.py -c esp32 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS) + esptool -c esp32 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS) $(Q) echo nuttx.merged.bin >> nuttx.manifest $(Q) if [ "$(CONFIG_ESP32_QEMU_IMAGE)" = "y" ]; then \ @@ -236,7 +236,7 @@ define MKIMAGE echo "Missing Flash memory size configuration for the ESP32 chip."; \ exit 1; \ fi - esptool.py -c esp32 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx + esptool -c esp32 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin (ESP32 compatible)" endef @@ -263,7 +263,7 @@ define MKIMAGE exit 1; \ fi $(eval ELF2IMAGE_OPTS := $(if $(CONFIG_ESPRESSIF_SIMPLE_BOOT),--ram-only-header) -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)) - esptool.py -c esp32 elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx + esptool -c esp32 elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin" endef @@ -277,11 +277,11 @@ define POSTBUILD $(if $(CONFIG_ESP32_MERGE_BINS),$(call MERGEBIN)) endef -# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool.py +# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool ESPTOOL_BAUD ?= 921600 -# FLASH -- Download a binary image via esptool.py +# FLASH -- Download a binary image via esptool define FLASH $(Q) if [ -z $(ESPTOOL_PORT) ]; then \ @@ -291,7 +291,7 @@ define FLASH fi $(eval ESPTOOL_OPTS := -c esp32 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) $(ESPTOOL_RESET_OPTS)) - esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) + esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) $(if $(CONFIG_ESP32_SECURE_BOOT)$(CONFIG_ESP32_SECURE_FLASH_ENC_ENABLED),$(call HELP_FLASH_BOOTLOADER)) endef diff --git a/tools/esp32c3/Config.mk b/tools/esp32c3/Config.mk index 4d229b748b767..f8ca85bf23721 100644 --- a/tools/esp32c3/Config.mk +++ b/tools/esp32c3/Config.mk @@ -157,7 +157,7 @@ define HELP_FLASH_BOOTLOADER $(Q) echo "" $(Q) echo "$(YELLOW)Security features enabled, so bootloader not flashed automatically.$(RST)" $(Q) echo "Use the following command to flash the bootloader:" - $(Q) echo " esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(FLASH_BL)" + $(Q) echo " esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(FLASH_BL)" $(Q) echo "" endef @@ -174,7 +174,7 @@ define MERGEBIN echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \ exit 1; \ fi - esptool.py -c esp32c3 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS) + esptool -c esp32c3 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS) $(Q) echo nuttx.merged.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.merged.bin" endef @@ -226,7 +226,7 @@ define MKIMAGE echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \ exit 1; \ fi - esptool.py -c esp32c3 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx + esptool -c esp32c3 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin (ESP32-C3 compatible)" endef @@ -254,11 +254,11 @@ define POSTBUILD $(if $(CONFIG_ESP32C3_MERGE_BINS),$(call MERGEBIN)) endef -# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool.py +# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool ESPTOOL_BAUD ?= 921600 -# FLASH -- Download a binary image via esptool.py +# FLASH -- Download a binary image via esptool define FLASH $(Q) if [ -z $(ESPTOOL_PORT) ]; then \ @@ -268,7 +268,7 @@ define FLASH fi $(eval ESPTOOL_OPTS := -c esp32c3 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) $(ESPTOOL_RESET_OPTS) $(if $(CONFIG_ESP32C3_ESPTOOLPY_NO_STUB),--no-stub)) - esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) + esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) $(if $(CONFIG_ESP32C3_SECURE_BOOT)$(CONFIG_ESP32C3_SECURE_FLASH_ENC_ENABLED),$(call HELP_FLASH_BOOTLOADER)) endef diff --git a/tools/esp32s2/Config.mk b/tools/esp32s2/Config.mk index b79c4d4de2ebf..ba1e9c2451336 100644 --- a/tools/esp32s2/Config.mk +++ b/tools/esp32s2/Config.mk @@ -140,7 +140,7 @@ define HELP_FLASH_BOOTLOADER $(Q) echo "" $(Q) echo "$(YELLOW)Security features enabled, so bootloader not flashed automatically.$(RST)" $(Q) echo "Use the following command to flash the bootloader:" - $(Q) echo " esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(FLASH_BL)" + $(Q) echo " esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(FLASH_BL)" $(Q) echo "" endef @@ -157,7 +157,7 @@ define MERGEBIN echo "Missing Flash memory size configuration for the ESP32-S2 chip."; \ exit 1; \ fi - esptool.py -c esp32s2 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS) + esptool -c esp32s2 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS) $(Q) echo nuttx.merged.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.merged.bin" endef @@ -224,7 +224,7 @@ define MKIMAGE exit 1; \ fi $(eval ELF2IMAGE_OPTS := $(if $(CONFIG_ESPRESSIF_SIMPLE_BOOT),--ram-only-header) -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)) - esptool.py -c esp32s2 elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx + esptool -c esp32s2 elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin" endef @@ -238,11 +238,11 @@ define POSTBUILD $(if $(CONFIG_ESP32S2_MERGE_BINS),$(call MERGEBIN)) endef -# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool.py +# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool ESPTOOL_BAUD ?= 921600 -# FLASH -- Download a binary image via esptool.py +# FLASH -- Download a binary image via esptool define FLASH $(Q) if [ -z $(ESPTOOL_PORT) ]; then \ @@ -251,7 +251,7 @@ define FLASH exit 1; \ fi $(eval ESPTOOL_OPTS := -c esp32s2 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) $(ESPTOOL_RESET_OPTS) $(if $(CONFIG_ESP32S2_ESPTOOLPY_NO_STUB),--no-stub)) - esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) + esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) $(if $(CONFIG_ESP32S2_SECURE_BOOT)$(CONFIG_ESP32S2_SECURE_FLASH_ENC_ENABLED),$(call HELP_FLASH_BOOTLOADER)) endef diff --git a/tools/esp32s3/Config.mk b/tools/esp32s3/Config.mk index 9d2dbf980e704..a99f3e33f4be7 100644 --- a/tools/esp32s3/Config.mk +++ b/tools/esp32s3/Config.mk @@ -138,7 +138,7 @@ define MERGEBIN $(ESPTOOL_FLASH_OPTS) \ ) \ ) - esptool.py -c esp32s3 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS) + esptool -c esp32s3 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS) $(Q) echo nuttx.merged.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.merged.bin" endef @@ -153,7 +153,7 @@ define MKIMAGE echo "Missing Flash memory size configuration for the ESP32-S3 chip."; \ exit 1; \ fi - esptool.py -c esp32s3 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx + esptool -c esp32s3 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin (ESP32-S3 compatible)" endef @@ -180,7 +180,7 @@ define MKIMAGE exit 1; \ fi $(eval ELF2IMAGE_OPTS := $(if $(CONFIG_ESPRESSIF_SIMPLE_BOOT),--ram-only-header) -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)) - esptool.py -c esp32s3 elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx + esptool -c esp32s3 elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin" endef @@ -203,11 +203,11 @@ define POSTBUILD $(if $(CONFIG_ESP32S3_MERGE_BINS),$(call MERGEBIN)) endef -# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool.py +# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool ESPTOOL_BAUD ?= 921600 -# FLASH -- Download a binary image via esptool.py +# FLASH -- Download a binary image via esptool define FLASH $(Q) if [ -z $(ESPTOOL_PORT) ]; then \ @@ -216,5 +216,5 @@ define FLASH exit 1; \ fi $(eval ESPTOOL_OPTS := -c esp32s3 -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) $(if $(CONFIG_ESP32S3_ESPTOOLPY_NO_STUB),--no-stub)) - esptool.py $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) + esptool $(ESPTOOL_OPTS) write_flash $(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS) endef diff --git a/tools/espressif/Config.mk b/tools/espressif/Config.mk index 05db0ea923a34..ff79ce3f4f3e7 100644 --- a/tools/espressif/Config.mk +++ b/tools/espressif/Config.mk @@ -106,7 +106,7 @@ define MERGEBIN echo "Missing Flash memory size configuration."; \ exit 1; \ fi - esptool.py -c $(CHIP_SERIES) merge_bin --fill-flash-size $(FLASH_SIZE) --output nuttx.merged.bin $(ESPTOOL_BINS) + esptool -c $(CHIP_SERIES) merge_bin --fill-flash-size $(FLASH_SIZE) --output nuttx.merged.bin $(ESPTOOL_BINS) $(Q) echo nuttx.merged.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.merged.bin" endef @@ -136,7 +136,7 @@ define MKIMAGE exit 1; \ fi $(eval ELF2IMAGE_OPTS := $(if $(CONFIG_ESPRESSIF_SIMPLE_BOOT),--ram-only-header) -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)) - esptool.py -c $(CHIP_SERIES) elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx + esptool -c $(CHIP_SERIES) elf2image $(ELF2IMAGE_OPTS) -o nuttx.bin nuttx $(Q) echo nuttx.bin >> nuttx.manifest $(Q) echo "Generated: nuttx.bin" endef @@ -149,11 +149,11 @@ define POSTBUILD $(if $(CONFIG_ESPRESSIF_MERGE_BINS),$(call MERGEBIN)) endef -# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool.py +# ESPTOOL_BAUD -- Serial port baud rate used when flashing/reading via esptool ESPTOOL_BAUD ?= 921600 -# FLASH -- Download a binary image via esptool.py +# FLASH -- Download a binary image via esptool define FLASH $(Q) if [ -z $(ESPTOOL_PORT) ]; then \ @@ -164,5 +164,5 @@ define FLASH $(eval ESPTOOL_OPTS := -c $(CHIP_SERIES) -p $(ESPTOOL_PORT) -b $(ESPTOOL_BAUD) $(if $(CONFIG_ESPRESSIF_ESPTOOLPY_NO_STUB),--no-stub)) $(eval WRITEFLASH_OPTS := $(if $(CONFIG_ESPRESSIF_MERGE_BINS),$(ESPTOOL_WRITEFLASH_OPTS) 0x0 nuttx.merged.bin,$(ESPTOOL_WRITEFLASH_OPTS) $(ESPTOOL_BINS))) - esptool.py $(ESPTOOL_OPTS) write_flash $(WRITEFLASH_OPTS) + esptool $(ESPTOOL_OPTS) write_flash $(WRITEFLASH_OPTS) endef diff --git a/tools/espressif/check_esptool.py b/tools/espressif/check_esptool.py index e25d8e803550c..ca0efe157a8b5 100644 --- a/tools/espressif/check_esptool.py +++ b/tools/espressif/check_esptool.py @@ -55,13 +55,13 @@ def check_version(min_esptool_version: str) -> bool: False: package installed and up-to-date """ try: - # Run esptool.py version command + # Run esptool version command result = subprocess.run( - ["esptool.py", "version"], capture_output=True, text=True, check=True + ["esptool", "version"], capture_output=True, text=True, check=True ) version_str = result.stdout.strip() except (subprocess.CalledProcessError, FileNotFoundError): - print("esptool.py not found. Please run: 'pip install esptool'") + print("esptool not found. Please run: 'pip install esptool'") print("Run make again to create the nuttx.bin image.") return True diff --git a/tools/espressif/chip_info.py b/tools/espressif/chip_info.py index 5a67115881439..cf9c0a5abd352 100644 --- a/tools/espressif/chip_info.py +++ b/tools/espressif/chip_info.py @@ -56,7 +56,7 @@ def get_python_modules(): def run_espressif_tool(cmd): - tool = "esptool.py" + tool = "esptool" strings_out = "" command = "{} {}".format(tool, cmd)