Skip to content

Support for IDF v5.5 and ESP32-C5 #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4]
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4, esp32c5]
fail-fast: false
steps:
- name: Checkout repository
Expand Down
16 changes: 15 additions & 1 deletion configs/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"file":"libspi_flash.a",
"src":"build/esp-idf/spi_flash/libspi_flash.a",
"out":"lib/libspi_flash.a",
"targets":["esp32","esp32c2","esp32c3","esp32s2","esp32s3","esp32c6","esp32h2","esp32p4"]
"targets":["esp32","esp32c2","esp32c3","esp32s2","esp32s3","esp32c6","esp32h2","esp32p4","esp32c5"]
},
{
"file":"libesp_psram.a",
Expand Down Expand Up @@ -44,6 +44,20 @@
}
],
"targets":[
{
"target": "esp32c5",
"features":["qio_ram"],
"idf_libs":["qio","80m"],
"bootloaders":[
["qio","80m"],
["dio","80m"],
["qio","40m"],
["dio","40m"]
],
"mem_variants":[
["dio","80m"]
]
},
{
"target": "esp32p4",
"features":["qio_ram"],
Expand Down
57 changes: 57 additions & 0 deletions configs/defconfig.esp32c5
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
CONFIG_XTAL_FREQ_AUTO=y
CONFIG_XTAL_FREQ=0
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_SPIRAM=y

CONFIG_BT_ENABLED=y
CONFIG_BT_BLE_BLUFI_ENABLE=y
CONFIG_RTC_CLK_CAL_CYCLES=576
# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304
# This Enables RISCV LP for C6 - but it can't be used within Arduino at this time.
#CONFIG_ULP_COPROC_ENABLED=y
#CONFIG_ULP_COPROC_LP_CORE=y
#CONFIG_ULP_COPROC_RESERVE_MEM=4096

#
# OpenThread
#
CONFIG_OPENTHREAD_ENABLED=y
# Border Router disabled
# CONFIG_OPENTHREAD_BORDER_ROUTER=y
# CONFIG_OPENTHREAD_RADIO_SPINEL_UART=y

# DNS64 and NAT64 will be disabled for a while
# OT IDF issue https://github.com/espressif/esp-idf/issues/15069
# CONFIG_OPENTHREAD_DNS64_CLIENT=y

# Radio for RPC
# CONFIG_OPENTHREAD_RADIO=y
# CONFIG_OPENTHREAD_RADIO_NATIVE=y
# CONFIG_OPENTHREAD_DIAG=n
CONFIG_OPENTHREAD_COMMISSIONER=y
CONFIG_OPENTHREAD_JOINER=y
CONFIG_OPENTHREAD_CLI=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_DNS_CLIENT=y
# Default dataset for quick start
CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread-ESP"
CONFIG_OPENTHREAD_MESH_LOCAL_PREFIX="fd00:db8:a0:0::/64"
CONFIG_OPENTHREAD_NETWORK_CHANNEL=15
CONFIG_OPENTHREAD_NETWORK_PANID=0x1234
CONFIG_OPENTHREAD_NETWORK_EXTPANID="dead00beef00cafe"
CONFIG_OPENTHREAD_NETWORK_MASTERKEY="00112233445566778899aabbccddeeff"
CONFIG_OPENTHREAD_NETWORK_PSKC="104810e2315100afd6bc9215a6bfac53"
# end of OpenThread

# Matter shall use only WiFi
CONFIG_ENABLE_MATTER_OVER_THREAD=n

#
# Zigbee
#
CONFIG_ZB_ENABLED=y
CONFIG_ZB_ZED=y
CONFIG_ZB_RADIO_NATIVE=y
# end of Zigbee
2 changes: 1 addition & 1 deletion main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ dependencies:
version: "1.4.1"
require: public
rules:
- if: "target not in [esp32c2, esp32h2, esp32p4]"
- if: "target not in [esp32c2, esp32h2, esp32p4, esp32c5]"
118 changes: 0 additions & 118 deletions patches/lwip_max_tcp_pcb.diff

This file was deleted.

4 changes: 2 additions & 2 deletions tools/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ if [ -z $IDF_PATH ]; then
fi

if [ -z $IDF_BRANCH ]; then
IDF_BRANCH="release/v5.4"
IDF_BRANCH="release/v5.5"
fi

if [ -z $AR_PR_TARGET_BRANCH ]; then
AR_PR_TARGET_BRANCH="master"
AR_PR_TARGET_BRANCH="release/v3.3.x"
fi

if [ -z $IDF_TARGET ]; then
Expand Down
3 changes: 3 additions & 0 deletions tools/gen_pioarduino_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def convert_version(version_string):
'v7.7.7' becomes '7.7.7'
"""

if version_string == 'heads/master':
return ".".join(("5", "5", "0")) #temporary

regex_pattern = (
r"v(?P<MAJOR>0|[1-9]\d*)\.(?P<MINOR>0|[1-9]\d*)\.*(?P<PATCH>0|[1-9]\d*)*"
)
Expand Down
7 changes: 3 additions & 4 deletions tools/install-esp-idf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ if [ ! -x $idf_was_installed ] || [ ! -x $commit_predefined ]; then
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)

# Temporarily patch the ESP32-S2 I2C LL driver to keep the clock source
cd $IDF_PATH
patch -p1 -N -i $AR_PATCHES/esp32s2_i2c_ll_master_init.diff
patch -p1 -N -i $AR_PATCHES/lwip_max_tcp_pcb.diff
cd -
#cd $IDF_PATH
#patch -p1 -N -i $AR_PATCHES/esp32s2_i2c_ll_master_init.diff
#cd -
fi

#
Expand Down