esp:esp8266:open-sdk:flash-nonfota-firmware
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| esp:esp8266:open-sdk:flash-nonfota-firmware [2026/09/21 14:11] – oscar | esp:esp8266:open-sdk:flash-nonfota-firmware [2026/12/01 06:56] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ---- | ||
| - | |||
| - | # ESP8266 Non-FOTA Flash Layout: WEMOS D1 Mini Pro (16MB) | ||
| - | |||
| - | This only applies to NON-FOTA firmware versions. In order to flash ESP8266 the GPIO0 should be connected to GND. This is D3 on Wemos D1 Mini Pro. | ||
| - | |||
| - | ## Framework: esp-open-sdk (NON-OTA Configuration) | ||
| - | |||
| - | The Espressif SDK family **does not natively support a 16 MB flash mapping profile** for application code execution. Instead, it handles a 16 MB chip (like the one on the WEMOS D1 Mini Pro) by addressing it as a **4 MB (32 Mbit) layout profile**. The remaining 12 MB is invisible to the linker script and can only be accessed manually using raw sector reading/ | ||
| - | |||
| - | |||
| - | --- | ||
| - | |||
| - | |||
| - | ### 1. The Non-OTA Flash Map (Mapped as 4MB / 32Mbit) | ||
| - | |||
| - | |||
| - | |||
| - | In a traditional **Non-OTA** setup (referred to as `eagle.flash.bin` and `eagle.irom0text.bin` compiled via `esp-open-sdk`), | ||
| - | |||
| - | |||
| - | |||
| - | Because it is targeted as a 4 MB envelope, the default critical system parameters are pushed to the **very end of the first 4 MB segment**, not the physical end of the 16 MB chip. | ||
| - | |||
| - | |||
| - | |||
| - | | Offset Address | Size | Binary Target / Description | | ||
| - | |||
| - | | :--- | :--- | :--- | | ||
| - | |||
| - | | **`0x00000`** | ~40 KB | `eagle.flash.bin` (SDK Boot, initialized data, IRAM segments) | | ||
| - | |||
| - | | **`0x10000`** | Max 1 MB | `eagle.irom0text.bin` (Main application code executing from Flash) | | ||
| - | |||
| - | | **`0x11000`** to **`0x3FB000`** | ~3 MB | **Free User Space / Filesystem Space** | | ||
| - | |||
| - | | **`0x3FC000`** | 12 KB | `esp_init_data_default.bin` (System & RF Initialization parameters) | | ||
| - | |||
| - | | **`0x3FF000`** | 12 KB | `blank.bin` (System Parameter Save Area / Wi-Fi settings store) | | ||
| - | |||
| - | | *`0x400000` to `0xFFFFFF`* | *12 MB* | *Unmapped by SDK* (Raw access only via SPI flash API) | | ||
| - | |||
| - | |||
| - | |||
| - | --- | ||
| - | |||
| - | |||
| - | |||
| - | ### 2. Crucial `esp-open-sdk` Compilation & Flashing Quirks | ||
| - | |||
| - | |||
| - | |||
| - | #### The Linker Script (`.ld`) Constraint | ||
| - | |||
| - | Your application compilation must use the correct linker script. Look inside your sdk directory (`ld/`) and ensure you target: | ||
| - | |||
| - | ```text | ||
| - | |||
| - | eagle.app.v6.ld | ||
| - | |||
| - | ``` | ||
| - | |||
| - | This forces the compiler to build the code assuming a single application image (Non-OTA) rather than splitting it into `user1.bin` and `user2.bin` layout profiles typical of an OTA environment. | ||
| - | |||
| - | |||
| - | |||
| - | #### The `esptool.py` Flash Size Trick | ||
| - | |||
| - | When flashing an `esp-open-sdk` firmware onto the WEMOS D1 Mini Pro, you must be careful with the `-fs` (flash size) parameter. If you set `-fs 16MB`, the Espressif system configuration files will be expected at the absolute end of the 16MB space (`0xFFC000`), | ||
| - | |||
| - | |||
| - | |||
| - | To successfully flash a Non-OTA open-sdk project on this board, force a 4MB size parameter during upload: | ||
| - | |||
| - | ```bash | ||
| - | |||
| - | esptool.py --port / | ||
| - | |||
| - | -fm dio -fs 4MB \ | ||
| - | |||
| - | 0x00000 eagle.flash.bin \ | ||
| - | |||
| - | 0x10000 eagle.irom0text.bin \ | ||
| - | |||
| - | 0x3FC000 esp_init_data_default.bin \ | ||
| - | |||
| - | 0x3FF000 blank.bin | ||
| - | |||
| - | ``` | ||
| - | |||
| - | |||
| - | |||
| - | > **Note:** If you explicitly want to map out the hidden 12 MB for custom partition spaces or filesystems, | ||
| - | |||
| - | ==== ESP-OPEN-SDK Firmwares ===== | ||
| - | |||
| - | ==== First initial flash ==== | ||
| - | < | ||
| - | # Full erase first | ||
| - | esptool.py --port / | ||
| - | |||
| - | # Flash esp-open-sdk/ | ||
| - | esptool.py --port / | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | ==== Subsequential flash ==== | ||
| - | < | ||
| - | esptool.py --port / | ||
| - | --flash_mode qio --flash_size 32m | ||
| - | 0x00000 firmware/ | ||
| - | 0x10000 firmware/ | ||
| - | </ | ||
| - | ===== EASY ESP Firmware ===== | ||
| - | < | ||
| - | sudo python esptool/ | ||
| - | sudo python esptool/ | ||
| - | </ | ||
| - | ===== NODEMCU Firmware ===== | ||
| - | Finally got the Wemos D1 mini pro with 16 MByte flash. | ||
| - | < | ||
| - | esptool.py erase_flash | ||
| - | esptool.py -b 460800 write_flash -fm qio 0x00000 bin/ | ||
| - | </ | ||
| - | And finally it was resolved with dev version of NodeMcu prepared in https:// | ||
| - | |||
| - | My best result is 17 modules in the BIN. Many was unsuccessful | ||
| - | I reported result in GitHub (with modules) - https:// | ||
| - | |||
| - | Also their own fixed esptool used - https:// | ||
| - | |||
| - | ===== LINKS ====== | ||
| - | * https:// | ||
| - | * http:// | ||
| - | * https:// | ||
| - | * https:// | ||
| - | * http:// | ||
| - | * http:// | ||
esp/esp8266/open-sdk/flash-nonfota-firmware.1789999893.txt.gz · Last modified: by oscar
