This firmware uses arduino-esp32
git submodule update --init --depth 1 --no-single-branch
cd hardware/esp32-patched/esp32/tools
./get.py
./compile.sh
Running the compile script will:
- Compile the firmware using
arduino-cli
- Export binaries in the build directory inside the
UNOR4USBBridge
folder
The compile.sh
script will produce a bunch of binary files that can be flashed using esptool from the build directory:
esptool --chip esp32s3 --port "/dev/ttyACM0" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 "UNOR4USBBridge.ino.bootloader.bin" 0x8000 "UNOR4USBBridge.ino.partitions.bin" 0xe000 "../../../boot/boot_app0.bin" 0x10000 "UNOR4USBBridge.ino.bin"
./export.sh
The export.sh
script will take care of generating a single binary blob including the TLS certificates bundle. Running the export script will:
- Invoke the
compile.sh
script - Generate the certificate bundle using this script and this certificates list
- Combine everything in a single binary blob that can be flashed from address 0x0 using espflash
espflash write-bin -b 115200 0x0 S3.bin
To flash the firmware the board needs to be in ESP download
mode. This can be done manually or using the unor4wifi-updater script.
Alternatively you can also use the download.sh
script to update the firmware using the arduino-cli
. Also in this case the download.sh
script
should be invoked after putting the board in ESP download
mode.