Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arch/risc-v/src/esp32c3-legacy/Bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions arch/xtensa/src/esp32/Bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions arch/xtensa/src/esp32s2/Bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions tools/esp32/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -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
12 changes: 6 additions & 6 deletions tools/esp32c3/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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
12 changes: 6 additions & 6 deletions tools/esp32s2/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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
12 changes: 6 additions & 6 deletions tools/esp32s3/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -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
10 changes: 5 additions & 5 deletions tools/espressif/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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
6 changes: 3 additions & 3 deletions tools/espressif/check_esptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tools/espressif/chip_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_python_modules():


def run_espressif_tool(cmd):
tool = "esptool.py"
tool = "esptool"
strings_out = ""
command = "{} {}".format(tool, cmd)

Expand Down
Loading