-
Notifications
You must be signed in to change notification settings - Fork 179
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
ESP32S2 self-update not working #134
Comments
can you provide more information on the issue:
|
|
2.Step to reproduce: please provide your procedure detail, what have you done to test and how you verify that it does not take effect. |
Just started all over again with following steps:
Then I created the
To check wheter self-update works or not I created a new
And now it works as expected. After a self-update the MSD volume name is |
update-uf2 is an actually an app like circuit python, it covert tinyuf2.bin to carray then erase and write once when updating. Maybe you modify but didn't recompile the tinyuf2 first (all target) and updater use the old bin file which make you think it does not do the work. |
We now applied all the changes we made before. Unfortunately it still does not work. It gets confusing even more. One bootloader is the original without changes. The second one should enter UF2 stage when hard resetting the board. update-tinyuf2-factory.uf2
update-tinyuf2-failover.uf2
just after
When uploading the BUT: The behaviour of the uploaded firmware does not take effect. The version that was last burned with the command |
Ok now I see what you mean (this is why asking for exact reproducible steps is needed), the changes you did isn't part of the tinyuf2, it is stage2 bootlaoder, tinyuf2 is actually factory app. Currently the updater only update tinyuf2 since I am not sure if it is safe and/or possible to update stage2 bootloader. I didn't say it is not possible, I just haven't tried it yet. |
Thank you very much for investigating your time! Now some things become clear. Closing for now... |
If you still want to update the boot2 as well. You could open an issue for it, I will try to see if that is possible to do when having time |
I tried to update the boot2 binary with update-uf2, there is a couple of issue
Digging to esptool.py https://github.com/espressif/esptool/blob/master/esptool.py#L3488, look like it does some modification to bootlaoder image to add image size, flash mode, flash freq etc to the very frist 4 bytes (header). At this point, I don't think it is the worth effort to update it, since it seem rather unsafe. It is rather easy to flash boot2 update via rom bootloader. Boot2 won't change much anyway. |
Thank you for digging even deeper. "unsafe" does not sound good. We are now flashing the boards directly with the upload tool. The failover bootloader we only need during the development phase. So it is not a big problem. Thank you very much again. |
after giving a bit more thought, I think it is still worth updating, since ROM loader is there to unbrick. However, I don't quite feel comfortable following the esptool code, maybe if someone know where is the specs for the layout. We could get this done. I push my interim work to the branch here https://github.com/adafruit/tinyuf2/tree/esp32s2-update-boot2 . If anyone could help with meta data part, that would nail it. |
We have two different self-update UF2 firmware files. But uploading one or another file does not work. The UF2 bootloader that was last burned via the
idf.py
tool is always active and cannot be overwritten.The text was updated successfully, but these errors were encountered: