Skip to content

Commit ea8c153

Browse files
authored
Merge branch 'master' into feature/rtos-cbuf
2 parents e3dee99 + e97a519 commit ea8c153

File tree

9,890 files changed

+36682
-2109088
lines changed

Some content is hidden

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

9,890 files changed

+36682
-2109088
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

+7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v2.0.14
45+
- v2.0.13
46+
- v2.0.12
47+
- v2.0.11
48+
- v2.0.10
49+
- v2.0.9
50+
- v2.0.8
4451
- v2.0.7
4552
- v2.0.6
4653
- v2.0.5

.github/pytools/Sign-File.ps1

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
[CmdletBinding()]
2+
param (
3+
[Parameter()]
4+
[String]
5+
$Path
6+
)
7+
8+
9+
function FindSignTool {
10+
$SignTool = "signtool.exe"
11+
if (Get-Command $SignTool -ErrorAction SilentlyContinue) {
12+
return $SignTool
13+
}
14+
$SignTool = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x64\signtool.exe"
15+
if (Test-Path -Path $SignTool -PathType Leaf) {
16+
return $SignTool
17+
}
18+
$SignTool = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\x86\signtool.exe"
19+
if (Test-Path -Path $SignTool -PathType Leaf) {
20+
return $SignTool
21+
}
22+
$sdkVers = "10.0.22000.0", "10.0.20348.0", "10.0.19041.0", "10.0.17763.0"
23+
Foreach ($ver in $sdkVers)
24+
{
25+
$SignTool = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\${ver}\x64\signtool.exe"
26+
if (Test-Path -Path $SignTool -PathType Leaf) {
27+
return $SignTool
28+
}
29+
}
30+
"signtool.exe not found"
31+
Exit 1
32+
}
33+
34+
function SignEsptool {
35+
param(
36+
[Parameter()]
37+
[String]
38+
$Path
39+
)
40+
41+
$SignTool = FindSignTool
42+
"Using: $SignTool"
43+
$CertificateFile = [system.io.path]::GetTempPath() + "certificate.pfx"
44+
45+
if ($null -eq $env:CERTIFICATE) {
46+
"CERTIFICATE variable not set, unable to sign the file"
47+
Exit 1
48+
}
49+
50+
if ("" -eq $env:CERTIFICATE) {
51+
"CERTIFICATE variable is empty, unable to sign the file"
52+
Exit 1
53+
}
54+
55+
$SignParameters = @("sign", "/tr", 'http://timestamp.digicert.com', "/td", "SHA256", "/f", $CertificateFile, "/fd", "SHA256")
56+
if ($env:CERTIFICATE_PASSWORD) {
57+
"CERTIFICATE_PASSWORD detected, using the password"
58+
$SignParameters += "/p"
59+
$SignParameters += $env:CERTIFICATE_PASSWORD
60+
}
61+
$SignParameters += $Path
62+
63+
[byte[]]$CertificateBytes = [convert]::FromBase64String($env:CERTIFICATE)
64+
[IO.File]::WriteAllBytes($CertificateFile, $CertificateBytes)
65+
66+
&$SignTool $SignParameters
67+
68+
if (0 -eq $LASTEXITCODE) {
69+
Remove-Item $CertificateFile
70+
} else {
71+
Remove-Item $CertificateFile
72+
"Signing failed"
73+
Exit 1
74+
}
75+
76+
}
77+
78+
SignEsptool ${Path}

.github/pytools/espressif.ico

115 KB
Binary file not shown.

.github/scripts/find_all_boards.sh

+35
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

+90
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

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

+10-4
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-patch5"
7-
ESPTOOLPY_VERSION="~1.40400.0"
6+
TOOLCHAIN_VERSION="12.2.0+20230208"
7+
ESPTOOLPY_VERSION="~1.40501.0"
88
ESPRESSIF_ORGANIZATION_NAME="espressif"
99

1010
echo "Installing Python Wheel ..."
@@ -30,9 +30,15 @@ replace_script+="data['packages']['toolchain-riscv32-esp']['owner']='$ESPRESSIF_
3030
# Update versions to use the upstream
3131
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$TOOLCHAIN_VERSION';"
3232
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$TOOLCHAIN_VERSION';"
33+
replace_script+="data['packages']['toolchain-xtensa-esp32s3']['version']='$TOOLCHAIN_VERSION';"
3334
replace_script+="data['packages']['toolchain-riscv32-esp']['version']='$TOOLCHAIN_VERSION';"
34-
# Add ESP32-S3 Toolchain
35-
replace_script+="data['packages'].update({'toolchain-xtensa-esp32s3':{'type':'toolchain','optional':True,'owner':'$ESPRESSIF_ORGANIZATION_NAME','version':'$TOOLCHAIN_VERSION'}});"
35+
# Add new "framework-arduinoespressif32-libs" package
36+
# Read "package_esp32_index.template.json" to extract a url to a zip package for "esp32-arduino-libs"
37+
replace_script+="fpackage=open(os.path.join('package', 'package_esp32_index.template.json'), 'r+');"
38+
replace_script+="package_data=json.load(fpackage);"
39+
replace_script+="fpackage.close();"
40+
replace_script+="libs_package_archive_url=next(next(system['url'] for system in tool['systems'] if system['host'] == 'x86_64-pc-linux-gnu') for tool in package_data['packages'][0]['tools'] if tool['name'] == 'esp32-arduino-libs');"
41+
replace_script+="data['packages'].update({'framework-arduinoespressif32-libs':{'type':'framework','optional':False,'version':libs_package_archive_url}});"
3642
replace_script+="data['packages']['toolchain-xtensa-esp32'].update({'optional':False});"
3743
# esptool.py may require an upstream version (for now platformio is the owner)
3844
replace_script+="data['packages']['tool-esptoolpy']['version']='$ESPTOOLPY_VERSION';"

.github/scripts/on-push.sh

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ if [ "$BUILD_PIO" -eq 0 ]; then
6868
FQBN_ESP32S2="espressif:esp32:esp32s2:PSRAM=enabled,PartitionScheme=huge_app"
6969
FQBN_ESP32S3="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
7070
FQBN_ESP32C3="espressif:esp32:esp32c3:PartitionScheme=huge_app"
71+
FQBN_ESP32C6="espressif:esp32:esp32c6:PartitionScheme=huge_app"
72+
FQBN_ESP32H2="espressif:esp32:esp32h2:PartitionScheme=huge_app"
7173

7274
SKETCHES_ESP32="\
7375
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
@@ -85,6 +87,8 @@ if [ "$BUILD_PIO" -eq 0 ]; then
8587
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8688
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
8789
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
90+
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
91+
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
8892
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8993
else
9094
source ${SCRIPTS_DIR}/install-platformio-esp32.sh

0 commit comments

Comments
 (0)