Skip to content

Commit ffc6aea

Browse files
authored
Merge pull request #8 from pennam/docs
Update docs
2 parents aa32933 + d60628a commit ffc6aea

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Arduino UNO R4 WiFi USB Bridge firmware
2+
3+
This firmware uses [arduino-esp32](https://github.com/espressif/arduino-esp32/releases/tag/2.0.9)
4+
5+
## Building
6+
7+
```
8+
./compile.sh
9+
```
10+
Running the compile script will:
11+
12+
1. Download the [arduino-esp32 v2.0.9 core](https://github.com/espressif/arduino-esp32/releases/tag/2.0.9) and build tools
13+
2. Apply needed [patches](core_esp32.patch)
14+
3. Compile the firmware using arduino-cli
15+
4. Export binaries in the build directory inside the `UNOR4USBBridge` folder
16+
17+
The `compile.sh` script will produce a bunch of binary files that can be flashed using [esptool](https://github.com/espressif/esptool/releases) from the build directory:
18+
19+
```
20+
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"
21+
```
22+
23+
## Packaging
24+
25+
```
26+
./export.sh
27+
```
28+
29+
The `export.sh` script will take care of generating a single binary blob including the TLS certificates bundle. Running the export script will:
30+
31+
1. Invoke the `compile.sh` script
32+
2. Generate the certificate bundle using this [script](certificates/gen_crt_bundle.py) and this [certificates list](certificates/certificates.pem)
33+
3. Combine everything in a single binary blob that can be flashed from address 0x0 using [espflash](https://github.com/esp-rs/espflash/releases)
34+
35+
```
36+
espflash write-bin -b 115200 0x0 S3.bin
37+
```
38+
39+
## Flashing
40+
41+
To flash the firmware the board needs to be in `ESP download` mode. This can be done [manually](unor4wifi-updater#option-2) or using the [unor4wifi-updater](unor4wifi-updater) script.
42+

unor4wifi-updater/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# UNO R4 WiFi updater script
2+
3+
This updater script can be used to automatically put the UNO R4 WiFi in `ESP download` mode and upload the latest firmware.
4+
5+
The script uses [unor4wifi-reboot](unor4wifi-reboot) to put the board in `ESP download` mode through an HID message; and [espflash](https://github.com/esp-rs/espflash/releases) to flash the firmware bundle.
6+
7+
# How to use the script
8+
19
## On Windows
210
* Extract the zip file
311
* Disconnect all USB gadgets from your PC
@@ -45,13 +53,13 @@ Running the script from the terminal instead of double click should avoid the co
4553

4654
![image](https://github.com/pennam/UnoR4WiFiUpdate/assets/20436476/dd776469-ba93-4430-9b72-25a6ca75840f)
4755

48-
## Troubleshooting
56+
# Troubleshooting
4957
* If the script report this error: `Cannot put the board in ESP mode. (via 'unor4wifi-reboot')`
5058

51-
### Option 1
59+
## Option 1
5260
Disconnect and connect again your UNO R4 WiFi from your PC and re-run the script.
5361

54-
### Option 2
62+
## Option 2
5563
Manually put the UNO R4 WiFi in ESP mode
5664

5765
1. Disconnect the UNO R4 WiFi from your PC

0 commit comments

Comments
 (0)