Skip to content

Commit e465b41

Browse files
authored
Merge branch 'master' into wifi_server_not_inherit
2 parents 0d87199 + 23c6779 commit e465b41

File tree

294 files changed

+12824
-3371
lines changed

Some content is hidden

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

294 files changed

+12824
-3371
lines changed

.github/scripts/on-push.sh

+6-12
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,16 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7373

7474
SKETCHES_ESP32="\
7575
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
76-
$ARDUINO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino\
76+
$ARDUINO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino\
7777
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
7878
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
7979
"
8080

81-
SKETCHES_ESP32XX="\
82-
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
83-
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
84-
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
85-
"
86-
8781
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
88-
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
89-
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
82+
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
83+
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
84+
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
85+
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
9286
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
9387
else
9488
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
@@ -98,7 +92,7 @@ else
9892
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino" && \
9993
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino" && \
10094
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino" && \
101-
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino" && \
95+
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino" && \
10296
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino"
10397

10498
# Basic sanity testing for other series

.github/scripts/sketch_utils.sh

+16
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
126126
# of configuration built in case of a multiconfiguration test.
127127

128128
sketchname=$(basename $sketchdir)
129+
130+
if [[ -n $target ]] && [[ -f "$sketchdir/.skip.$target" ]]; then
131+
echo "Skipping $sketchname for target $target"
132+
exit 0
133+
fi
129134

130135
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
131136
if [ -n "$ARDUINO_BUILD_DIR" ]; then
@@ -159,6 +164,12 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
159164
--build-cache-path "$ARDUINO_CACHE_DIR" \
160165
--build-path "$build_dir" \
161166
$xtra_opts "${sketchdir}"
167+
168+
exit_status=$?
169+
if [ $exit_status -ne 0 ]; then
170+
echo ""ERROR: Compilation failed with error code $exit_status""
171+
exit $exit_status
172+
fi
162173
elif [ -f "$ide_path/arduino-builder" ]; then
163174
echo "Building $sketchname with arduino-builder and FQBN=$currfqbn"
164175
echo "Build path = $build_dir"
@@ -173,6 +184,11 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
173184
-build-path "$build_dir" \
174185
$xtra_opts "${sketchdir}/${sketchname}.ino"
175186

187+
exit_status=$?
188+
if [ $exit_status -ne 0 ]; then
189+
echo ""ERROR: Compilation failed with error code $exit_status""
190+
exit $exit_status
191+
fi
176192
# $ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
177193
# -fqbn=\"$currfqbn\" \
178194
# -warnings="all" \

.github/scripts/tests_build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ while [ ! -z "$1" ]; do
4646
shift
4747
done
4848

49-
source ${SCRIPTS_DIR}/install-arduino-ide.sh
49+
#source ${SCRIPTS_DIR}/install-arduino-ide.sh
50+
source ${SCRIPTS_DIR}/install-arduino-cli.sh
5051
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh
5152

5253
args="-ai $ARDUINO_IDE_PATH -au $ARDUINO_USR_PATH"

.github/workflows/boards.yml

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ jobs:
4545
- name: Checkout repository
4646
uses: actions/checkout@v3
4747

48+
- name: Check if build.board is uppercase
49+
run: |
50+
board_name=$(echo ${{ matrix.fqbn }} | awk -F':' '{print $NF}')
51+
if grep -q "^$board_name.build.board=[A-Z0-9_]*$" boards.txt; then
52+
echo "$board_name.build.board is valid.";
53+
else
54+
echo "Error: $board_name.build.board is not uppercase!";
55+
exit 1;
56+
fi
57+
4858
- name: Compile sketch
4959
uses: P-R-O-C-H-Y/compile-sketches@main
5060
with:

.github/workflows/build_py_tools.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 2
2323
ref: ${{ github.event.pull_request.head.ref }}
2424
- name: Verify Python Tools Changed
25-
uses: tj-actions/changed-files@v36
25+
uses: tj-actions/changed-files@v41
2626
id: verify-changed-files
2727
with:
2828
fetch_depth: '2'

.github/workflows/dangerjs.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: DangerJS Pull Request linter
2+
on:
3+
pull_request_target:
4+
types: [opened, edited, reopened, synchronize]
5+
6+
permissions:
7+
pull-requests: write
8+
contents: write
9+
10+
jobs:
11+
pull-request-style-linter:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out PR head
15+
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
19+
- name: DangerJS pull request linter
20+
uses: espressif/shared-github-dangerjs@v1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml renamed to .github/workflows/docs_build.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ReadTheDocs CI
1+
name: Documentation Build and Deploy CI
22

33
on:
44
push:
@@ -7,16 +7,16 @@ on:
77
- release/*
88
paths:
99
- 'docs/**'
10-
- '.github/workflows/docs.yml'
10+
- '.github/workflows/docs_build.yml'
1111
pull_request:
1212
paths:
1313
- 'docs/**'
14-
- '.github/workflows/docs.yml'
14+
- '.github/workflows/docs_build.yml'
1515

1616
jobs:
1717

1818
build-docs:
19-
name: Build ReadTheDocs
19+
name: Build ESP-Docs
2020
runs-on: ubuntu-22.04
2121
defaults:
2222
run:
@@ -34,5 +34,11 @@ jobs:
3434
sudo apt install python3-pip python3-setuptools
3535
# GitHub CI installs pip3 and setuptools outside the path.
3636
# Update the path to include them and run.
37-
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt
38-
cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html
37+
cd ./docs
38+
PATH=/home/runner/.local/bin:$PATH pip3 install -r requirements.txt --prefer-binary
39+
PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" build-docs -l en
40+
- name: Archive Docs
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: docs
44+
path: docs

.github/workflows/docs_deploy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Documentation Build and Production Deploy CI
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- release/*
9+
- master
10+
paths:
11+
- 'docs/**'
12+
- '.github/workflows/docs_deploy.yml'
13+
14+
jobs:
15+
16+
deploy-prod-docs:
17+
name: Deploy Documentation on Production
18+
runs-on: ubuntu-22.04
19+
defaults:
20+
run:
21+
shell: bash
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
submodules: true
26+
- uses: actions/setup-python@v4
27+
with:
28+
python-version: '3.10'
29+
- name: Deploy Documentation
30+
env:
31+
# Deploy to production server
32+
# DOCS_BUILD_DIR: "./docs/_build/"
33+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
34+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
35+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
36+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
37+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
38+
run: |
39+
sudo apt update
40+
sudo apt install python3-pip python3-setuptools
41+
source ./docs/utils.sh
42+
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
43+
export GIT_VER=$(git describe --always)
44+
echo "PIP install requirements..."
45+
pip3 install --user -r ./docs/requirements.txt
46+
echo "Building the Docs..."
47+
cd ./docs && build-docs -l en
48+
echo "Deploy the Docs..."
49+
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/
50+
cd $GITHUB_WORKSPACE/docs
51+
deploy-docs

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ set(CORE_SRCS
5050
cores/esp32/Esp.cpp
5151
cores/esp32/FunctionalInterrupt.cpp
5252
cores/esp32/HardwareSerial.cpp
53+
cores/esp32/HEXBuilder.cpp
5354
cores/esp32/IPAddress.cpp
54-
cores/esp32/IPv6Address.cpp
5555
cores/esp32/libb64/cdecode.c
5656
cores/esp32/libb64/cencode.c
5757
cores/esp32/main.cpp
5858
cores/esp32/MD5Builder.cpp
5959
cores/esp32/Print.cpp
60+
cores/esp32/SHA1Builder.cpp
6061
cores/esp32/stdlib_noniso.c
6162
cores/esp32/Stream.cpp
6263
cores/esp32/StreamString.cpp
@@ -115,6 +116,7 @@ set(LIBRARY_SRCS
115116
libraries/Update/src/Updater.cpp
116117
libraries/Update/src/HttpsOTAUpdate.cpp
117118
libraries/USB/src/USBHID.cpp
119+
libraries/USB/src/USBMIDI.cpp
118120
libraries/USB/src/USBHIDMouse.cpp
119121
libraries/USB/src/USBHIDKeyboard.cpp
120122
libraries/USB/src/USBHIDGamepad.cpp

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2
22

3-
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![Documentation Status](https://readthedocs.com/projects/espressif-arduino-esp32/badge/?version=latest)](https://docs.espressif.com/projects/arduino-esp32/en/latest/?badge=latest)
4-
[![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml?link=http://https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md)
3+
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml?link=http://https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md)
54

65
### Need help or have a question? Join the chat at [Gitter](https://gitter.im/espressif/arduino-esp32) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)
76

@@ -37,6 +36,10 @@ You can use the [Arduino-ESP32 Online Documentation](https://docs.espressif.com/
3736

3837
---
3938

39+
**APIs compatibility with ESP8266 and Arduino-CORE (Arduino.cc) is explained [here](https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html#apis).**
40+
41+
---
42+
4043
* [Getting Started](https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html)
4144
* [Installing (Windows, Linux and macOS)](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html)
4245
* [Libraries](https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html)

0 commit comments

Comments
 (0)