diff --git a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults new file mode 100644 index 00000000000000..a636628c96567d --- /dev/null +++ b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults @@ -0,0 +1,42 @@ +# +# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2018 Nest Labs, Inc. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Description: +# CI uses this to select the ESP32C3-DevKitM. +# +CONFIG_IDF_TARGET="esp32c3" +CONFIG_IDF_TARGET_ESP32C3=y +CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM=y + +# Default to 921600 baud when flashing and monitoring device +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 + +#enable BT +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y + +#enable lwip ipv6 autoconfig +CONFIG_LWIP_IPV6_AUTOCONFIG=y + +# Use a custom partition table +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" + diff --git a/examples/all-clusters-app/esp32/sdkconfig_devkit.defaults b/examples/all-clusters-app/esp32/sdkconfig_devkit.defaults index 1ada3f3bcf11eb..0586571d64f5cd 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_devkit.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_devkit.defaults @@ -18,7 +18,8 @@ # Description: # CI uses this to select the ESP32-DevKitC. # - +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y CONFIG_DEVICE_TYPE_ESP32_DEVKITC=y # Default to 921600 baud when flashing and monitoring device diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults index afa0d89ce5669f..1681a7691decf5 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults @@ -18,7 +18,8 @@ # Description: # CI uses this to select the ESP32 M5Stack. # - +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y CONFIG_DEVICE_TYPE_M5STACK=y # Default to 921600 baud when flashing and monitoring device diff --git a/scripts/examples/esp_example.sh b/scripts/examples/esp_example.sh index 1156b8de44f8ce..429fdcd4906164 100755 --- a/scripts/examples/esp_example.sh +++ b/scripts/examples/esp_example.sh @@ -36,9 +36,16 @@ source "$IDF_PATH/export.sh" for sdkconfig in "$root"/sdkconfig*.defaults; do # remove root path to get sdkconfig*.defaults name sdkconfig_name=${sdkconfig#"$root"/} + if [ "$sdkconfig_name" == "sdkconfig_c3devkit.defaults" ]; then + idf_target="esp32c3" + else + idf_target="esp32" + fi + rm -f "$root"/sdkconfig ( cd "$root" + idf.py set-target "$idf_target" idf.py -D SDKCONFIG_DEFAULTS="$sdkconfig_name" build ) || { echo "build $sdkconfig_name failed"