-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
Binaries incompatible with Arduino-CLI for OTA #1272
Comments
Hi @marchingband,
Arduino-CLI is a completely different project, so there is no guarantee that binaries are compatible in any way.
v4.1.0 is quite old version, many changes and bug fixes have been added since that release. The fact that somewhat recent v6.2.0 works as expected indirectly explains this behavior. You've mentioned that you already had done some regression testing, so have you figured out what's the lowest version of the |
That seems odd, I assume that Arduino-CLI produces identical binaries to Arduino IDE, and I would assume PIO were also the same, since it is using Arduino as the framework ... and there is no indication in the docs otherwise.
I have not |
The build process between ArduinoIDE and Platformio IS different. It can be that the result is the same. In my experience there is code compability, but there is no guarantee and nowhere this is mentioned. So if you provide both ways of building, you have to do compability tests. One more reason to drop ArduinoIDE built support. One more thing, updates between major core versions are not recommended. There is a known OTA bug in older IDF 4.4 versions. This bug is solved in newer version (IDF 4.4.6). So it is explainable that a older built version is successful with OTA to an actual version and it fails when trying to update to an not so new version. Arduino core 2.0.1 and 2.0.8 are both old. Better do your OTA update tests with actual version 2.0.14 (Platformio "6.5.0") The used partition schemes are identic? Arduino espressif32 changed them a while ago by adding the core dump section. The name of the partition scheme is not changed!! Another reason why i choose the way to use ONLY partition schemes defined in the project. Both ArduinoIDE and Platformio does support this. |
In short the issues you encounter are most probably not Platformio related. -> Bugs and incompatibities under the hood (IDF). |
@Jason2866 maybe re-read my bug report?
the issue is with PIO. |
I don't see a contradiction between your statements. You flash partitions with one tool that assumes partitions layout a. Then you flash with another tool that assumes layout b. That may or may not work depending on the exact settings you use. Do you want help or blame? If it is help, better answer questions and provide verbose flash logs, ideally from both tools. If anyone then Jason can spot the problem :) |
@joba-1 I am making a bug report. If I wanted help I would ask in a forum or on Reddit. |
okay, so you already identified. Seems you are a step ahead now. It would help to fix the issue to explain and show what goes wrong. |
@Jason2866 I wish I had time for that, but I do not, and wouldn't even know where to begin. |
@marchingband So we agree we don't know where the issue is coming from. It is complex with to many variables to say who is responsible for. As mentioned earlier, do the builds have same setups? Partition schemes, Flash mode, flash size? All MCU variants (esp32, esp32-s2, esp32-c3 etc.) affected? Build on same system? Windows, Linux or Mac? Version of Arduino CLI? To make stuff even more complicated. Arduino Core had issues with flash modes until core 2.0.4. Bootloader was built not correctly. Problems will arrive when an OTA update is done with a build which uses a different flash mode than the original was used. So there are known bugs which affects or prevents a successful OTA update with later versions. The only solution i see for you users, to find (if possible!) a setup with a actual build where OTA is working. Maybe an intermediate build is needed to reach this goal. Since only you have or know the details asked earlier the help we can provide is to discuss the findings you have with you. |
Tthe answer to this question:
The should, but bug(s) in Arduino/IDF do prevent this. |
@Jason2866 once again:
Moving from Arduino CLI to PIO, even using the SAME VERSION of Arduno-ESP32 bricks the device. Once again I am not looking for help, I have a working solution for my users. If you want to help the maintainers, I imagine you can reproduce the issue locally based on the information I provided. Happy to help you get up and running but I imagine you will be able to with ease. |
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 have a custom OTA process, using the Arduino
Updates
library.https://github.com/marchingband/wvr
If I use Arduino-CLI, then any binary produced from any version 2.x.x will be compatible.
If I use PlatformIIO to produce the binaries, they often cause the device to be bricked, if it was initially flashed using Arduino-CLI.
I have many such boards in the hands of users, as well as some that were flashed using PIO. So I am in a precarious position.
I have done a great deal of regression testing to narrow down the issue, what versions break it.
The most obvious case is:
platform = espressif32@4.1.0
Strangely, an option that works is:
platform = espressif32@6.2.0
I am hoping that someone can help me identify the issue, and ideally patch it.
Are binaries meant to be compatible for OTA across versions? And if so, shouldn't they be compatible with those that Arduino-CLI produces?
Thanks.
The text was updated successfully, but these errors were encountered: