Skip to content

Commit e91e10a

Browse files
authored
Merge branch 'master' into master
2 parents a4950f2 + 142fceb commit e91e10a

File tree

3,876 files changed

+690794
-20004
lines changed

Some content is hidden

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

3,876 files changed

+690794
-20004
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ body:
3939
label: Version
4040
description: What version of Arduino ESP32 are you running? If possible, consider updating to the latest version.
4141
options:
42-
- latest master
42+
- latest master (checkout manually)
43+
- latest development Release Candidate (RC-X)
4344
- v2.0.2
4445
- v2.0.1
4546
- v2.0.0
@@ -52,7 +53,7 @@ body:
5253
attributes:
5354
label: IDE Name
5455
description: What IDE are you using?
55-
placeholder: eg. Arduino IDE, PlatformIO, IDF component...
56+
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
5657
validations:
5758
required: true
5859
- type: input
@@ -101,8 +102,8 @@ body:
101102
id: sketch
102103
attributes:
103104
label: Sketch
104-
description: Please provide your sketch/code which was run
105-
placeholder: ex. related part of the code
105+
description: Please provide full minimal sketch/code which can be run to reproduce your issue
106+
placeholder: ex. Related part of the code to replicate the issue
106107
render: cpp
107108
validations:
108109
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
*By completing this PR sufficiently, you help us to improve the quality of Release Notes*
1+
*By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes*
22

33
### Checklist
4-
1. [ ] Please provide specific title of the PR describing the change, including the component name (eg. *„Update of Documentation link on Readme.md“*)
5-
2. [ ] Please provide related links (eg. Issue, other Project, submodule PR..)
6-
3. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html)
4+
1. [ ] Please provide specific title of the PR describing the change, including the component name (*eg. „Update of Documentation link on Readme.md“*)
5+
2. [ ] Please provide related links (*eg. Issue which will be closed by this Pull Request*)
6+
3. [ ] Please **update relevant Documentation** if applicable
7+
4. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html)
78

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

1011
-----------
11-
## Summary
12-
Please describe your proposed PR and what it contains.
12+
## Description of Change
13+
Please describe your proposed Pull Request and it's impact.
1314

14-
## Impact
15-
Please describe impact of your PR and it's function.
15+
## Tests scenarios
16+
Please describe on what Hardware and Software combinations you have tested this Pull Request and how.
17+
18+
(*eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario*)
1619

1720
## Related links
1821
Please provide links to related issue, PRs etc.
22+
23+
(*eg. Closes #number of issue*)

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

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

33
export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
4-
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master"
4+
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git"
55

6-
XTENSA32_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
7-
XTENSA32S2_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
8-
RISCV_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
6+
TOOLCHAIN_VERSION="8.4.0+2021r2-patch3"
97
ESPTOOLPY_VERSION="~1.30100.0"
108
ESPRESSIF_ORGANIZATION_NAME="espressif"
119

@@ -30,9 +28,12 @@ replace_script+="data['packages']['toolchain-xtensa-esp32']['owner']='$ESPRESSIF
3028
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
3129
replace_script+="data['packages']['toolchain-riscv32-esp']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
3230
# Update versions to use the upstream
33-
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$XTENSA32_TOOLCHAIN_VERSION';"
34-
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$XTENSA32S2_TOOLCHAIN_VERSION';"
35-
replace_script+="data['packages']['toolchain-riscv32-esp']['version']='$RISCV_TOOLCHAIN_VERSION';"
31+
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$TOOLCHAIN_VERSION';"
32+
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$TOOLCHAIN_VERSION';"
33+
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'}});"
36+
replace_script+="data['packages']['toolchain-xtensa-esp32'].update({'optional':False});"
3637
# esptool.py may require an upstream version (for now platformio is the owner)
3738
replace_script+="data['packages']['tool-esptoolpy']['version']='$ESPTOOLPY_VERSION';"
3839
# Save results

.github/scripts/on-push.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -e
44

5+
export ARDUINO_BUILD_DIR="$HOME/.arduino/build.tmp"
6+
57
function build(){
68
local target=$1
79
local fqbn=$2
@@ -63,6 +65,7 @@ if [ "$BUILD_PIO" -eq 0 ]; then
6365

6466
FQBN_ESP32="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
6567
FQBN_ESP32S2="espressif:esp32:esp32s2:PSRAM=enabled,PartitionScheme=huge_app"
68+
FQBN_ESP32S3="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
6669
FQBN_ESP32C3="espressif:esp32:esp32c3:PartitionScheme=huge_app"
6770

6871
SKETCHES_ESP32="\
@@ -76,9 +79,10 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7679
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
7780
"
7881

79-
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
82+
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8083
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
8184
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
85+
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8286
else
8387
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
8488
# PlatformIO ESP32 Test
@@ -96,6 +100,20 @@ else
96100
# build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino"
97101

98102
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"
103+
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"
104+
105+
echo "Hacking in S3 support ..."
106+
replace_script="import json; import os;"
107+
replace_script+="fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+');"
108+
replace_script+="data=json.load(fp);"
109+
replace_script+="data['packages']['toolchain-xtensa-esp32']['optional']=True;"
110+
replace_script+="data['packages']['toolchain-xtensa-esp32s3']['optional']=False;"
111+
replace_script+="data['packages']['tool-esptoolpy']['owner']='tasmota';"
112+
replace_script+="data['packages']['tool-esptoolpy']['version']='https://github.com/tasmota/esptool/releases/download/v3.3/esptool-3.3.zip';"
113+
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
114+
python -c "$replace_script"
115+
116+
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"
99117

100118
#build_pio_sketches "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries"
101119
fi

.github/scripts/on-release.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ mkdir -p "$PKG_DIR/tools"
172172
# Copy all core files to the package folder
173173
echo "Copying files for packaging ..."
174174
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
175+
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
175176
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
176177
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
177178
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"

.github/scripts/sketch_utils.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <fqbn> <path-to-i
77
return 1
88
fi
99

10-
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
1110
local ide_path=$1
1211
local usr_path=$2
1312
local fqbn=$3
1413
local sketch=$4
1514
local xtra_opts=$5
1615
local win_opts=$6
1716

18-
build_dir="$(dirname $sketch)/build"
17+
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
18+
if [ -z "$ARDUINO_BUILD_DIR" ]; then
19+
build_dir="$(dirname $sketch)/build"
20+
else
21+
build_dir="$ARDUINO_BUILD_DIR"
22+
fi
23+
24+
echo $sketch
25+
26+
rm -rf "$build_dir"
1927
mkdir -p "$build_dir"
2028
mkdir -p "$ARDUINO_CACHE_DIR"
2129
$ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \

.github/scripts/tests_build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ case "$target" in
2525
;;
2626
"esp32c3") fqbn="espressif:esp32:esp32c3:PartitionScheme=huge_app"
2727
;;
28+
"esp32s3") fqbn="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
29+
;;
2830
esac
2931

3032
if [ -z $fqbn ]; then

.github/scripts/update-version.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
# For reference: add tools for all boards by replacing one line in each board
4+
# "[board].upload.tool=esptool_py" to "[board].upload.tool=esptool_py\n[board].upload.tool.default=esptool_py\n[board].upload.tool.network=esp_ota"
5+
#cat boards.txt | sed "s/\([a-zA-Z0-9_\-]*\)\.upload\.tool\=esptool_py/\1\.upload\.tool\=esptool_py\\n\1\.upload\.tool\.default\=esptool_py\\n\1\.upload\.tool\.network\=esp_ota/"
6+
7+
if [ ! $# -eq 3 ]; then
8+
echo "Bad number of arguments: $#" >&2
9+
echo "usage: $0 <major> <minor> <patch>" >&2
10+
exit 1
11+
fi
12+
13+
re='^[0-9]+$'
14+
if [[ ! $1 =~ $re ]] || [[ ! $2 =~ $re ]] || [[ ! $3 =~ $re ]] ; then
15+
echo "error: Not a valid version: $1.$2.$3" >&2
16+
echo "usage: $0 <major> <minor> <patch>" >&2
17+
exit 1
18+
fi
19+
20+
ESP_ARDUINO_VERSION_MAJOR="$1"
21+
ESP_ARDUINO_VERSION_MINOR="$2"
22+
ESP_ARDUINO_VERSION_PATCH="$3"
23+
ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ARDUINO_VERSION_PATCH"
24+
25+
echo "New Arduino Version: $ESP_ARDUINO_VERSION"
26+
27+
echo "Updating platform.txt..."
28+
cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt
29+
30+
echo "Updating package.json..."
31+
cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json
32+
33+
echo "Updating cores/esp32/esp_arduino_version.h..."
34+
cat cores/esp32/esp_arduino_version.h | \
35+
sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ESP_ARDUINO_VERSION_MAJOR/g" | \
36+
sed "s/#define ESP_ARDUINO_VERSION_MINOR.*/#define ESP_ARDUINO_VERSION_MINOR $ESP_ARDUINO_VERSION_MINOR/g" | \
37+
sed "s/#define ESP_ARDUINO_VERSION_PATCH.*/#define ESP_ARDUINO_VERSION_PATCH $ESP_ARDUINO_VERSION_PATCH/g" > __esp_arduino_version.h && mv __esp_arduino_version.h cores/esp32/esp_arduino_version.h
38+
39+
exit 0

.github/stale.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/hil.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
strategy:
4949
matrix:
50-
chip: ['esp32', 'esp32s2', 'esp32c3']
50+
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
5151
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
5252

5353
steps:
@@ -67,11 +67,16 @@ jobs:
6767
Test:
6868
needs: [gen_chunks, Build]
6969
name: ${{matrix.chip}}-Test#${{matrix.chunks}}
70-
runs-on: ESP32
70+
runs-on:
71+
- ESP32
72+
- ESP32-S2
73+
- ESP32-S3
74+
- ESP32-C3
75+
7176
strategy:
7277
fail-fast: false
7378
matrix:
74-
chip: ['esp32', 'esp32s2', 'esp32c3']
79+
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3']
7580
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
7681
container:
7782
image: python:3.10.1-bullseye
@@ -87,11 +92,6 @@ jobs:
8792
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
8893
path: tests/
8994

90-
- name: Check Artifacts
91-
run: |
92-
ls -R tests
93-
cat tests/*/build/build.options.json
94-
9595
- name: Install dependencies
9696
run: |
9797
pip install -U pip
@@ -110,6 +110,7 @@ jobs:
110110

111111
event_file:
112112
name: "Event File"
113+
if: ${{ always() }}
113114
needs: Test
114115
runs-on: ubuntu-latest
115116
steps:

.github/workflows/publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Unit Test Results
33
on:
44
workflow_run:
55
workflows: [Run tests in hardware]
6+
branches-ignore: [master]
67

78
types:
89
- completed
@@ -11,6 +12,10 @@ jobs:
1112
unit-test-results:
1213
name: Unit Test Results
1314
runs-on: ubuntu-latest
15+
if: |
16+
github.event.workflow_run.event == 'pull_request' &&
17+
(github.event.workflow_run.conclusion == 'success' ||
18+
github.event.workflow_run.conclusion == 'failure')
1419
steps:
1520
- name: Download and Extract Artifacts
1621
env:

.github/workflows/push.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,30 @@ jobs:
7878
python-version: '3.x'
7979
- name: Build Sketches
8080
run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
81+
82+
build-esp-idf-component:
83+
name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
84+
runs-on: ubuntu-20.04
85+
strategy:
86+
matrix:
87+
# The version names here correspond to the versions of espressif/idf Docker image.
88+
# See https://hub.docker.com/r/espressif/idf/tags and
89+
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
90+
# for details.
91+
idf_ver: ["release-v4.4"]
92+
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c3"]
93+
container: espressif/idf:${{ matrix.idf_ver }}
94+
steps:
95+
- name: Check out arduino-esp32 as a component
96+
uses: actions/checkout@v2
97+
with:
98+
submodules: recursive
99+
path: components/arduino-esp32
100+
- name: Build
101+
env:
102+
IDF_TARGET: ${{ matrix.idf_target }}
103+
shell: bash
104+
run: |
105+
. ${IDF_PATH}/export.sh
106+
idf.py create-project test
107+
idf.py -C test -DEXTRA_COMPONENT_DIRS=$PWD/components build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
tools/xtensa-esp32-elf
22
tools/xtensa-esp32s2-elf
3+
tools/xtensa-esp32s3-elf
34
tools/riscv32-esp-elf
45
tools/dist
56
tools/esptool

0 commit comments

Comments
 (0)