-
Notifications
You must be signed in to change notification settings - Fork 407
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
Migrate to ESPtool 4.x #105
Comments
Yes, it does still work but using the API is a more safe approach because it promises to be more stable long-term. As you can see in the output ("Command: esptool.py --chip...") this app currently simulates being a CLI client for esptool.py. Hence, whenever they change a parameter/flag we depend upon, this app breaks. Worse, we only find out once we start the flashing process. If we were to use the API we would find out when we build the app. |
API integration looks like a fairly heavy duty rewrite. Also means replicating a lot of integrated checks into the external code. CLI makes much more sense IMHO. Keep it as a wrapper so that all of the heavy lifting remains in esptool.py Why not just check the version in esptool/esptool /init.py when building. Would achieve the same. |
Yep, that's the main reason this issue is still open.
Well, it's not that we get an completely random esptool version. It's somewhat controlled through |
I will take a look on the fork I made, but it is only a cut down version of your code so possibly does not take advantage of all features. If I find anything I will post back. I did up-rev the requirements.txt to >= V4 and it compiles okay and uploads as it should, but as I mentioned. I did cut back on the code a bit to tailor it for my project so it may not use all flags |
As long as you choose any of the |
I managed to get it working on esptool v4.8.1
This is my requirements.txt
The main changes were to add the stubs folders to the 'datas' section in the specs file... build-on-mac.spec
My Repo - https://github.com/DeeEmm/DIYFB-firmware-flasher I cannot create a PR for these changes as I'm running a cut down version of your code and I very much doubt you would want to pull in the rest of my changes. My file paths are also hard coded & relative to my VENV. However. You should be able to easily make the same changes here |
Thanks a bunch!
Yep, I guess you need to put measures in place that remind you to update the path the next time you bump Python in the VENV 😜 As the |
FYI I have such common code in 63420db but I had to rework it later. I forgot how different the VENV dir structure in Windows is from macOS. It's |
ESPtool v3 only receives patches critical bugs and we should move to v4.
(Un)fortunately, the internal structure we had to rely upon until now was completely refactored. ESPtool now offers a public API: https://github.com/espressif/esptool/releases/tag/v4.0. That's most welcome (I had asked for this for years) but it also means a bit of a migration effort I guess.
The text was updated successfully, but these errors were encountered: