casner at acm.org
Wed May 2 08:32:43 HKT 2018
> I only built the OTA for v3.1 hardware. Do you think we need it for
> v3.0 ongoing? I assumed developers would build their own.
No. This was just a mistake by me not thinking clearly.
> I think you’ve OTA updated the v3.1 firmware onto v3.0 hardware, and
> that is causing your issue. The ‘make flash’ command will flash the
> factory partition, but it won’t switch the currently active boot
> partition to factory.
> I found this in the mailing list archive:
> Supposedly if the OTA partition doesn’t boot (or checksum mismatch,
> etc), the bootloader will boot factory.
> The selection of current boot partition is in the otadata partition:
> # OVMS 16MB flash ESP32 Partition Table
> # Name, Type, SubType, Offset, Size
> nvs, data, nvs, 0x9000, 0x4000
> otadata, data, ota, 0xd000, 0x2000
> phy_init, data, phy, 0xf000, 0x1000
> factory, app, factory, 0x10000, 4M
> ota_0, app, ota_0, , 4M
> ota_1, app, ota_1, , 4M
> store, data, fat, , 1M
> I guess zapping that would reset to defaults (factory boot)? I think
> erase_region may do that:
> esptool.py erase_region 0xd000 0x2000
I decided to zap the ota_0 partition instead:
$IDF_PATH/components/esptool_py/esptool/esptool.py erase_region 0x410000 0x400000
I had to "sudo ln -s /dev/tty.SLAB_USBtoUART /dev/ttyUSB0" first for
this to work. This did let the factory partition boot.
More information about the OvmsDev