Skip to content

Commit c34ba74

Browse files
authored
Merge branch 'espressif:master' into master
2 parents b96e860 + 0773dd7 commit c34ba74

File tree

991 files changed

+47292
-8864
lines changed

Some content is hidden

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

991 files changed

+47292
-8864
lines changed

‎.codespellrc‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[codespell]
22
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
33
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4-
ignore-words-list = ba,licence,ot,dout,als,exten,acount,totaly,pasttime
4+
ignore-words-list = ba,licence,ot,dout,als,exten
55
skip = ./.git,./.licenses,__pycache__,.clang-format,.codespellrc,.editorconfig,.flake8,.prettierignore,.yamllint.yml,.gitignore,boards.txt,platform.txt,programmers.txt
66
builtin = clear,informal,en-GB_to_en-US
77
check-filenames =
88
check-hidden =
9-
write-changes =

‎.editorconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ indent_size = 2
1818
indent_style = space
1919

2020
[*.{bash,sh}]
21-
indent_size = 2
21+
indent_size = 4
2222
indent_style = space
2323

2424
[*.{c,cc,cp,cpp,cxx,h,hh,hpp,hxx,ii,inl,ino,ixx,pde,tpl,tpp,txx}]

‎.github/ISSUE_TEMPLATE/Issue-report.yml‎

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
8+
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
99
* Please check [Online Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/index.html)
1010
* Take a look on [Troubleshooting guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)
1111
* If still experiencing the issue, please provide as many details as possible below about your hardware, computer setup and code.
@@ -24,7 +24,7 @@ body:
2424
description: What development board or other hardware is the chip attached to?
2525
placeholder: ex. DevKitC, plain module on breadboard, etc. If your hardware is custom or unusual, please attach a photo.
2626
validations:
27-
required: true
27+
required: true
2828
- type: textarea
2929
id: other-hw
3030
attributes:
@@ -41,6 +41,13 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v3.1.0
45+
- v3.0.7
46+
- v3.0.6
47+
- v3.0.5
48+
- v3.0.4
49+
- v3.0.3
50+
- v3.0.2
4451
- v3.0.1
4552
- v3.0.0
4653
- v2.0.17
@@ -55,7 +62,7 @@ body:
5562
- v2.0.8
5663
- v2.0.7
5764
- v2.0.6
58-
- v2.0.5
65+
- v2.0.5
5966
- v2.0.4
6067
- v2.0.3
6168
- v2.0.2
@@ -70,9 +77,9 @@ body:
7077
attributes:
7178
label: IDE Name
7279
description: What IDE are you using?
73-
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
80+
placeholder: eg. Arduino IDE, VSCode, Sloeber...
7481
validations:
75-
required: true
82+
required: true
7683
- type: input
7784
id: os
7885
attributes:
@@ -90,13 +97,13 @@ body:
9097
validations:
9198
required: true
9299
- type: dropdown
93-
id: PSRAM
100+
id: PSRAM
94101
attributes:
95102
label: PSRAM enabled
96103
description: Is PSRAM enabled?
97104
options:
98-
- 'yes'
99-
- 'no'
105+
- "yes"
106+
- "no"
100107
validations:
101108
required: true
102109
- type: input
@@ -111,8 +118,8 @@ body:
111118
id: Description
112119
attributes:
113120
label: Description
114-
description: Please describe your problem here and expected behaviour
115-
placeholder: ex. Can't connect/weird behaviour/wrong function/missing parameter..
121+
description: Please describe your problem here and expected behavior
122+
placeholder: ex. Can't connect/weird behavior/wrong function/missing parameter..
116123
validations:
117124
required: true
118125
- type: textarea
@@ -123,7 +130,7 @@ body:
123130
placeholder: ex. Related part of the code to replicate the issue
124131
render: cpp
125132
validations:
126-
required: true
133+
required: true
127134
- type: textarea
128135
id: Debug
129136
attributes:
@@ -132,11 +139,11 @@ body:
132139
placeholder: Enable Core debug level - Debug on tools menu of Arduino IDE, then put the serial output here.
133140
render: plain
134141
validations:
135-
required: true
142+
required: true
136143
- type: textarea
137144
id: other-remarks
138145
attributes:
139-
label: Other Steps to Reproduce
146+
label: Other Steps to Reproduce
140147
description: Is there any other information you can think of which will help us reproduce this problem? Any additional info can be added as well.
141148
placeholder: ex. I also tried on other OS, HW...it works correctly on that setup.
142149
- type: checkboxes

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ contact_links:
55
about: Community channel for questions and help
66
- name: ESP32 Forum - Arduino
77
url: https://esp32.com/viewforum.php?f=19
8-
about: Official Forum for questions
8+
about: Official Forum for questions

‎.github/scripts/check-cmakelists.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
#
34
# This script is used in the CI workflow. It checks all non-examples source files in libraries/ and cores/ are listed in
45
# CMakeLists.txt for the cmake-based IDF component
@@ -12,10 +13,10 @@ set -e
1213
git submodule update --init --recursive
1314

1415
# find all source files in repo
15-
REPO_SRCS=`find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort`
16+
REPO_SRCS=$(find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort)
1617

1718
# find all source files named in CMakeLists.txt COMPONENT_SRCS
18-
CMAKE_SRCS=`cmake --trace-expand -P CMakeLists.txt 2>&1| grep set\(srcs | cut -d'(' -f3 | sed 's/ )//'| sed 's/srcs //'| tr ' ;''\n'| sort`
19+
CMAKE_SRCS=$(cmake --trace-expand -P CMakeLists.txt 2>&1| grep set\(srcs | cut -d'(' -f3 | sed 's/ )//'| sed 's/srcs //'| tr ' ;''\n'| sort)
1920

2021
if! diff -u0 --label "Repo Files" --label "srcs"<(echo "$REPO_SRCS")<(echo "$CMAKE_SRCS");then
2122
echo"Source files in repo (-) and source files in CMakeLists.txt (+) don't match"

‎.github/scripts/find_all_boards.sh‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# Get all boards
44
boards_array=()
55

6-
forlinein`grep '.tarch=' boards.txt`;do
6+
boards_list=$(grep '.tarch=' boards.txt)
7+
8+
whileread -r line;do
79
board_name=$(echo "$line"| cut -d '.' -f1 | cut -d '#' -f1)
810
# skip esp32c2 as we dont build libs for it
911
if [ "$board_name"=="esp32c2" ];then
@@ -12,29 +14,26 @@ for line in `grep '.tarch=' boards.txt`; do
1214
fi
1315
boards_array+=("espressif:esp32:$board_name")
1416
echo"Added 'espressif:esp32:$board_name' to array"
15-
done
17+
done<<<"$boards_list"
1618

1719
# Create JSON like string with all boards found and pass it to env variable
1820
board_count=${#boards_array[@]}
1921
echo"Boards found: $board_count"
20-
echo"BOARD-COUNT=$board_count">>$GITHUB_ENV
22+
echo"BOARD-COUNT=$board_count">>"$GITHUB_ENV"
2123

22-
if [ $board_count-gt 0 ]
23-
then
24+
if [ "$board_count"-gt 0 ];then
2425
json_matrix='['
25-
forboardin${boards_array[@]}
26-
do
26+
forboardin"${boards_array[@]}";do
2727
json_matrix+='"'$board'"'
28-
if [ $board_count-gt 1 ]
29-
then
28+
if [ "$board_count"-gt 1 ];then
3029
json_matrix+=","
3130
fi
32-
board_count=$(($board_count-1))
31+
board_count=$((board_count -1))
3332
done
3433
json_matrix+=']'
3534

36-
echo$json_matrix
37-
echo"FQBNS=${json_matrix}">>$GITHUB_ENV
35+
echo"$json_matrix"
36+
echo"FQBNS=${json_matrix}">>"$GITHUB_ENV"
3837
else
39-
echo"FQBNS=">>$GITHUB_ENV
38+
echo"FQBNS=">>"$GITHUB_ENV"
4039
fi

‎.github/scripts/find_new_boards.sh‎

Lines changed: 31 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,89 +2,61 @@
22

33
# Get inputs from command
44
owner_repository=$1
5-
pr_number=$2
5+
base_ref=$2
66

7-
url="https://api.github.com/repos/$owner_repository/pulls/$pr_number/files"
8-
echo$url
7+
# Download the boards.txt file from the base branch
8+
curl -L -o boards_base.txt https://raw.githubusercontent.com/"$owner_repository"/"$base_ref"/boards.txt
99

10-
#Get changes in boards.txt file from PR
11-
Patch=$(curl $url| jq -r '.[] | select(.filename == "boards.txt") | .patch ')
10+
#Compare boards.txt file in the repo with the modified file from PR
11+
diff=$(diff -u boards_base.txt boards.txt)
1212

13-
# Extract only changed lines number and count
14-
substring_patch=$(echo "$Patch"| grep -o '@@[^@]*@@')
13+
# Check if the diff is empty
14+
if [ -z"$diff" ];then
15+
echo"No changes in boards.txt file"
16+
echo"FQBNS="
17+
exit 0
18+
fi
1519

16-
params_array=()
20+
# Extract added or modified lines (lines starting with '+' or '-')
21+
modified_lines=$(echo "$diff"| grep -E '^[+-][^+-]')
1722

18-
IFS=$'\n'read -d '' -ra params <<<$(echo"$substring_patch"| grep -oE '[-+][0-9]+,[0-9]+')
19-
20-
forparamin"${params[@]}"
21-
do
22-
echo"The parameter is $param"
23-
params_array+=("$param")
24-
done
23+
# Print the modified lines for debugging
24+
echo"Modified lines:"
25+
echo"$modified_lines"
2526

2627
boards_array=()
2728
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
4329

44-
i=0
45-
46-
whileread -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
30+
# Extract board names from the modified lines, and add them to the boards_array
31+
whileread -r line;do
5632
board_name=$(echo "$line"| cut -d '.' -f1 | cut -d '#' -f1)
57-
if [ "$board_name"!="" ] && [ "$board_name"!="esp32_family" ]
58-
then
59-
if[ "$board_name"!="$previous_board" ]
60-
then
33+
# remove + or - from the board name at the beginning
34+
board_name=${board_name#[-+]}
35+
if [ "$board_name"!="" ] &&[ "$board_name"!="+" ] && [ "$board_name"!="-" ] && [ "$board_name"!="esp32_family" ];then
36+
if [ "$board_name"!="$previous_board" ];then
6137
boards_array+=("espressif:esp32:$board_name")
6238
previous_board="$board_name"
6339
echo"Added 'espressif:esp32:$board_name' to array"
6440
fi
6541
fi
66-
done<"$file"
67-
done
42+
done<<<"$modified_lines"
6843

6944
# Create JSON like string with all boards found and pass it to env variable
7045
board_count=${#boards_array[@]}
7146

72-
if [ $board_count-gt 0 ]
73-
then
47+
if [ "$board_count"-gt 0 ];then
7448
json_matrix='{"fqbn": ['
75-
forboardin${boards_array[@]}
76-
do
49+
forboardin"${boards_array[@]}";do
7750
json_matrix+='"'$board'"'
78-
if [ $board_count-gt 1 ]
79-
then
51+
if [ "$board_count"-gt 1 ];then
8052
json_matrix+=","
8153
fi
82-
board_count=$(($board_count-1))
54+
board_count=$((board_count -1))
8355
done
8456
json_matrix+=']}'
8557

86-
echo$json_matrix
87-
echo"FQBNS=${json_matrix}">>$GITHUB_ENV
58+
echo"$json_matrix"
59+
echo"FQBNS=${json_matrix}">>"$GITHUB_ENV"
8860
else
89-
echo"FQBNS=">>$GITHUB_ENV
90-
fi
61+
echo"FQBNS=">>"$GITHUB_ENV"
62+
fi

‎.github/scripts/install-arduino-cli.sh‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
OSBITS=`uname -m`
3+
OSBITS=$(uname -m)
44
if [[ "$OSTYPE"=="linux"* ]];then
55
export OS_IS_LINUX="1"
66
if [[ "$OSBITS"=="i686" ]];then
@@ -41,6 +41,11 @@ fi
4141
if [ !-d"$ARDUINO_IDE_PATH" ] || [ !-f"$ARDUINO_IDE_PATH/arduino-cli" ];then
4242
echo"Installing Arduino CLI on $OS_NAME ..."
4343
mkdir -p "$ARDUINO_IDE_PATH"
44-
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
44+
if [ "$OS_IS_WINDOWS"=="1" ];then
45+
curl -fsSL https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip -o arduino-cli.zip
46+
unzip -q arduino-cli.zip -d "$ARDUINO_IDE_PATH"
47+
rm arduino-cli.zip
48+
else
49+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
50+
fi
4551
fi
46-

‎.github/scripts/install-arduino-core-esp32.sh‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
55
echo"Installing ESP32 Arduino Core ..."
66
script_init_path="$PWD"
77
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif"
8-
cd"$ARDUINO_USR_PATH/hardware/espressif"
8+
cd"$ARDUINO_USR_PATH/hardware/espressif"||exit
99

1010
echo"Installing Python Serial ..."
1111
pip install pyserial > /dev/null
@@ -15,25 +15,25 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
1515
pip install requests > /dev/null
1616
fi
1717

18-
if [ !-z"$GITHUB_REPOSITORY" ];then
18+
if [ -n"$GITHUB_REPOSITORY" ];then
1919
echo"Linking Core..."
20-
ln -s $GITHUB_WORKSPACE esp32
20+
ln -s "$GITHUB_WORKSPACE" esp32
2121
else
2222
echo"Cloning Core Repository..."
2323
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
2424
fi
2525

2626
#echo "Updating Submodules ..."
27-
cd esp32
27+
cd esp32||exit
2828
#git submodule update --init --recursive > /dev/null 2>&1
2929

3030
echo"Installing Platform Tools ..."
3131
if [ "$OS_IS_WINDOWS"=="1" ];then
32-
cd tools && ./get.exe
32+
cd tools && ./get.exe
3333
else
34-
cd tools && python get.py
34+
cd tools && python get.py
3535
fi
36-
cd$script_init_path
36+
cd"$script_init_path"||exit
3737

3838
echo"ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"
3939
echo""

‎.github/scripts/install-arduino-ide.sh‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#OSTYPE: 'msys', ARCH: 'x86_64' => win32
55
#OSTYPE: 'darwin18', ARCH: 'i386' => macos
66

7-
OSBITS=`uname -m`
7+
OSBITS=$(uname -m)
88
if [[ "$OSTYPE"=="linux"* ]];then
99
export OS_IS_LINUX="1"
1010
ARCHIVE_FORMAT="tar.xz"
@@ -77,4 +77,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then
7777
echo"Arduino IDE Installed in '$ARDUINO_IDE_PATH'"
7878
echo""
7979
fi
80-

0 commit comments

Comments
(0)