Uploading to ota_0 instead of factory partition
See original GitHub issueI’m trying to upload the program to an esp32 devkitv1 and I get the following issue.
When I press the upload button in vscode the firmware is uploaded to the ota_ 0 partition instead of the factory partition. The bootstrap tries to start the factory partition and rises an error, then the app starts from the ota_0 partition. Prior to upload I did a flash erase. What I expect is that the firmware is uploaded to the factory partition.
This is my custom partition table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x19000, 0x5000,
otadata, data, ota, 0x1E000, 0x2000,
factory, app, factory, 0x20000, 0x100000,
app0, app, ota_0, 0x120000, 0x150000,
app1, app, ota_1, 0x270000, 0x150000,
spiffs, data, spiffs, 0x3C0000, 0x40000,
this is my platformio.ini:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino, espidf
monitor_speed = 115200
lib_deps =
C:\git\rfid
monitor_filters = esp32_exception_decoder
board_build.partitions = partitions_custom.csv
And this is the command displayed in the console:
platformio.exe run --target upload
and this the point that it says it’s writing to ota0 (0x120000) instead that factory (0x20000)
Wrote 764096 bytes (471615 compressed) at 0x00120000 in 11.0 seconds (effective 554.5 kbit/s)...
This is the boostrapper log:
D (259) boot: Trying partition index -1 offs 0x20000 size 0x100000
D (265) esp_image: reading image header @ 0x20000
D (270) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
D (277) esp_image: image header: 0xff 0xff 0xff 0x0f ffffffff
E (283) esp_image: image at 0x20000 has invalid magic byte (nothing flashed here?)
E (291) boot: Factory app partition is not bootable
D (297) boot: Trying partition index 0 offs 0x120000 size 0x100000
D (303) esp_image: reading image header @ 0x120000
D (308) bootloader_flash: mmu set block paddr=0x00120000 (was 0x00020000)
D (315) esp_image: image header: 0xe9 0x06 0x02 0x02 40082094
This issue is a follow-up to this thread: https://community.platformio.org/t/uploading-to-ota-0-instead-of-factory-partition/28951/9
Issue Analytics
- State:
- Created a year ago
- Comments:15 (6 by maintainers)
Top GitHub Comments
I was running in this too. See my PR https://github.com/platformio/platform-espressif32/pull/785 We are using a factory firmware too handle a optimized OTA process to save flash space. We used
flash extra images
to specify where to flash the factory image https://github.com/arendst/Tasmota/blob/development/boards/esp32_4M.json This functions can be used to flash more images!This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.