Skip to content

Commit fdfcaec

Browse files
authored
Merge branch 'release/v3.1.x' into fix/p4_requirements
2 parents f54fb7d + c009220 commit fdfcaec

File tree

194 files changed

+3800
-1454
lines changed

Some content is hidden

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

194 files changed

+3800
-1454
lines changed

Diff for: .github/scripts/on-push.sh

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ if [ "$BUILD_PIO" -eq 0 ]; then
9191
fi
9292

9393
#build sketches for different targets
94+
build "esp32p4" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
9495
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
9596
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
9697
build "esp32c3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"

Diff for: .github/scripts/on-release.sh

+3-17
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,8 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
219219
##
220220
RVTC_NAME="riscv32-esp-elf-gcc"
221221
RVTC_NEW_NAME="esp-rv32"
222-
X32TC_NAME="xtensa-esp32-elf-gcc"
222+
X32TC_NAME="xtensa-esp-elf-gcc"
223223
X32TC_NEW_NAME="esp-x32"
224-
XS2TC_NAME="xtensa-esp32s2-elf-gcc"
225-
XS2TC_NEW_NAME="esp-xs2"
226-
XS3TC_NAME="xtensa-esp32s3-elf-gcc"
227-
XS3TC_NEW_NAME="esp-xs3"
228224

229225
# Replace tools locations in platform.txt
230226
echo "Generating platform.txt..."
@@ -233,9 +229,7 @@ sed "s/version=.*/version=$RELEASE_TAG/g" | \
233229
sed 's/tools\.esp32-arduino-libs\.path\.windows=.*//g' | \
234230
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \
235231
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
236-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
237-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\\{runtime.tools.$XS2TC_NEW_NAME.path\\}/g" | \
238-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\\{runtime.tools.$XS3TC_NEW_NAME.path\\}/g" | \
232+
sed "s/{runtime\.platform\.path}.tools.xtensa-esp-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
239233
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
240234
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g" | \
241235
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g' | \
@@ -293,15 +287,7 @@ rvtc_jq_arg="\
293287
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
294288
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
295289
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
296-
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
297-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS2TC_NAME\")).version = \"$RVTC_VERSION\" |\
298-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS2TC_NAME\")).name = \"$XS2TC_NEW_NAME\" |\
299-
(.packages[0].tools[] | select(.name==\"$XS2TC_NAME\")).version = \"$RVTC_VERSION\" |\
300-
(.packages[0].tools[] | select(.name==\"$XS2TC_NAME\")).name = \"$XS2TC_NEW_NAME\" |\
301-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS3TC_NAME\")).version = \"$RVTC_VERSION\" |\
302-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS3TC_NAME\")).name = \"$XS3TC_NEW_NAME\" |\
303-
(.packages[0].tools[] | select(.name==\"$XS3TC_NAME\")).version = \"$RVTC_VERSION\" |\
304-
(.packages[0].tools[] | select(.name==\"$XS3TC_NAME\")).name = \"$XS3TC_NEW_NAME\""
290+
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\""
305291
cat "$PACKAGE_JSON_TEMPLATE" | jq "$rvtc_jq_arg" > "$OUTPUT_DIR/package-rvfix.json"
306292
PACKAGE_JSON_TEMPLATE="$OUTPUT_DIR/package-rvfix.json"
307293

Diff for: .github/scripts/sketch_utils.sh

+5
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
147147
esp32c3_opts="$fqbn_append"
148148
esp32c6_opts="$fqbn_append"
149149
esp32h2_opts="$fqbn_append"
150+
esp32p4_opts="USBMode=default${fqbn_append:+,$fqbn_append}"
150151

151152
# Select the common part of the FQBN based on the target. The rest will be
152153
# appended depending on the passed options.
@@ -178,6 +179,10 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
178179
[ -n "${options:-$esp32h2_opts}" ] && opt=":${options:-$esp32h2_opts}"
179180
fqbn="espressif:esp32:esp32h2$opt"
180181
;;
182+
"esp32p4")
183+
[ -n "${options:-$esp32p4_opts}" ] && opt=":${options:-$esp32p4_opts}"
184+
fqbn="espressif:esp32:esp32p4$opt"
185+
;;
181186
esac
182187

183188
# Make it look like a JSON array.

Diff for: .github/scripts/tests_matrix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [[ $IS_PR != 'true' ]] || [[ $PERFORMANCE_ENABLED == 'true' ]]; then
1212
#qemu_types+=",'performance'"
1313
fi
1414

15-
targets="'esp32','esp32s2','esp32s3','esp32c3','esp32c6','esp32h2'"
15+
targets="'esp32','esp32s2','esp32s3','esp32c3','esp32c6','esp32h2','esp32p4'"
1616

1717
mkdir -p info
1818

Diff for: .github/workflows/lib.yml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- esp32s3
4343
- esp32c6
4444
- esp32h2
45+
- esp32p4
4546

4647
include:
4748
- target: esp32
@@ -56,6 +57,8 @@ jobs:
5657
fqbn: espressif:esp32:esp32c6
5758
- target: esp32h2
5859
fqbn: espressif:esp32:esp32h2
60+
- target: esp32p4
61+
fqbn: espressif:esp32:esp32p4
5962

6063

6164
steps:

Diff for: .github/workflows/push.yml

+23-22
Original file line numberDiff line numberDiff line change
@@ -212,28 +212,29 @@ jobs:
212212
- name: Build Sketches
213213
run: bash ./.github/scripts/on-push.sh
214214

215-
# PlatformIO on Windows, Ubuntu and Mac
216-
build-platformio:
217-
name: PlatformIO on ${{ matrix.os }}
218-
needs: gen-chunks
219-
if: |
220-
needs.gen-chunks.outputs.build_all == 'true' ||
221-
needs.gen-chunks.outputs.build_static_sketches == 'true' ||
222-
needs.gen-chunks.outputs.build_platformio == 'true'
223-
runs-on: ${{ matrix.os }}
224-
strategy:
225-
fail-fast: false
226-
matrix:
227-
os: [ubuntu-latest, windows-latest, macOS-latest]
215+
# # PlatformIO on Windows, Ubuntu and Mac
216+
# build-platformio:
217+
# name: PlatformIO on ${{ matrix.os }}
218+
# needs: gen-chunks
219+
# if: |
220+
# needs.gen-chunks.outputs.build_all == 'true' ||
221+
# needs.gen-chunks.outputs.build_static_sketches == 'true' ||
222+
# needs.gen-chunks.outputs.build_platformio == 'true'
223+
# runs-on: ${{ matrix.os }}
224+
# strategy:
225+
# fail-fast: false
226+
# matrix:
227+
# os: [ubuntu-latest, windows-latest, macOS-latest]
228228

229-
steps:
230-
- uses: actions/checkout@v4
231-
- uses: actions/setup-python@v5
232-
with:
233-
python-version: '3.x'
234-
- name: Build Sketches
235-
run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
229+
# steps:
230+
# - uses: actions/checkout@v4
231+
# - uses: actions/setup-python@v5
232+
# with:
233+
# python-version: '3.x'
234+
# - name: Build Sketches
235+
# run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
236236

237+
# ESP-IDF component build
237238
build-esp-idf-component:
238239
name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
239240
needs: gen-chunks
@@ -249,8 +250,8 @@ jobs:
249250
# See https://hub.docker.com/r/espressif/idf/tags and
250251
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
251252
# for details.
252-
idf_ver: ["release-v5.1"]
253-
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2"]
253+
idf_ver: ["release-v5.3"]
254+
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32p4"]
254255
container: espressif/idf:${{ matrix.idf_ver }}
255256
steps:
256257
- name: Check out arduino-esp32 as a component

Diff for: CMakeLists.txt

+22-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# export ARDUINO_SKIP_IDF_VERSION_CHECK=1
66
# idf.py build
77

8-
set(min_supported_idf_version "5.1.0")
9-
set(max_supported_idf_version "5.1.99")
8+
set(min_supported_idf_version "5.3.0")
9+
set(max_supported_idf_version "5.3.99")
1010
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")
1111

1212
if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")
@@ -45,9 +45,11 @@ set(CORE_SRCS
4545
cores/esp32/esp32-hal-timer.c
4646
cores/esp32/esp32-hal-tinyusb.c
4747
cores/esp32/esp32-hal-touch.c
48+
cores/esp32/esp32-hal-touch-ng.c
4849
cores/esp32/esp32-hal-uart.c
4950
cores/esp32/esp32-hal-rmt.c
5051
cores/esp32/Esp.cpp
52+
cores/esp32/freertos_stats.cpp
5153
cores/esp32/FunctionalInterrupt.cpp
5254
cores/esp32/HardwareSerial.cpp
5355
cores/esp32/HEXBuilder.cpp
@@ -93,6 +95,7 @@ set(ARDUINO_ALL_LIBRARIES
9395
HTTPUpdate
9496
Insights
9597
LittleFS
98+
Matter
9699
NetBIOS
97100
Network
98101
OpenThread
@@ -165,6 +168,11 @@ set(ARDUINO_LIBRARY_OpenThread_SRCS
165168
libraries/OpenThread/src/OThreadCLI.cpp
166169
libraries/OpenThread/src/OThreadCLI_Util.cpp)
167170

171+
set(ARDUINO_LIBRARY_Matter_SRCS
172+
libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp
173+
libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp
174+
libraries/Matter/src/Matter.cpp)
175+
168176
set(ARDUINO_LIBRARY_PPP_SRCS
169177
libraries/PPP/src/PPP.cpp
170178
libraries/PPP/src/ppp.c)
@@ -307,7 +315,7 @@ endforeach()
307315
set(includedirs variants/${CONFIG_ARDUINO_VARIANT}/ cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS})
308316
set(srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS})
309317
set(priv_includes cores/esp32/libb64)
310-
set(requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser espressif__network_provisioning)
318+
set(requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser esp_ringbuf esp_driver_gptimer esp_driver_usb_serial_jtag driver espressif__network_provisioning)
311319
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid usb esp_psram ${ARDUINO_LIBRARIES_REQUIRES})
312320

313321
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThread)
@@ -318,6 +326,10 @@ if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThre
318326
endif()
319327
endif()
320328

329+
if(IDF_TARGET STREQUAL "esp32p4")
330+
list(APPEND requires esp_driver_touch_sens)
331+
endif()
332+
321333
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
322334

323335
if(NOT CONFIG_FREERTOS_HZ EQUAL 1000 AND NOT "$ENV{ARDUINO_SKIP_TICK_CHECK}")
@@ -357,9 +369,15 @@ function(maybe_add_component component_name)
357369
endif()
358370
endfunction()
359371

360-
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
372+
if(IDF_TARGET MATCHES "esp32s2|esp32s3|esp32p4" AND CONFIG_TINYUSB_ENABLED)
361373
maybe_add_component(arduino_tinyusb)
362374
endif()
363375
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
364376
maybe_add_component(esp_https_ota)
365377
endif()
378+
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ESP_SR)
379+
maybe_add_component(espressif__esp_sr)
380+
endif()
381+
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_Matter)
382+
maybe_add_component(espressif__esp_matter)
383+
endif()

Diff for: Kconfig.projbuild

+30
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ config ARDUINO_SELECTIVE_Wire
266266
depends on ARDUINO_SELECTIVE_COMPILATION
267267
default y
268268

269+
config ARDUINO_SELECTIVE_ESP_SR
270+
bool "Enable ESP-SR"
271+
depends on ARDUINO_SELECTIVE_COMPILATION
272+
default y
273+
269274
config ARDUINO_SELECTIVE_EEPROM
270275
bool "Enable EEPROM"
271276
depends on ARDUINO_SELECTIVE_COMPILATION
@@ -286,6 +291,11 @@ config ARDUINO_SELECTIVE_Update
286291
depends on ARDUINO_SELECTIVE_COMPILATION
287292
default y
288293

294+
config ARDUINO_SELECTIVE_Zigbee
295+
bool "Enable Zigbee"
296+
depends on ARDUINO_SELECTIVE_COMPILATION
297+
default y
298+
289299
config ARDUINO_SELECTIVE_FS
290300
bool "Enable FS"
291301
depends on ARDUINO_SELECTIVE_COMPILATION
@@ -358,6 +368,11 @@ config ARDUINO_SELECTIVE_HTTPClient
358368
select ARDUINO_SELECTIVE_NetworkClientSecure
359369
default y
360370

371+
config ARDUINO_SELECTIVE_Matter
372+
bool "Enable Matter"
373+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Network
374+
default y
375+
361376
config ARDUINO_SELECTIVE_NetBIOS
362377
bool "Enable NetBIOS"
363378
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Network
@@ -399,4 +414,19 @@ config ARDUINO_SELECTIVE_SimpleBLE
399414
depends on ARDUINO_SELECTIVE_COMPILATION
400415
default y
401416

417+
config ARDUINO_SELECTIVE_RainMaker
418+
bool "Enable RainMaker"
419+
depends on ARDUINO_SELECTIVE_COMPILATION
420+
default y
421+
422+
config ARDUINO_SELECTIVE_OpenThread
423+
bool "Enable OpenThread"
424+
depends on ARDUINO_SELECTIVE_COMPILATION
425+
default y
426+
427+
config ARDUINO_SELECTIVE_Insights
428+
bool "Enable Insights"
429+
depends on ARDUINO_SELECTIVE_COMPILATION
430+
default y
431+
402432
endmenu

Diff for: README.md

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

33
[![Build Status](https://github.com/espressif/arduino-esp32/actions/workflows/push.yml/badge.svg?branch=master&event=push)](https://github.com/espressif/arduino-esp32/actions/workflows/push.yml) [![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/blob/gh-pages/LIBRARIES_TEST.md) [![Hardware Tests](https://github.com/espressif/arduino-esp32/blob/gh-pages/runtime-tests-results/badge.svg)](https://github.com/espressif/arduino-esp32/actions/workflows/tests_results.yml)
44

@@ -59,6 +59,7 @@ Here are the ESP32 series supported by the Arduino-ESP32 project:
5959
| ESP32-S3 | Yes | Yes | [ESP32-S3](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf) |
6060
| ESP32-C6 | Yes | Yes | [ESP32-C6](https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf) |
6161
| ESP32-H2 | Yes | Yes | [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) |
62+
| ESP32-P4 | No | Yes | [ESP32-P4](https://www.espressif.com/sites/default/files/documentation/esp32-p4_datasheet_en.pdf) |
6263

6364
> [!NOTE]
6465
> ESP32-C2 is also supported by Arduino-ESP32 but requires rebuilding the static libraries. This is not trivial and requires a good understanding of the ESP-IDF

0 commit comments

Comments
 (0)