Skip to content

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..

@petermm petermm marked this pull request as draft March 18, 2025 09:38
@petermm petermm force-pushed the esptool_pythonx branch 4 times, most recently from 50df6c1 to 757e852 Compare April 12, 2025 09:18
@petermm petermm marked this pull request as ready for review April 12, 2025 09:29
@petermm
Copy link
Contributor Author

petermm commented Apr 12, 2025

needs #47 but otherwise good to go.

@petermm petermm force-pushed the esptool_pythonx branch 4 times, most recently from bd5134c to d031db5 Compare April 13, 2025 21:16
@petermm petermm changed the title Built-in esptool flash (via Pythonx) Built-in esptool flash,info,erase_flash (via Pythonx) Apr 13, 2025
@petermm petermm force-pushed the esptool_pythonx branch 6 times, most recently from ac93e42 to 12894af Compare April 14, 2025 02:22
@petermm petermm changed the title Built-in esptool flash,info,erase_flash (via Pythonx) Built-in esptool flash, install,info,erase_flash (via Pythonx) Apr 14, 2025
@petermm petermm force-pushed the esptool_pythonx branch 4 times, most recently from dfd58ec to c5405c2 Compare April 14, 2025 14:20
@petermm petermm force-pushed the esptool_pythonx branch 3 times, most recently from 2585965 to 18ff8c7 Compare April 14, 2025 19:55
Optional use built-in esptool install via Pythonx.

Signed-off-by: Peter M <petermm@gmail.com>
@bettio bettio merged commit 656255a into atomvm:main Aug 7, 2025
@petermm petermm deleted the esptool_pythonx branch August 7, 2025 20:13
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.

3 participants