Build: flashing instructions - plan-d-io/P1-dongle GitHub Wiki
Only required for DIY builds!
Instructions on how to get precompiled P1-dongle firmware loaded on your ESP32.
Using binaries
The easiest (and preferred) way of loading the firmware on your ESP32 is by using the pre-compiled binaries, which you can find in the /bin folder. You will need the P1-dongle-merged-flash.bin
file.
These binaries are compiled for a ESP32-PICO-D4 with a flash size of at least 4MB. If you have another ESP32 microcontroller, you will need to compile the firmware yourself (see Build: compiling instructions).
Note that in order to download binaries from Github, you need to click the Download
button after opening them.
Using the Espressif Flash Download Tool (Windows)
Espressif provides a graphical tool to transfer firmware to and from a ESP-microcontroller. You can download it from their website.
Unzip the file, and open the flash download tool executable inside.
Depending on your Windows install, you might get some security warnings and/or require admin privileges
In the dialogue box, select chipType: ESP32
and click OK
In the following screen, be sure to select the right COM
port your ESP32 is attached to, and set the BAUD
rate to 115200. We recommend to click ERASE
first, so any existing firmware and data on your ESP32 are deleted.
After clicking ERASE
, wait for the green box to display FINISH
.
Next you need to add the firmware file and set the right memory location on the ESP32 to flash them to.
P1-dongle-merged-flash.bin
@ 0x0000
All other options should be left like in the example above.
Click START
. The firmware is now being uploaded. This can take a few minutes.
After the green box displays FINISH
again you need to restart the ESP32, e.g. by pressing the reset button on the side if you use an M5 ATOM.
The firmware loading is now complete. You can close the ESP32 download tool. If using an M5 ATOM, the LED should first turn red, then green. This means the firmware flashing has executed successfully.
Using esptool (Windows, Mac, Linux)
esptool is a Python-based, open-source, platform-independent utility to communicate with the ROM bootloader in Espressif chips. It requires your system to have Python installed, and some command line experience. Please use their instructions on how to get it up and running.
Check if Python is installed by running
python --version
orpython3 --version
in a terminal or command prompt. If you get an error, you need to install Python from python.org.
To install esptool, run the following command in your terminal or command prompt:
pip install esptool
or
pip3 install esptool
Flashing with esptool requires the same file as above. Open a terminal or command prompt and navigate to the location where you stored the binary file. Then, use the following commands (change the serial port and binary name):
esptool --port COM3 erase_flash
esptool --port COM3 write_flash 0x0000 P1-dongle-merged-flash.bin
Note: depending on how you installed esptool, you might need to prefix the commands with
python -m
orpython3 -m
, or useesptool.py
oresptool.exe
.
After uploading has been completed you need to restart the ESP32, e.g. by pressing the reset button on the side if you use an M5 ATOM. If using an M5 ATOM, the LED should first turn red, then green. This means the firmware flashing has executed successfully.