Skip to content

Commit 2932417

Browse files
authored
Merge branch 'release/v3.1.x' into fix/zigbee-reporting-direction
2 parents f4d2f22 + f5ce3f7 commit 2932417

File tree

250 files changed

+4210
-1547
lines changed

Some content is hidden

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

250 files changed

+4210
-1547
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
@@ -153,6 +153,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
153153
esp32c3_opts=$(echo "$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
154154
esp32c6_opts=$(echo "$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
155155
esp32h2_opts=$(echo "$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
156+
esp32p4_opts=$(echo "PSRAM=enabled,USBMode=default,$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
156157

157158
# Select the common part of the FQBN based on the target. The rest will be
158159
# appended depending on the passed options.
@@ -184,6 +185,10 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
184185
[ -n "${options:-$esp32h2_opts}" ] && opt=":${options:-$esp32h2_opts}"
185186
fqbn="espressif:esp32:esp32h2$opt"
186187
;;
188+
"esp32p4")
189+
[ -n "${options:-$esp32p4_opts}" ] && opt=":${options:-$esp32p4_opts}"
190+
fqbn="espressif:esp32:esp32p4$opt"
191+
;;
187192
esac
188193

189194
# 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

+28-6
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
@@ -116,7 +119,6 @@ set(ARDUINO_ALL_LIBRARIES
116119
)
117120

118121
set(ARDUINO_LIBRARY_ArduinoOTA_SRCS libraries/ArduinoOTA/src/ArduinoOTA.cpp)
119-
set(ARDUINO_LIBRARY_ArduinoOTA_REQUIRES esp_https_ota)
120122

121123
set(ARDUINO_LIBRARY_AsyncUDP_SRCS libraries/AsyncUDP/src/AsyncUDP.cpp)
122124

@@ -157,14 +159,18 @@ set(ARDUINO_LIBRARY_HTTPUpdate_SRCS libraries/HTTPUpdate/src/HTTPUpdate.cpp)
157159
set(ARDUINO_LIBRARY_Insights_SRCS libraries/Insights/src/Insights.cpp)
158160

159161
set(ARDUINO_LIBRARY_LittleFS_SRCS libraries/LittleFS/src/LittleFS.cpp)
160-
set(ARDUINO_LIBRARY_LittleFS_REQUIRES joltwallet__littlefs)
161162

162163
set(ARDUINO_LIBRARY_NetBIOS_SRCS libraries/NetBIOS/src/NetBIOS.cpp)
163164

164165
set(ARDUINO_LIBRARY_OpenThread_SRCS
165166
libraries/OpenThread/src/OThreadCLI.cpp
166167
libraries/OpenThread/src/OThreadCLI_Util.cpp)
167168

169+
set(ARDUINO_LIBRARY_Matter_SRCS
170+
libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp
171+
libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp
172+
libraries/Matter/src/Matter.cpp)
173+
168174
set(ARDUINO_LIBRARY_PPP_SRCS
169175
libraries/PPP/src/PPP.cpp
170176
libraries/PPP/src/ppp.c)
@@ -317,7 +323,7 @@ endforeach()
317323
set(includedirs variants/${CONFIG_ARDUINO_VARIANT}/ cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS})
318324
set(srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS})
319325
set(priv_includes cores/esp32/libb64)
320-
set(requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser espressif__network_provisioning)
326+
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)
321327
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid usb esp_psram ${ARDUINO_LIBRARIES_REQUIRES})
322328

323329
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThread)
@@ -328,6 +334,10 @@ if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThre
328334
endif()
329335
endif()
330336

337+
if(IDF_TARGET STREQUAL "esp32p4")
338+
list(APPEND requires esp_driver_touch_sens)
339+
endif()
340+
331341
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
332342

333343
if(NOT CONFIG_FREERTOS_HZ EQUAL 1000 AND NOT "$ENV{ARDUINO_SKIP_TICK_CHECK}")
@@ -367,9 +377,21 @@ function(maybe_add_component component_name)
367377
endif()
368378
endfunction()
369379

370-
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
380+
if(IDF_TARGET MATCHES "esp32s2|esp32s3|esp32p4" AND CONFIG_TINYUSB_ENABLED)
371381
maybe_add_component(arduino_tinyusb)
372382
endif()
373383
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
374384
maybe_add_component(esp_https_ota)
375385
endif()
386+
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ESP_SR)
387+
maybe_add_component(espressif__esp_sr)
388+
endif()
389+
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_Matter)
390+
maybe_add_component(espressif__esp_matter)
391+
endif()
392+
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LittleFS)
393+
maybe_add_component(joltwallet__littlefs)
394+
endif()
395+
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_WiFiProv)
396+
maybe_add_component(espressif__network_provisioning)
397+
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)