mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 18:13:49 +01:00
dist/tools/esptool: upgrade to v3.2 for ESP32
This commit is contained in:
parent
a0ec3a0e02
commit
395ec06c16
@ -5,6 +5,8 @@ FLASH_FREQ = 40m # DO NOT CHANGE
|
|||||||
FLASH_SIZE ?= 4
|
FLASH_SIZE ?= 4
|
||||||
BOOTLOADER_POS = 0x1000
|
BOOTLOADER_POS = 0x1000
|
||||||
|
|
||||||
|
ESPTOOL ?= $(RIOTTOOLS)/esptools/esptool_v3.2.py
|
||||||
|
|
||||||
include $(RIOTCPU)/esp_common/Makefile.include
|
include $(RIOTCPU)/esp_common/Makefile.include
|
||||||
|
|
||||||
# regular Makefile
|
# regular Makefile
|
||||||
|
|||||||
4930
dist/tools/esptools/esptool_v3.2.py
vendored
Executable file
4930
dist/tools/esptools/esptool_v3.2.py
vendored
Executable file
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,20 @@ endif
|
|||||||
.PHONY: esp-qemu
|
.PHONY: esp-qemu
|
||||||
|
|
||||||
esp-qemu:
|
esp-qemu:
|
||||||
|
ifneq (,$(filter esp32,$(CPU_FAM)))
|
||||||
|
$(Q)echo \
|
||||||
|
"--flash_mode $(FLASH_MODE) --flash_freq $(FLASH_FREQ) " \
|
||||||
|
"--flash_size $(FLASH_SIZE)MB" \
|
||||||
|
"$(BOOTLOADER_POS) $(RIOTCPU)/$(CPU)/bin/$(BOOTLOADER_BIN)" \
|
||||||
|
"0x8000 $(BINDIR)/partitions.bin" \
|
||||||
|
"0x10000 $(FLASHFILE)" > $(BINDIR)/qemu_flash_args
|
||||||
|
$(Q)$(ESPTOOL) \
|
||||||
|
--chip esp32 merge_bin \
|
||||||
|
--fill-flash-size 4MB \
|
||||||
|
-o $(BINDIR)/qemu_flash_image.bin @$(BINDIR)/qemu_flash_args
|
||||||
|
$(Q)cp $(RIOTCPU)/$(CPU)/bin/rom_0x3ff90000_0x00010000.bin $(BINDIR)/rom1.bin
|
||||||
|
$(Q)cp $(RIOTCPU)/$(CPU)/bin/rom_0x40000000_0x000c2000.bin $(BINDIR)/rom.bin
|
||||||
|
else
|
||||||
$(Q)dd if=/dev/zero bs=1M count=$(FLASH_SIZE) | \
|
$(Q)dd if=/dev/zero bs=1M count=$(FLASH_SIZE) | \
|
||||||
tr "\\000" "\\377" > tmp.bin && cat tmp.bin | \
|
tr "\\000" "\\377" > tmp.bin && cat tmp.bin | \
|
||||||
head -c $$(($(BOOTLOADER_POS))) | \
|
head -c $$(($(BOOTLOADER_POS))) | \
|
||||||
@ -37,9 +51,6 @@ esp-qemu:
|
|||||||
head -c $$((0x10000)) | \
|
head -c $$((0x10000)) | \
|
||||||
cat - $(FLASHFILE) tmp.bin | \
|
cat - $(FLASHFILE) tmp.bin | \
|
||||||
head -c $(FLASH_SIZE)MB > $(BINDIR)/$(CPU)flash.bin && rm tmp.bin
|
head -c $(FLASH_SIZE)MB > $(BINDIR)/$(CPU)flash.bin && rm tmp.bin
|
||||||
ifeq (esp32,$(CPU_FAM))
|
|
||||||
$(Q)cp $(RIOTCPU)/$(CPU)/bin/rom_0x3ff90000_0x00010000.bin $(BINDIR)/rom1.bin
|
|
||||||
$(Q)cp $(RIOTCPU)/$(CPU)/bin/rom_0x40000000_0x000c2000.bin $(BINDIR)/rom.bin
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# reset tool configuration
|
# reset tool configuration
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user