Skip to content

Commit 5a1e070

Browse files
committed
Merge branch 'master' into sse
2 parents 0dcc1f2 + 4cbce10 commit 5a1e070

File tree

10,013 files changed

+398353
-2044430
lines changed

Some content is hidden

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

10,013 files changed

+398353
-2044430
lines changed

Diff for: .github/ISSUE_TEMPLATE/Issue-report.yml

+11
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ 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
51+
- v2.0.7
52+
- v2.0.6
53+
- v2.0.5
54+
- v2.0.4
4455
- v2.0.3
4556
- v2.0.2
4657
- v2.0.1

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
2. [ ] Please provide related links (*eg. Issue which will be closed by this Pull Request*)
66
3. [ ] Please **update relevant Documentation** if applicable
77
4. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html)
8+
5. [ ] Please **confirm option to "Allow edits and access to secrets by maintainers"** when opening a Pull Request
89

910
*This entire section above can be deleted if all items are checked.*
1011

Diff for: .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}

Diff for: .github/pytools/espressif.ico

115 KB
Binary file not shown.

Diff for: .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

Diff for: .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

Diff for: .github/scripts/install-arduino-cli.sh

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

Diff for: .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-patch3"
7-
ESPTOOLPY_VERSION="~1.30100.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';"

0 commit comments

Comments
 (0)