* fix factory generation for ESP32-S3
This commit is contained in:
lumapu 2024-05-18 23:14:29 +02:00
parent 437173854f
commit c0713a263d
2 changed files with 6 additions and 5 deletions

View file

@ -49,10 +49,10 @@ Windows:
### ESP32-S3 (OpenDTU Fusion Board)
Python:
`esptool.py -b 921600 write_flash --flash_mode dio --flash_size detect 0x0 firmware.factory.bin`
`esptool.py -b 921600 write_flash --flash_mode dio --flash_size detect 0x10000 firmware.factory.bin`
Windows:
`esptool.exe -b 921600 write_flash --flash_mode dio --flash_size detect 0x0 firmware.factory.bin`
`esptool.exe -b 921600 write_flash --flash_mode dio --flash_size detect 0x10000 firmware.factory.bin`
For a 4MB flash size the upload should be finished within 22 seconds.

View file

@ -13,17 +13,18 @@ def build_littlefs():
print("LittleFS build successful")
def merge_bins():
flash_size = int(env.get("BOARD_FLASH_SIZE", "4MB").replace("MB", ""))
flash_size = int(env.BoardConfig().get("upload.maximum_size", "4194304"))
app0_offset = 0x10000
if env['PIOENV'][:7] == "esp8266":
app0_offset = 0
elif env['PIOENV'][:7] == "esp8285":
app0_offset = 0
print(flash_size)
littlefs_offset = 0x290000
if flash_size == 8:
if flash_size == 0x330000:
littlefs_offset = 0x670000
elif flash_size == 16:
elif flash_size == 0x640000:
littlefs_offset = 0xc90000
# save current wd