I’m somewhat familiar with flashing ESP32 and ESP8266 devices and just today after playing around with an ESP32 WROVER with both an ESPHome build and then a WLED build, I discovered that WLED really wants you to re-write the bootloader to free up space for the filesystem:
It got me wondering if the same is true for the ESPHome devices and I know I’ve seen that warning message “Bootloader too old …” when watching serial logs on my ESPHome devices. And I know that the recommendation is to update the whole partition by flashing the device directly /w ESPHome over USB. However:
I don’t want to use https://web.esphome.io/ to flash it because I would like to see realtime feedback as the serial flash progresses – I prefer to use Linux esptool to flash.
I don’t hook my ESPHome devices up to my HassIO machine since it is in the basement, far away from my PC.
If I do a “Manual Download” installation, the installer prompts me with this message:
I have never been able to use the top “Previous Modern” option, successfully. I’m wondering if its because that file includes the bootloader… though it isn’t very clear from these messages if that is the case.
Can someone share the process for using esptool to manually flash an ESPHome bootloader and firmware binary and where I can get the bootloader binary from?
Now that I’ve installed ESPHome on my PC, I remember doing this on one of my other Linux boxes in the house. While it works, going forward, I will need to have two separate ESPHome directories with the device YAMLs in them and, hopefully, they’re all aligned between the offline host and HassIO machine. I remember it really being a pain to keep them in sync.
I think I would rather be able to flash the binaries, manually, without requiring ESPHome to handle the flashing action.
Ok, I just determined the way – I’ll mark @neel-m as the solution since he set me on the path.
It was as I thought in my original post, when downloading the binary if you specify the “Factory format (Previously Modern)” it includes the bootloader. So, when you flash it via esptool you can start the write at address 0x0. This totally worked from my PC with the factory binary:
C:\Users\SpikeyGG>C:\Users\SpikeyGG\AppData\Local\Python\pythoncore-3.14-64\Scripts\esptool.exe write-flash 0x0 Downloads\ESPHome\testy.factory.bin
esptool v5.2.0
Connected to ESP32 on COM3:
Chip type: ESP32-D0WDQ6 (revision v1.0)
Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
Crystal frequency: 40MHz
MAC: a4:cf:12:51:c0:b8
Stub flasher running.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00148fff...
Wrote 1346576 bytes (816713 compressed) at 0x00000000 in 73.1 seconds (147.4 kbit/s).
Hash of data verified.
Hard resetting via RTS pin...
C:\Users\SpikeyGG>