-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading to ota_0 instead of factory partition #864
Comments
I was running in this too. See my PR #785 |
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. |
While I was having the same problem, I came accross your post. After digging in espressif' docs, the reason is simple : you MUST set a factory app at the address 0x10000. So, your 0x20000 address is not considered as a correct factory region, and the bootloader will select the next available app, which is "app1" in your case. Your problem comes from the offset of your nvs region, which should be 0x9000 instead of 0x19000. Unless, of course, you doubled the size of the bootloader ? Hope it helps. |
@OptoStocks Yes, factory app is only possible at address 0x10000. |
@Jason2866 Sure it is possible with VSCode+Platformio !! For reference :
Auto-detected Flash size: 4MB
I (29) boot: ESP-IDF 4.3.0 2nd stage bootloader As you can see :Firmware is written at address 0x10000, and bootloader launches the "factory image" from this very same address. |
@OptoStocks Yes, and it is not for Arduino. My PR is for Arduino. |
of course, I have a custom bootloader whose size is more than 10000. I just hoped that platformio was smart enough to search the factory partition position directly in the custom partition table file |
@paolosanchi Platformio cant change the hard limits given from IDF. |
@paolosanchi Yes, @Jason2866 is right, the 0x10000 parameter appears to be from an unreleased part of code of espidf (or at least I couldn't easily find it). Feature request might be your only option, besides reducing your bootloader down to 0xC0000 and still having some room (0x4000) for nvs. |
@Jason2866 , @OptoStocks python.exe esptool.py --chip esp32 --port "COM3" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 rel\v1.0.0\bootloader.bin 0x18000 rel\v1.0.0\partitions.bin 0x1e000 rel\v1.0.0\ota_data_initial.bin 0x20000 rel\v1.0.0\firmware.bin How can it can be an espidf issue if I can compile (with platformio commands) and burn correctly with the command? My issue is just this, the platformio button doesn't execute the correct burning command |
@paolosanchi Ohhh, sorry I missed that part. You'll probably have some luck by updating this offset especially : |
Interesting, since it is against the documentation from espressif that the factory firmware can be only at 0x10000. In this case do not expect this not supported nor documented feature will be implemented. Before this espressif has to support official and change there documentation. |
@OptoStocks @paolosanchi See my PR #785 could work here too. |
Yes probably @Jason2866 :) Would be preferable if the Factory App offset was dynamic and set according to the custom partition, thought. |
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. |
I'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
this is my platformio.ini:
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:
This issue is a follow-up to this thread:
https://community.platformio.org/t/uploading-to-ota-0-instead-of-factory-partition/28951/9
The text was updated successfully, but these errors were encountered: