Skip to content
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

Built-in esptool flash (via Pythonx) #46

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petermm
Copy link
Contributor

@petermm petermm commented Feb 25, 2025

Optional use built-in esptool install via Pythonx.

add pythonx to your project:
{:pythonx, "~> 0.4.0", runtime: false}

and mix atomvm.esp32.flash

@UncleGrumpy
Copy link
Contributor

Forgive my ignorance, but wouldn’t this lead to pythonx being included in the user application? It would be neat if we could just auto detect if esptool is already installed, and if not use pythonx automatically… kind of the reverse logic of what you added to the esp32.flash task.

@petermm
Copy link
Contributor Author

petermm commented Feb 25, 2025

lol, yes - I updated things to runtime: false..

one could argue for your suggested logic, but this PR goes for if {:pythonx, "~> 0.4.0", runtime: false} is there, we use it..

(I've had issues with idf_path, and using pythonx also means version control of esptool)

@UncleGrumpy
Copy link
Contributor

UncleGrumpy commented Feb 25, 2025

I don't use the esptool in IDF path either. I use a package manager installed version. It's available in every distro I use, and that way I am always using the current version, even if testing an older (i.e. 5.1) ESP-IDF build of the VM.

@UncleGrumpy
Copy link
Contributor

using pythonx also means version control of esptool

This is actually a very good argument for using pythonx all the time... ignoring any other installed versions of esptool. It would also allow for less setup friction for Elixir developers (and presumably Erlang if we take this approach with the atomvm_rebar3_plugin) who are using microcontrollers for the first time with AtomVM, and downloading release images. It would be nice to have one less thing to have listed under the setup requirements, or to remember to add to mix.exs.

@petermm
Copy link
Contributor Author

petermm commented Feb 26, 2025

Agreed, but pythonx is otp25+ and elixir 1.15+, so for the time being it needs to be optional..

Think PR is good as is, as to also test it out - I'll update the igniter install to use this as default..

Optional use built-in esptool install via Pythonx.

Signed-off-by: Peter M <petermm@gmail.com>
@petermm petermm marked this pull request as draft March 18, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants