Skip to content

Commit 764c02e

Browse files
authored
Merge pull request #86 from DroneBridge/v2.0dev
V2.0dev to master fixing github action and adding esp32-c6 build
2 parents 824fb02 + f664024 commit 764c02e

File tree

9 files changed

+2308
-430
lines changed

9 files changed

+2308
-430
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM espressif/idf:release-v5.2
2+
RUN apt update
3+
RUN apt-get install -y curl
4+
RUN curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
5+
RUN bash nodesource_setup.sh
6+
RUN apt -y install nodejs
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Espressif IoT Development Framework (ESP-IDF), plus node.js and npm"
2+
branding:
3+
color: red
4+
icon: wifi
5+
inputs:
6+
target:
7+
description: "ESP32 variant to build for"
8+
default: "esp32"
9+
required: false
10+
command:
11+
description: "Command to run inside the docker container (default: builds the project)"
12+
default: "idf.py build"
13+
required: false
14+
runs:
15+
using: 'docker'
16+
image: 'Dockerfile'
17+
env:
18+
IDF_TARGET: "${{inputs.target}}"
19+
args:
20+
- "/bin/bash"
21+
- "-c"
22+
- "${{inputs.command}}"

.github/workflows/esp_idf.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: ESP-IDF build
22
on:
33
push:
4-
branches: [ master ]
4+
branches:
5+
- master
6+
- v2.0dev
57
pull_request:
68
branches: [ master ]
79

@@ -16,9 +18,27 @@ jobs:
1618
- name: Checkout repo
1719
uses: actions/checkout@v4
1820
with:
21+
ref: ${{ github.ref }}
1922
submodules: 'recursive'
2023
- name: ESP-IDF v5.1 build
2124
uses: ./.github/actions/esp-idf-with-node
2225
with:
2326
target: "${{ matrix.target }}"
2427
command: "idf.py set-target ${{matrix.target}} build"
28+
build_esp32_v5_2:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
matrix:
32+
target: ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6"]
33+
fail-fast: false
34+
steps:
35+
- name: Checkout repo
36+
uses: actions/checkout@v4
37+
with:
38+
ref: ${{ github.ref }}
39+
submodules: 'recursive'
40+
- name: ESP-IDF v5.2 build
41+
uses: ./.github/actions/esp-idf-5_2-with-node
42+
with:
43+
target: "${{ matrix.target }}"
44+
command: "idf.py set-target ${{matrix.target}} build"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ For questions or general chatting regarding DroneBridge for ESP32 please visit t
117117
### Compile
118118
You will need the Espressif SDK: esp-idf + toolchain. Check out their website for more info and on how to set it up.
119119
The code is written in pure C using the esp-idf (no Arduino libs).
120-
Compile using esp-idf v5.1.2
120+
Compile using esp-idf v5.1 or esp-idf v5.2
121121
- ESP32 `idf.py set-target esp32 build`
122122
- ESP32S2 `idf.py set-target esp32s2 build`
123123
- ESP32S3 `idf.py set-target esp32s3 build`
124124
- ESP32C3 `idf.py set-target esp32c3 build`
125125

126126
Or compile all at once with release configuration running the release scripts for bash or powershell `create_release_zip.sh` or `create_release_zip.ps1`
127127

128-
**This project supports the v5.1.2 of ESP-IDF**
128+
**This project supports the v5.1.2 & v5.2.2 of ESP-IDF**
129129
Compile and flash by running: `idf.py build`, `idf.py flash`
130130

131131
The web interface is built using the command `idf.py frontend`. This is done automatically when compiling the entire project using `idf.py build`.

create_release_zip.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ cp .\build\bootloader\bootloader.bin $release_foldername\esp32c3_USBSerial
6363
cp .\build\www.bin $release_foldername\esp32c3_USBSerial
6464
cp .\build\partition_table\partition-table.bin $release_foldername\esp32c3_USBSerial
6565

66+
rm -Recurse .\build
67+
idf.py fullclean
68+
cp .\sdkconfig_c6 .\sdkconfig
69+
idf.py build
70+
mkdir $release_foldername\esp32c6
71+
cp .\build\flash_args $release_foldername\esp32c6\flash_args.txt
72+
cp .\build\db_esp32.bin $release_foldername\esp32c6
73+
cp .\build\bootloader\bootloader.bin $release_foldername\esp32c6
74+
cp .\build\www.bin $release_foldername\esp32c6
75+
cp .\build\partition_table\partition-table.bin $release_foldername\esp32c6
76+
6677
if (Test-Path $release_name_zip) {
6778
Remove-Item $release_name_zip -verbose
6879
}

create_release_zip.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,17 @@ cp build/bootloader/bootloader.bin "$release_foldername/esp32c3_USBSerial"
6262
cp build/www.bin "$release_foldername/esp32c3_USBSerial"
6363
cp build/partition_table/partition-table.bin "$release_foldername/esp32c3_USBSerial"
6464

65+
rm -rf build
66+
idf.py fullclean
67+
cp sdkconfig_c6 sdkconfig
68+
idf.py build
69+
mkdir "$release_foldername/esp32c6"
70+
cp build/flash_args "$release_foldername/esp32c6/flash_args.txt"
71+
cp build/db_esp32.bin "$release_foldername/esp32c6"
72+
cp build/bootloader/bootloader.bin "$release_foldername/esp32c6"
73+
cp build/www.bin "$release_foldername/esp32c6"
74+
cp build/partition_table/partition-table.bin "$release_foldername/esp32c6"
75+
6576
if [ -f "$release_name_zip" ]; then
6677
rm "$release_name_zip"
6778
fi

flashing_instructions.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
0. On Windows you may need to run: "python -m esptool ..." instead of "esptool.py ..." - You can specify a port using e.g. "esptool.py -p COM4 ..."
12
1. esptool.py -p (PORT) erase_flash
23
2. Flash your esp32 with the command below using esptool.py
34
ESP32:
45
-------
5-
esptool.py -p (PORT) -b 115200 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x110000 www.bin
6+
esptool --chip esp32 -b 115200 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x190000 www.bin
67

78

89
ESP32S2:
@@ -17,12 +18,16 @@
1718

1819
ESP32C3:
1920
-------
20-
esptool.py -p (PORT) -b 115200 --before default_reset --after hard_reset --chip esp32c3 write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x110000 www.bin
21+
esptool --chip esp32c3 -b 115200 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x190000 www.bin
2122

2223

2324
ESP32C3 USB Serial: For use as GND station and onboard USB. Flash the official board HWv1.x with this firmware to disable the TELEM1 serial and use the onboard USB-C instead for serial IO with the GCS. No need for a FTDI adapter.
2425
------------------
25-
esptool.py -p (PORT) -b 115200 --before default_reset --after hard_reset --chip esp32c3 write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x110000 www.bin
26+
esptool --chip esp32c3 -b 115200 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x190000 www.bin
27+
28+
ESP32C6:
29+
-------
30+
esptool --chip esp32c6 -b 115200 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 db_esp32.bin 0x190000 www.bin
2631

2732
3.
2833
Then connect your laptop or phone to the DroneBridge ESP32 WiFi access point and open the link http://192.168.2.1/ in a browser (depending on your setup, the easier to remember URL http://dronebridge.local/ may also work).

0 commit comments

Comments
 (0)