Skip to content

Commit

Permalink
Merge pull request #94 from DroneBridge/v2.0dev
Browse files Browse the repository at this point in the history
v2.0 stable
  • Loading branch information
seeul8er authored Jan 2, 2025
2 parents b8c80c8 + 38661c2 commit c25d7ee
Show file tree
Hide file tree
Showing 29 changed files with 19,856 additions and 842 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM espressif/idf:release-v5.2
FROM espressif/idf:release-v5.3
RUN apt update
RUN apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ branding:
color: red
icon: wifi
inputs:
target:
description: "ESP32 variant to build for"
default: "esp32"
required: false
command:
description: "Command to run inside the docker container (default: builds the project)"
default: "idf.py build"
default: "./create_release_zip.sh"
required: false
runs:
using: 'docker'
image: 'Dockerfile'
env:
IDF_TARGET: "${{inputs.target}}"
args:
- "/bin/bash"
- "-c"
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/esp-idf-with-node/Dockerfile

This file was deleted.

22 changes: 0 additions & 22 deletions .github/actions/esp-idf-with-node/action.yml

This file was deleted.

40 changes: 11 additions & 29 deletions .github/workflows/esp_idf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,7 @@ on:
branches: [ master ]

jobs:
build_esp32_v5_1:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["esp32", "esp32s2", "esp32s3", "esp32c3"]
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: 'recursive'
- name: ESP-IDF v5.1 build
uses: ./.github/actions/esp-idf-with-node
with:
target: "${{ matrix.target }}"
command: "idf.py set-target ${{matrix.target}} build"
build_esp32_v5_2:
build_idf_v5_3_generic:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -37,25 +20,24 @@ jobs:
with:
ref: ${{ github.ref }}
submodules: 'recursive'
- name: ESP-IDF v5.2 build
uses: ./.github/actions/esp-idf-5_2-with-node
- name: Generic ESP-IDF v5.3 target build
uses: ./.github/actions/esp-idf-5_3-with-node
with:
target: "${{ matrix.target }}"
command: "idf.py set-target ${{matrix.target}} build"
build_esp32_v5_3:
build_idf_v5_3_nightly_release:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6"]
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: 'recursive'
- name: ESP-IDF v5.3 build
uses: ./.github/actions/esp-idf-5_3-with-node
- name: Release config build ESP-IDF v5.3
uses: ./.github/actions/esp-idf-5_3-with-node_nightly
with:
target: "${{ matrix.target }}"
command: "idf.py set-target ${{matrix.target}} build"
command: "bash ./create_release_zip.sh"
- uses: actions/upload-artifact@v4
with:
name: DroneBridge_ESP32_nightly
path: DroneBridge_ESP32_nightly
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ add_custom_command (
POST_BUILD
COMMAND cmake -E remove_directory "${CMAKE_SOURCE_DIR}/frontend/build"
)
set(PROJECT_VER "2.0RC3")
set(PROJECT_VER "2.0 stable")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(db_esp32)
101 changes: 36 additions & 65 deletions create_release_zip.ps1
Original file line number Diff line number Diff line change
@@ -1,82 +1,53 @@
# Execute in an esp-idf enabled PowerShell
# Execute in an esp-idf enabled PowerShell
# This script will create a combined zip file containing binaries for all supported esp32 boards

$release_foldername = "DroneBridge_ESP32_v2.0RC3"
$release_name_zip = "DroneBridge_ESP32_v2.0RC3.zip"
$release_foldername = "DroneBridge_ESP32_nightly"
$release_name_zip = "DroneBridge_ESP32_nightly.zip"

mkdir $release_foldername
mkdir build
cp .\flashing_instructions.txt $release_foldername

rm -Recurse .\build
idf.py fullclean
cp .\sdkconfig_esp32 .\sdkconfig
idf.py build
mkdir $release_foldername\esp32
cp .\build\flash_args $release_foldername\esp32\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\esp32
cp .\build\bootloader\bootloader.bin $release_foldername\esp32
cp .\build\www.bin $release_foldername\esp32
cp .\build\partition_table\partition-table.bin $release_foldername\esp32
function BuildAndCopy($config, $folder) {
rm -Recurse -Force .\build
idf.py fullclean
cp .\$config .\sdkconfig
idf.py build
mkdir $release_foldername\$folder
cp .\build\flash_args $release_foldername\$folder\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\$folder
cp .\build\bootloader\bootloader.bin $release_foldername\$folder
cp .\build\www.bin $release_foldername\$folder
cp .\build\partition_table\partition-table.bin $release_foldername\$folder
}

rm -Recurse .\build
idf.py fullclean
cp .\sdkconfig_s2 .\sdkconfig
idf.py build
mkdir $release_foldername\esp32s2
cp .\build\flash_args $release_foldername\esp32s2\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\esp32s2
cp .\build\bootloader\bootloader.bin $release_foldername\esp32s2
cp .\build\www.bin $release_foldername\esp32s2
cp .\build\partition_table\partition-table.bin $release_foldername\esp32s2
# ESP32
BuildAndCopy "sdkconfig_esp32" "esp32"
# BuildAndCopy "sdkconfig_esp32_noUARTConsole" "esp32_noUARTConsole" # Build issue - ESP-NOW wants a console for debugging

rm -Recurse .\build
idf.py fullclean
cp .\sdkconfig_s3 .\sdkconfig
idf.py build
mkdir $release_foldername\esp32s3
cp .\build\flash_args $release_foldername\esp32s3\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\esp32s3
cp .\build\bootloader\bootloader.bin $release_foldername\esp32s3
cp .\build\www.bin $release_foldername\esp32s3
cp .\build\partition_table\partition-table.bin $release_foldername\esp32s3
# ESP32-S2
BuildAndCopy "sdkconfig_s2" "esp32s2"
BuildAndCopy "sdkconfig_s2_noUARTConsole" "esp32s2_noUARTConsole"

rm -Recurse .\build
idf.py fullclean
cp .\sdkconfig_c3 .\sdkconfig
idf.py build
mkdir $release_foldername\esp32c3
cp .\build\flash_args $release_foldername\esp32c3\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\esp32c3
cp .\build\bootloader\bootloader.bin $release_foldername\esp32c3
cp .\build\www.bin $release_foldername\esp32c3
cp .\build\partition_table\partition-table.bin $release_foldername\esp32c3
# ESP32-S3
BuildAndCopy "sdkconfig_s3" "esp32s3"
BuildAndCopy "sdkconfig_s3_noUARTConsole" "esp32s3_noUARTConsole"
BuildAndCopy "sdkconfig_s3_serial_via_JTAG" "esp32s3_USBSerial"

rm -Recurse .\build
idf.py fullclean
cp .\sdkconfig_c3_serial_via_JTAG .\sdkconfig
idf.py build
mkdir $release_foldername\esp32c3_USBSerial
cp .\build\flash_args $release_foldername\esp32c3_USBSerial\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\esp32c3_USBSerial
cp .\build\bootloader\bootloader.bin $release_foldername\esp32c3_USBSerial
cp .\build\www.bin $release_foldername\esp32c3_USBSerial
cp .\build\partition_table\partition-table.bin $release_foldername\esp32c3_USBSerial
# ESP32-C3
BuildAndCopy "sdkconfig_c3" "esp32c3"
BuildAndCopy "sdkconfig_c3_official" "esp32c3_official"
BuildAndCopy "sdkconfig_c3_serial_via_JTAG" "esp32c3_USBSerial"
BuildAndCopy "sdkconfig_c3_noUARTConsole" "esp32c3_noUARTConsole"

rm -Recurse .\build
idf.py fullclean
cp .\sdkconfig_c6 .\sdkconfig
idf.py build
mkdir $release_foldername\esp32c6
cp .\build\flash_args $release_foldername\esp32c6\flash_args.txt
cp .\build\db_esp32.bin $release_foldername\esp32c6
cp .\build\bootloader\bootloader.bin $release_foldername\esp32c6
cp .\build\www.bin $release_foldername\esp32c6
cp .\build\partition_table\partition-table.bin $release_foldername\esp32c6
# ESP32-C6
BuildAndCopy "sdkconfig_c6" "esp32c6"
BuildAndCopy "sdkconfig_c6_serial_via_JTAG" "esp32c6_USBSerial"
BuildAndCopy "sdkconfig_c6_noUARTConsole" "esp32c6_noUARTConsole"

if (Test-Path $release_name_zip) {
Remove-Item $release_name_zip -verbose
Remove-Item $release_name_zip -Verbose
}
Compress-Archive -Path $release_foldername -DestinationPath $release_name_zip

rm -R $release_foldername
rm -Recurse -Force $release_foldername
135 changes: 58 additions & 77 deletions create_release_zip.sh
Original file line number Diff line number Diff line change
@@ -1,81 +1,62 @@
#!/bin/bash

release_foldername="DroneBridge_ESP32_vXX"
release_name_zip="DroneBridge_ESP32_vXX.zip"

mkdir "$release_foldername"
mkdir build
cp flashing_instructions.txt "$release_foldername"

rm -rf build
idf.py fullclean
cp sdkconfig_esp32 sdkconfig
idf.py build
mkdir "$release_foldername/esp32"
cp build/flash_args "$release_foldername/esp32/flash_args.txt"
cp build/db_esp32.bin "$release_foldername/esp32"
cp build/bootloader/bootloader.bin "$release_foldername/esp32"
cp build/www.bin "$release_foldername/esp32"
cp build/partition_table/partition-table.bin "$release_foldername/esp32"

rm -rf build
idf.py fullclean
cp sdkconfig_s2 sdkconfig
idf.py build
mkdir "$release_foldername/esp32s2"
cp build/flash_args "$release_foldername/esp32s2/flash_args.txt"
cp build/db_esp32.bin "$release_foldername/esp32s2"
cp build/bootloader/bootloader.bin "$release_foldername/esp32s2"
cp build/www.bin "$release_foldername/esp32s2"
cp build/partition_table/partition-table.bin "$release_foldername/esp32s2"

rm -rf build
idf.py fullclean
cp sdkconfig_s3 sdkconfig
idf.py build
mkdir "$release_foldername/esp32s3"
cp build/flash_args "$release_foldername/esp32s3/flash_args.txt"
cp build/db_esp32.bin "$release_foldername/esp32s3"
cp build/bootloader/bootloader.bin "$release_foldername/esp32s3"
cp build/www.bin "$release_foldername/esp32s3"
cp build/partition_table/partition-table.bin "$release_foldername/esp32s3"

rm -rf build
idf.py fullclean
cp sdkconfig_c3 sdkconfig
idf.py build
mkdir "$release_foldername/esp32c3"
cp build/flash_args "$release_foldername/esp32c3/flash_args.txt"
cp build/db_esp32.bin "$release_foldername/esp32c3"
cp build/bootloader/bootloader.bin "$release_foldername/esp32c3"
cp build/www.bin "$release_foldername/esp32c3"
cp build/partition_table/partition-table.bin "$release_foldername/esp32c3"

rm -rf build
idf.py fullclean
cp sdkconfig_c3_serial_via_JTAG sdkconfig
idf.py build
mkdir "$release_foldername/esp32c3_USBSerial"
cp build/flash_args "$release_foldername/esp32c3_USBSerial/flash_args.txt"
cp build/db_esp32.bin "$release_foldername/esp32c3_USBSerial"
cp build/bootloader/bootloader.bin "$release_foldername/esp32c3_USBSerial"
cp build/www.bin "$release_foldername/esp32c3_USBSerial"
cp build/partition_table/partition-table.bin "$release_foldername/esp32c3_USBSerial"

rm -rf build
idf.py fullclean
cp sdkconfig_c6 sdkconfig
idf.py build
mkdir "$release_foldername/esp32c6"
cp build/flash_args "$release_foldername/esp32c6/flash_args.txt"
cp build/db_esp32.bin "$release_foldername/esp32c6"
cp build/bootloader/bootloader.bin "$release_foldername/esp32c6"
cp build/www.bin "$release_foldername/esp32c6"
cp build/partition_table/partition-table.bin "$release_foldername/esp32c6"

if [ -f "$release_name_zip" ]; then
rm "$release_name_zip"
# Execute in an esp-idf enabled shell
# This script will create a combined zip file containing binaries for all supported esp32 boards

release_foldername="DroneBridge_ESP32_nightly"
release_name_zip="DroneBridge_ESP32_nightly.zip"

mkdir -p $release_foldername
mkdir -p build
cp ./flashing_instructions.txt $release_foldername

# Function to build and copy binaries for different configurations
build_and_copy() {
config=$1
folder=$2

rm -rf ./build
cp $config sdkconfig
idf.py fullclean
cp $config sdkconfig
idf.py build
mkdir -p $release_foldername/$folder
cp ./build/flash_args $release_foldername/$folder/flash_args.txt
cp ./build/db_esp32.bin $release_foldername/$folder
cp ./build/bootloader/bootloader.bin $release_foldername/$folder
cp ./build/www.bin $release_foldername/$folder
cp ./build/partition_table/partition-table.bin $release_foldername/$folder
}

# ESP32
build_and_copy sdkconfig_esp32 esp32
# build_and_copy sdkconfig_esp32_noUARTConsole esp32_noUARTConsole # Build issue - ESP-NOW wants a console for debugging

# ESP32-S2
build_and_copy sdkconfig_s2 esp32s2
build_and_copy sdkconfig_s2_noUARTConsole esp32s2_noUARTConsole

# ESP32-S3
build_and_copy sdkconfig_s3 esp32s3
build_and_copy sdkconfig_s3_noUARTConsole esp32s3_noUARTConsole
build_and_copy sdkconfig_s3_serial_via_JTAG esp32s3_USBSerial

# ESP32-C3
build_and_copy sdkconfig_c3 esp32c3
build_and_copy sdkconfig_c3_official esp32c3_official
build_and_copy sdkconfig_c3_serial_via_JTAG esp32c3_USBSerial
build_and_copy sdkconfig_c3_noUARTConsole esp32c3_noUARTConsole

# ESP32-C6
build_and_copy sdkconfig_c6 esp32c6
build_and_copy sdkconfig_c6_serial_via_JTAG esp32c6_USBSerial
build_and_copy sdkconfig_c6_noUARTConsole esp32c6_noUARTConsole

# Create the zip file
if [ -f $release_name_zip ]; then
rm -v $release_name_zip
fi
zip -r "$release_name_zip" "$release_foldername"
zip -r $release_name_zip $release_foldername

rm -rf "$release_foldername"
# Clean up
# rm -rf $release_foldername
3 changes: 3 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,14 @@ <h3>Serial</h3>
<label for="baud">UART baud</label>
<select name="baud" id="baud" form="settings_form">
<option value="5000000">5000000</option>
<option value="1500000">3000000</option>
<option value="1500000">2000000</option>
<option value="1500000">1500000</option>
<option value="1000000">1000000</option>
<option value="500000">500000</option>
<option value="921600">921600</option>
<option value="576000">576000</option>
<option value="460800">500800</option>
<option value="460800">460800</option>
<option value="230400">230400</option>
<option value="115200">115200</option>
Expand Down
Loading

0 comments on commit c25d7ee

Please sign in to comment.