Production flashing/usage? #13206
Replies: 3 comments
-
For production builds yes you can includes all the python files inthe binary, it's called freezing the code in micropython. Then it just one binary to flash and then it's all ready to just run. You don't need to flash / extract for it, it's an option for the project during the compile process: |
Beta Was this translation helpful? Give feedback.
-
In addition to what @andrewleech said (which is definitely the best way to do this), you can also do what you suggested -- i.e. extract the firmware from a single ready-to-go device and then use that as the .bin file to flash to your other devices. (You can do this with esptool.py) |
Beta Was this translation helpful? Give feedback.
-
Wonderful, thank you both! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm just getting started with MicroPython, but would like to use it for a production project. I want to get ahead of future woes and understand how it'd be possible to later effectively and quickly flash units, or if there's no simple way to do this and it'd be cumbersome.
Like I said, I'm new to MP and so far my only experience has been erasing flash then flashing the .bin with esptool on command line, and then using Pymakr in VSCode to upload my main.py script. I'm hoping to understand if there's simpler/quick/high-throughput ways I can deploy to fresh ESP32's in the future (such as if I had dozens or hundreds).
For example, could I somehow eventually take the entire ESP32 with onboard main.py/boot.py scripts and somehow extract that as a single .bin that I can then write a script to batch flash a bunch of ESP32's connected over USB? Forgive me if what I just said is abominable or makes no sense at all, it's new to me!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions