esptool-js icon indicating copy to clipboard operation
esptool-js copied to clipboard

How can I flash an esp32 using files from a Github Release?

Open AllanOricil opened this issue 1 year ago • 5 comments

For example, this Release has a build for the CYD. How can I configure esptool-js to use the release files, from .zip, and proper flash indexes?

This is the content of the .zip

image

Thank you in advance.

AllanOricil avatar May 19 '24 21:05 AllanOricil

Go to https://espressif.github.io/esptool-js/ and click Connect under Program section.

Add binaries (.bin) and flash offset address in the list. The list of binaries to flash and the flash offset address are usually defined in the partitions table.

Click Program. See the flashing output. If successful you can disconnect

brianignacio5 avatar May 28 '24 09:05 brianignacio5

I'm looking for a way to build a custom site where people can just click on a button called "flash", or "update", to flash their boards easily. @brianignacio5

AllanOricil avatar May 28 '24 10:05 AllanOricil

One thing you can do is to prepare a TOML file with your binaries and call the ESP-Launchpad with the URL (like GitHub for example) of your TOML and it can be used for flashing monitor etc.

Here is the link to the ESP-Launchpad tutorial in Elektor magazine: https://www.elektormagazine.com/magazine/elektor-328/62435

Here is the ESP Launchpad repository: https://github.com/espressif/esp-launchpad

Note: This project uses esptool-js as dependency so it is doing the same thing but simplify your binaries configuration.

brianignacio5 avatar May 29 '24 00:05 brianignacio5

@brianignacio5 one last question. Do you know a way I can pass parameters while flashing the board with my build? For example, during builds I can set WIFI_SSID and WIFI_PASSWORD as build variables. However I can't ship firmwares with these values hard-coded. I need the user to set them up when flashing.

AllanOricil avatar May 29 '24 02:05 AllanOricil

Never mind. I think I will change my code to read those env specific variables at runtime from a config file.

AllanOricil avatar May 29 '24 02:05 AllanOricil

@AllanOricil Maybe ESP Web Tools suit your usecase better https://esphome.github.io/esp-web-tools/

DrSkunk avatar Aug 13 '24 19:08 DrSkunk

@AllanOricil Maybe ESP Web Tools suit your usecase better https://esphome.github.io/esp-web-tools/

@DrSkunk thank you

Im actually using it already :D

This is my project https://github.com/AllanOricil/esp32-mfa-authenticator

AllanOricil avatar Aug 13 '24 21:08 AllanOricil