I have a few ESP32 devices around the house that are hard to access for USB upgrades. When I got them, I did the setup using a pogo plug jig I cobbled together, expecting to do all further upgrades wirelessly. I knew I’d have to take them apart and find the jig to do any future USB update but didn’t expect to have to do that.
All worked to plan until I started getting these warnings from esphome:
... Chip rev >= 3.0 detected. Set minimum_chip_revision: "3.0" under esp32 > framework > advanced to reduce binary size
... Bootloader too old for OTA rollback and SRAM1 as IRAM (+40KB). Flash via USB once to update the bootloader
Ok. The first one is easy enough but that second one says I need to flash via USB. What’s that about?
It seems that there’s no safe way to update the bootloader on an ESP32. Anything that interrupts the flash is likely leave it in a soft brick state and I’d have to flash it via USB. Hmm… so basically if the flash succeeds I’m done and if it fails I’m no worse off than I was in the first place. Sounds like it’s worth a try.
So how do I flash the bootloader wirelessly? There’s no option in the ESPHome Device Builder UI. The esphome documentation does show how to do it from the command line, https://esphome.io/components/ota/esphome/#updating-the-bootloader-on-esp32.1 Click through to read the documentation but I’ll paste the most important part here

Take that warning seriously. I was able to upgrade all four of my devices without incident but I can’t promise you’ll be as lucky. Don’t even think about doing this upgrade during a thunderstorm or if your power is flaky today. Maybe avoid running big downloads or torrents while the flash is in progress. The good news is that the bootloader flash is really fast so the window for things to fail is short.
So we’re looking at a 3 flash process:
- Flash once to enable
allow_partition_accessandminimum_chip_revision. - Flash the bootloader via the command line.
- Flash again to disable
allow_partition_accessand enablesram1_as_iram.
In theory, you can do steps 1 and 3 using the UI but since you need to log into the esphome container anyway it’s just easier to do it all from the command line.
So off you go:
- Add
minimum_chip_revisionandallow_partition_accessyour yaml file(s) in the following places:esp32:...framework:...advanced:minimum_chip_revision: "3.0"ota:- platform: esphome...allow_partition_access: true
Do I need to remind you to use only spaces for indentation, no tabs, and that indentation actually means something in YAML files? Make sure you line things up as shown. - Flash the device(s)
a.Log into your homeassistant instance:ssh homeassistantb.From there, log into your esphome docker container:docker exec -it addon_5c53de3b_esphome /bin/bashc.Flash this configuration:cd /config/esphomeesphome run your-device-file.yamlCheck the log file that displays when the flash completes. The message about settingminimum_chip_revisionshould be gone but the message about the bootloader will still be there.d.Flash the bootloader (still from the/config/esphomedirectory). Remember. This is the dangerous step!!!esphome upload --bootloader your-device-file.yaml
This should finish pretty quickly.e.Go check your logs again:esphome logs your-device-file.yaml
The only warning you should be seeing now is:Bootloader supports SRAM1 as IRAM (+40KB). Set sram1_as_iram: true under esp32 > framework > advancedNote that it must sayBootloader supports. That means you’ve successfully updated the bootloader and are ready to enablesram1_as_iram. If you don’t see that message and especially if you’re still seeing the Bootloader too old message STOP RIGHT HERE and retrace your steps. If you enablesram1_as_iramwith an old bootloader you may brick your device.f.Remove the “allow_partition_access: true” that you previously added to the ota section of your yaml file(s) and add the following right after “minimum_chip_revision: "3.0"“:minimum_chip_revision: "3.0"sram1_as_iram: trueg.Flash this (final) configuration:esphome run your-device-file.yaml
Check the log file. Both warnings should now be gone.
Enjoy your fully updated ESP32 device, your up to date bootloader, the extra memory, and the safe OTA rollbacks that come with it.
- Interestingly, the
--bootloaderoption is not documented along with the esphome upload command: https://esphome.io/guides/cli/#upload-command. I think the message is pretty clear that you’re on your own recovering in case of failure. ↩︎