diff --git a/boards/xtensa/esp32/common/Kconfig b/boards/xtensa/esp32/common/Kconfig index bd3e8621f1e..944e54cbf8a 100644 --- a/boards/xtensa/esp32/common/Kconfig +++ b/boards/xtensa/esp32/common/Kconfig @@ -2,6 +2,15 @@ # For a description of the syntax of this configuration file, # see the file kconfig-language.txt in the NuttX tools repository. # +config ESP32_MERGE_BINS + bool "Merge raw binary files into a single file" + default n + ---help--- + Merge the raw binary files into a single file for flashing to the + device. + This is only useful when the path to binary files (e.g. bootloader) + is provided via the ESPTOOL_BINDIR variable. + config ESP32_QEMU_IMAGE bool "ESP32 binary image for QEMU" default n diff --git a/tools/esp32/Config.mk b/tools/esp32/Config.mk index 21740c0b20e..dcbeae2c1c0 100644 --- a/tools/esp32/Config.mk +++ b/tools/esp32/Config.mk @@ -104,6 +104,30 @@ else MK_QEMU_IMG= endif +# MERGEBIN -- Merge raw binary files into a single file + +ifeq ($(CONFIG_ESP32_MERGE_BINS),y) +define MERGEBIN + $(Q) if [ -z $(ESPTOOL_BINDIR) ]; then \ + echo "MERGEBIN error: Missing argument for binary files directory."; \ + echo "USAGE: make ESPTOOL_BINDIR=