Skip to content

Updater class corrupting FS uploads by setting flash mode byte in 1st sector #6880

Closed
@mike-s123

Description

@mike-s123

Basic Info

  • This issue complies with the [issue POLICY doc]
  • I have read the documentation at... and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: WEMOS D1 Mini Pro (clone)
  • Core Version: Core:2.6.2-4-g074a8016=20602004
  • Development Env: Arduino IDE 1.8.10
  • Operating System: Win7-64

Settings in IDE

  • Module: Lolin D1 Mini Pro
  • Flash Size: 16MB (FS:14MB...)
  • lwip Variant: v2 Higher Bandwidth
  • CPU Frequency: 160MHz
  • Upload Using: OTA

Problem Description

Uploading a large (~14MB) LittleFS image via ESP8266HTTPUpdateServer doesn't work (i.e. LittleFS.open() fails and the sketch can not open/read files).

Uploading the same image using USB and esptool.py (either manually or with the IDE uploader) works fine. Then, uploading the same image using OTA causes failure.

With an identically sized SPIFFs image, both USB and OTA uploads work fine. OTA firmware uploads work fine.

This has been 100% repeatable.

using esptool.py (this works, OTA doesn't)

$ esptool.py --before default_reset --after hard_reset -p COM10 --baud 921600 write_flash 0x200000 FS.mklittlefs.bin
esptool.py v2.6
Serial port COM10
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: xxxx
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Compressed 14655488 bytes to 1038072...
Wrote 14655488 bytes (1038072 compressed) at 0x00200000 in 42.1 seconds (effective 2784.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Metadata

Metadata

Labels

waiting for feedbackWaiting on additional info. If it's not received, the issue may be closed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions