diff --git a/boards/xtensa/esp32s3/common/Kconfig b/boards/xtensa/esp32s3/common/Kconfig index 97c7c69bd0..47c74d0432 100644 --- a/boards/xtensa/esp32s3/common/Kconfig +++ b/boards/xtensa/esp32s3/common/Kconfig @@ -12,6 +12,13 @@ config ESP32S3_MERGE_BINS This is only useful when the path to binary files (e.g. bootloader) is provided via the ESPTOOL_BINDIR variable. +config ESP32S3_QEMU_IMAGE + bool "ESP32S3 binary image for QEMU" + default n + select ESP32S3_MERGE_BINS + ---help--- + Create a binary flash image used for QEMU. + config ESP32S3_SPEED_UP_ISR bool "Speed up ISR" default n diff --git a/tools/esp32s3/Config.mk b/tools/esp32s3/Config.mk index 3ca37ea260..8b44cace29 100644 --- a/tools/esp32s3/Config.mk +++ b/tools/esp32s3/Config.mk @@ -127,7 +127,13 @@ define MERGEBIN echo "Missing Flash memory size configuration for the ESP32-S3 chip."; \ exit 1; \ fi - esptool.py -c esp32s3 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS) + $(eval ESPTOOL_MERGEBIN_OPTS := \ + $(if $(CONFIG_ESP32S3_QEMU_IMAGE), \ + --fill-flash-size $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ), \ + $(ESPTOOL_FLASH_OPTS) \ + ) \ + ) + esptool.py -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