ESP32 batch programming tool
MIT License
Language: Việt Nam
When mass-producing ESP32's products we need to have the tool to load the program for the product as quickly as possible. We have several ways to optimize and speed up loading binary firmware for ESP32 as follows:
ESP RPI FLASHER is a set of ESP32 multi-board load support tools at the same time including:
The features of the program run on Raspberri Pi as follows:
Functianal button and LED
Function | |
---|---|
Flash Button | Click to flash the program |
Reflash Button | Click to re-flash the failed board |
Reboot Button | Click to restart Raspberry |
Flash LED | Report device loading program |
Reflash LED | Report with loaded board failed |
Ready LED | Raspberry are ready to be used |
Wire connections
Raspberry Pin | |
---|---|
Flash Button | 16 |
Reflash Button | 20 |
Reboot Button | 21 |
Flash LED | 12 |
Reflash LED | 7 |
Ready LED | 8 |
The control circuit board after welding is fixed
.img
extension).sudo fdisk -l
commandcd Downloads /
sudo dd bs = 4M if = 2017-07-05-raspbian-jessie-lite.img of = /dev/mmcblk0
cd Downloads/
command is used to go to the directory containing the installation file.Ref: Cách cài đặt hệ điều hành raspbian cho raspberry.
Setting Wifi and SSH to Raspberry PI
boot
partition and rootfs
partition.rootfs
, and open /etc/wpa-supplicant/wpa-supplicant.conf in this directory:ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="your ssid"
psk="your pass"
}
ssh
file (note: this file does not have an extension) in the boot partition of SD Card.ssh pi @ 192.168.1.12
and type the password: raspberry
(Note the computer needs to use the same network with raspberry).ssh [email protected]
with password: raspberry
.git clone --recursive https://github.com/tuanpmt/esp_rpi_flasher.git
Note: By default, the project needs to be saved in the /home/pi directory, if you want to save the script to another location, refer to Configuring directory path.
firmware_examples
):sudo pip install -r requirements.txt
$PWD
(the default path is /home/pi/esp_rpi_flasher)sudo nano /home/pi/.bashrc
to edit the .Bashrc fileecho Running at boot
sudo /usr/bin/python3 /home/pi/esp_rpi_flasher/flasher.py &
With: /home/pi/esp_rpi_flasher/flasher.py
is the default path of the project, if the script is saved in another location
sudo reboot
.Check out some more ways to run scripts when starting raspbian here
The basic settings and firmware will be saved in the /boot/firmware
path as follows:
boot
├──firmware
├──config.ini
├──encrypted
├──app-encrypted.bin
├──bootloader-reflash-digest-encrypted.bin
├──ota_data_initial-encrypted.bin
├──partitions-encrypted.bin
├──flash_encryption_key_1.0.0.alpha.4.bin
├──secure-bootloader-key-256.bin
├──normal
├──app.bin
├──bootloader.bin
├──ota_data_initial.bin
├──partitions.bin
Inside:
By default the script will load the program in the usual way (without secure boot and flash encryption). Enter the /boot/firmware/
directory and open the config.ini
file and edit isEncrypt = True
to load the program to secure boot and flash encryption.
By default the script needs to be saved under the path /home/pi
however, if you want to save the script in another directory you need to edit:
/boot/firmware/
directory open the config.ini file and change the path of projectPath
LED and push button have been declared by default as Step 1 if you want to change the LED connector pins and Button with raspberry, proceed to the /boot/firmware/
folder open the ** config.ini file ** and change the LED and Button pins accordingly.