File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ else ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
130130 IMGTOOL_SIGN_ARGS := --pad $(VERIFIED) $(IMGTOOL_ALIGN_ARGS) -v 0 -s auto \
131131 -H $(CONFIG_ESP32_APP_MCUBOOT_HEADER_SIZE) --pad-header \
132132 -S $(CONFIG_ESP32_OTA_SLOT_SIZE)
133+ else
134+ # CONFIG_ESPRESSIF_SIMPLE_BOOT
135+
136+ APP_OFFSET := 0x1000
137+ APP_IMAGE := nuttx.bin
138+ FLASH_APP := $(APP_OFFSET) $(APP_IMAGE)
139+ ESPTOOL_BINDIR := .
133140endif
134141
135142ESPTOOL_BINS += $(FLASH_APP )
@@ -262,6 +269,25 @@ define MKIMAGE
262269 $(Q ) echo nuttx.bin >> nuttx.manifest
263270 $(Q ) echo "Generated: nuttx.bin (MCUboot compatible)"
264271endef
272+ else
273+ define MKIMAGE
274+ $(Q ) echo "MKIMAGE: ESP32 binary"
275+ $(Q ) if ! esptool.py version 1>/dev/null 2>&1; then \
276+ echo ""; \
277+ echo "esptool.py not found. Please run: \"pip install esptool==4.8.dev4\""; \
278+ echo ""; \
279+ echo "Run make again to create the nuttx.bin image."; \
280+ exit 1; \
281+ fi
282+ $(Q ) if [ -z $(FLASH_SIZE ) ]; then \
283+ echo "Missing Flash memory size configuration."; \
284+ exit 1; \
285+ fi
286+ $(eval ELF2IMAGE_OPTS := $(if $(CONFIG_ESPRESSIF_SIMPLE_BOOT ) ,--ram-only-header) -fs $(FLASH_SIZE ) -fm $(FLASH_MODE ) -ff $(FLASH_FREQ ) )
287+ $(ESPTOOL_FILE ) -c esp32 elf2image $(ELF2IMAGE_OPTS ) -o nuttx.bin nuttx
288+ $(Q ) echo nuttx.bin >> nuttx.manifest
289+ $(Q ) echo "Generated: nuttx.bin"
290+ endef
265291endif
266292endif
267293
You can’t perform that action at this time.
0 commit comments