Skip to content

Commit 8de5fc2

Browse files
authored
Merge branch 'master' into issue_6221_cdc_tx
2 parents 3ce1935 + 3ec5f4e commit 8de5fc2

File tree

1,239 files changed

+349757
-10267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,239 files changed

+349757
-10267
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v2.0.9
45+
- v2.0.8
46+
- v2.0.7
47+
- v2.0.6
48+
- v2.0.5
4449
- v2.0.4
4550
- v2.0.3
4651
- v2.0.2

.github/scripts/find_all_boards.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Get all boards
4+
boards_array=()
5+
6+
for line in `grep '.tarch=' boards.txt`; do
7+
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
8+
boards_array+=("espressif:esp32:$board_name")
9+
echo "Added 'espressif:esp32:$board_name' to array"
10+
done
11+
12+
# Create JSON like string with all boards found and pass it to env variable
13+
board_count=${#boards_array[@]}
14+
echo "Boards found: $board_count"
15+
echo "BOARD-COUNT=$board_count" >> $GITHUB_ENV
16+
17+
if [ $board_count -gt 0 ]
18+
then
19+
json_matrix='['
20+
for board in ${boards_array[@]}
21+
do
22+
json_matrix+='"'$board'"'
23+
if [ $board_count -gt 1 ]
24+
then
25+
json_matrix+=","
26+
fi
27+
board_count=$(($board_count - 1))
28+
done
29+
json_matrix+=']'
30+
31+
echo $json_matrix
32+
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
33+
else
34+
echo "FQBNS=" >> $GITHUB_ENV
35+
fi

.github/scripts/find_new_boards.sh

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/bin/bash
2+
3+
# Get inputs from command
4+
owner_repository=$1
5+
pr_number=$2
6+
7+
url="https://api.github.com/repos/$owner_repository/pulls/$pr_number/files"
8+
echo $url
9+
10+
# Get changes in boards.txt file from PR
11+
Patch=$(curl $url | jq -r '.[] | select(.filename == "boards.txt") | .patch ')
12+
13+
# Extract only changed lines number and count
14+
substring_patch=$(echo "$Patch" | grep -o '@@[^@]*@@')
15+
16+
params_array=()
17+
18+
IFS=$'\n' read -d '' -ra params <<< $(echo "$substring_patch" | grep -oE '[-+][0-9]+,[0-9]+')
19+
20+
for param in "${params[@]}"
21+
do
22+
echo "The parameter is $param"
23+
params_array+=("$param")
24+
done
25+
26+
boards_array=()
27+
previous_board=""
28+
file="boards.txt"
29+
30+
# Loop through boards.txt file and extract all boards that were added
31+
for (( c=0; c<${#params_array[@]}; c+=2 ))
32+
do
33+
deletion_count=$( echo "${params_array[c]}" | cut -d',' -f2 | cut -d' ' -f1 )
34+
addition_line=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f1 )
35+
addition_count=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f2 | cut -d' ' -f1 )
36+
addition_end=$(($addition_line+$addition_count))
37+
38+
addition_line=$(($addition_line + 3))
39+
addition_end=$(($addition_end - $deletion_count))
40+
41+
echo $addition_line
42+
echo $addition_end
43+
44+
i=0
45+
46+
while read -r line
47+
do
48+
i=$((i+1))
49+
if [ $i -lt $addition_line ]
50+
then
51+
continue
52+
elif [ $i -gt $addition_end ]
53+
then
54+
break
55+
fi
56+
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
57+
if [ "$board_name" != "" ]
58+
then
59+
if [ "$board_name" != "$previous_board" ]
60+
then
61+
boards_array+=("espressif:esp32:$board_name")
62+
previous_board="$board_name"
63+
echo "Added 'espressif:esp32:$board_name' to array"
64+
fi
65+
fi
66+
done < "$file"
67+
done
68+
69+
# Create JSON like string with all boards found and pass it to env variable
70+
board_count=${#boards_array[@]}
71+
72+
if [ $board_count -gt 0 ]
73+
then
74+
json_matrix='{"fqbn": ['
75+
for board in ${boards_array[@]}
76+
do
77+
json_matrix+='"'$board'"'
78+
if [ $board_count -gt 1 ]
79+
then
80+
json_matrix+=","
81+
fi
82+
board_count=$(($board_count - 1))
83+
done
84+
json_matrix+=']}'
85+
86+
echo $json_matrix
87+
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
88+
else
89+
echo "FQBNS=" >> $GITHUB_ENV
90+
fi
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
OSBITS=`arch`
4+
if [[ "$OSTYPE" == "linux"* ]]; then
5+
export OS_IS_LINUX="1"
6+
if [[ "$OSBITS" == "i686" ]]; then
7+
OS_NAME="linux32"
8+
elif [[ "$OSBITS" == "x86_64" ]]; then
9+
OS_NAME="linux64"
10+
elif [[ "$OSBITS" == "armv7l" || "$OSBITS" == "aarch64" ]]; then
11+
OS_NAME="linuxarm"
12+
else
13+
OS_NAME="$OSTYPE-$OSBITS"
14+
echo "Unknown OS '$OS_NAME'"
15+
exit 1
16+
fi
17+
elif [[ "$OSTYPE" == "darwin"* ]]; then
18+
export OS_IS_MACOS="1"
19+
OS_NAME="macosx"
20+
elif [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then
21+
export OS_IS_WINDOWS="1"
22+
OS_NAME="windows"
23+
else
24+
OS_NAME="$OSTYPE-$OSBITS"
25+
echo "Unknown OS '$OS_NAME'"
26+
exit 1
27+
fi
28+
export OS_NAME
29+
30+
if [ "$OS_IS_MACOS" == "1" ]; then
31+
export ARDUINO_IDE_PATH="$HOME/bin"
32+
export ARDUINO_USR_PATH="$HOME/Documents/Arduino"
33+
elif [ "$OS_IS_WINDOWS" == "1" ]; then
34+
export ARDUINO_IDE_PATH="$HOME/bin"
35+
export ARDUINO_USR_PATH="$HOME/Documents/Arduino"
36+
else
37+
export ARDUINO_IDE_PATH="$HOME/bin"
38+
export ARDUINO_USR_PATH="$HOME/Arduino"
39+
fi
40+
41+
if [ ! -d "$ARDUINO_IDE_PATH" ] || [ ! -f "$ARDUINO_IDE_PATH/arduino-cli" ]; then
42+
echo "Installing Arduino CLI on $OS_NAME ..."
43+
mkdir -p "$ARDUINO_IDE_PATH"
44+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
45+
fi
46+

.github/scripts/install-platformio-esp32.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
44
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git"
55

6-
TOOLCHAIN_VERSION="8.4.0+2021r2-patch3"
7-
ESPTOOLPY_VERSION="~1.30100.0"
6+
TOOLCHAIN_VERSION="8.4.0+2021r2-patch5"
7+
ESPTOOLPY_VERSION="~1.40400.0"
88
ESPRESSIF_ORGANIZATION_NAME="espressif"
99

1010
echo "Installing Python Wheel ..."

.github/scripts/on-push.sh

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function build(){
99
local fqbn=$2
1010
local chunk_index=$3
1111
local chunks_cnt=$4
12-
local sketches=$5
12+
shift; shift; shift; shift;
13+
local sketches=$*
1314

1415
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
1516
local BUILD_SKETCHES="${SCRIPTS_DIR}/sketch_utils.sh chunk_build"
@@ -24,15 +25,15 @@ function build(){
2425
${BUILD_SKETCHES} ${args}
2526
else
2627
for sketch in ${sketches}; do
27-
args+=" -s $(dirname $sketch)"
28-
if [ "$OS_IS_WINDOWS" == "1" ]; then
28+
local sargs="$args -s $(dirname $sketch)"
29+
if [ "$OS_IS_WINDOWS" == "1" ] && [ -d "$ARDUINO_IDE_PATH/tools-builder" ]; then
2930
local ctags_version=`ls "$ARDUINO_IDE_PATH/tools-builder/ctags/"`
3031
local preprocessor_version=`ls "$ARDUINO_IDE_PATH/tools-builder/arduino-preprocessor/"`
3132
win_opts="-prefs=runtime.tools.ctags.path=$ARDUINO_IDE_PATH/tools-builder/ctags/$ctags_version
3233
-prefs=runtime.tools.arduino-preprocessor.path=$ARDUINO_IDE_PATH/tools-builder/arduino-preprocessor/$preprocessor_version"
33-
args+=" ${win_opts}"
34+
sargs+=" ${win_opts}"
3435
fi
35-
${BUILD_SKETCH} ${args}
36+
${BUILD_SKETCH} ${sargs}
3637
done
3738
fi
3839
}
@@ -59,7 +60,8 @@ fi
5960

6061
SCRIPTS_DIR="./.github/scripts"
6162
if [ "$BUILD_PIO" -eq 0 ]; then
62-
source ${SCRIPTS_DIR}/install-arduino-ide.sh
63+
#source ${SCRIPTS_DIR}/install-arduino-ide.sh
64+
source ${SCRIPTS_DIR}/install-arduino-cli.sh
6365
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh
6466

6567
FQBN_ESP32="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
@@ -71,11 +73,13 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7173
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
7274
$ARDUINO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino\
7375
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
76+
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
7477
"
7578

7679
SKETCHES_ESP32XX="\
7780
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
7881
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
82+
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
7983
"
8084

8185
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
@@ -93,26 +97,11 @@ else
9397
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino" && \
9498
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino"
9599

96-
# PlatformIO ESP32 Test
97-
# OPTIONS="board_build.mcu = esp32s2"
98-
# build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino" && \
99-
# build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino"
100-
101-
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32s2" --project-option="board_build.partitions = huge_app.csv"
102-
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32c3" --project-option="board_build.partitions = huge_app.csv"
103-
104-
echo "Hacking in S3 support ..."
105-
replace_script="import json; import os;"
106-
replace_script+="fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+');"
107-
replace_script+="data=json.load(fp);"
108-
replace_script+="data['packages']['toolchain-xtensa-esp32']['optional']=True;"
109-
replace_script+="data['packages']['toolchain-xtensa-esp32s3']['optional']=False;"
110-
replace_script+="data['packages']['tool-esptoolpy']['owner']='tasmota';"
111-
replace_script+="data['packages']['tool-esptoolpy']['version']='https://github.com/tasmota/esptool/releases/download/v4.2.1/esptool-4.2.1.zip';"
112-
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
113-
python -c "$replace_script"
114-
115-
python -m platformio ci --board "$BOARD" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.mcu = esp32s3" --project-option="board_build.partitions = huge_app.csv"
100+
# Basic sanity testing for other series
101+
for board in "esp32-c3-devkitm-1" "esp32-s2-saola-1" "esp32-s3-devkitc-1"
102+
do
103+
python -m platformio ci --board "$board" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient" --project-option="board_build.partitions = huge_app.csv"
104+
done
116105

117106
#build_pio_sketches "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries"
118107
fi

.github/scripts/on-release.sh

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,22 @@ mkdir -p "$PKG_DIR/tools"
171171

172172
# Copy all core files to the package folder
173173
echo "Copying files for packaging ..."
174-
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
175-
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
176-
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
177-
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
178-
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
179-
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
180-
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
181-
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
182-
cp -f "$GITHUB_WORKSPACE/tools/esptool.py" "$PKG_DIR/tools/"
183-
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
184-
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.exe" "$PKG_DIR/tools/"
185-
cp -Rf "$GITHUB_WORKSPACE/tools/partitions" "$PKG_DIR/tools/"
186-
cp -Rf "$GITHUB_WORKSPACE/tools/sdk" "$PKG_DIR/tools/"
187-
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"
174+
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
175+
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
176+
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
177+
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
178+
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
179+
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
180+
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
181+
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
182+
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
183+
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.exe" "$PKG_DIR/tools/"
184+
cp -f "$GITHUB_WORKSPACE/tools/gen_insights_package.py" "$PKG_DIR/tools/"
185+
cp -f "$GITHUB_WORKSPACE/tools/gen_insights_package.exe" "$PKG_DIR/tools/"
186+
cp -Rf "$GITHUB_WORKSPACE/tools/partitions" "$PKG_DIR/tools/"
187+
cp -Rf "$GITHUB_WORKSPACE/tools/ide-debug" "$PKG_DIR/tools/"
188+
cp -Rf "$GITHUB_WORKSPACE/tools/sdk" "$PKG_DIR/tools/"
189+
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"
188190

189191
# Remove unnecessary files in the package folder
190192
echo "Cleaning up folders ..."
@@ -195,9 +197,14 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
195197
echo "Generating platform.txt..."
196198
cat "$GITHUB_WORKSPACE/platform.txt" | \
197199
sed "s/version=.*/version=$ver$extent/g" | \
198-
sed 's/runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf//g' | \
199-
sed 's/runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf//g' | \
200-
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' \
200+
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
201+
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
202+
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
203+
sed 's/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\{runtime.tools.riscv32-esp-elf-gcc.path\}/g' | \
204+
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' | \
205+
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g' | \
206+
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g' | \
207+
sed 's/debug.server.openocd.scripts_dir.windows={runtime.platform.path}\\tools\\openocd-esp32\\share\\openocd\\scripts\\/debug.server.openocd.scripts_dir.windows=\{runtime.tools.openocd-esp32.path\}\\share\\openocd\\scripts\\/g' \
201208
> "$PKG_DIR/platform.txt"
202209

203210
# Add header with version information

0 commit comments

Comments
 (0)