Skip to content

Commit

Permalink
add ESP32C3 CI (#7942)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored and pull[bot] committed Sep 16, 2021
1 parent 4a2eed1 commit 5e88133
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
42 changes: 42 additions & 0 deletions examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults
Original file line number Diff line number Diff line change
@@ -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"

3 changes: 2 additions & 1 deletion examples/all-clusters-app/esp32/sdkconfig_devkit.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions scripts/examples/esp_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5e88133

Please sign in to comment.