diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 3d3112d2972ecd..cd6a5f1225e9da 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -83,7 +83,6 @@ jobs: "./scripts/build/build_examples.py \ --enable-flashbundle \ --target esp32-m5stack-all-clusters-minimal \ - --target esp32-m5stack-all-clusters-rpc-ipv6only \ --pregen-dir ./zzz_pregenerated \ build \ --copy-artifacts-to out/artifacts \ @@ -95,6 +94,15 @@ jobs: mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py - name: Build example All Clusters App(Target:ESP32C3) run: scripts/examples/esp_example.sh all-clusters-app sdkconfig.defaults.esp32c3 esp32c3 + - name: Build example All Clusters App(Target:ESP32) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target esp32-devkitc-all-clusters-rpc-ipv6only \ + build \ + --copy-artifacts-to out/artifacts \ + " - name: Copy aside build products run: | mkdir -p example_binaries/esp32-build diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a0ae1b95fe4730..0a2b379ccb0f01 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -579,8 +579,6 @@ "esp32-devkitc-temperature-measurement", "esp32-m5stack-all-clusters", "esp32-m5stack-all-clusters-ipv6only", - "esp32-m5stack-all-clusters-rpc", - "esp32-m5stack-all-clusters-rpc-ipv6only", "infineon-psoc6-all-clusters", "infineon-psoc6-lock", "infineon-psoc6-light", diff --git a/examples/all-clusters-app/esp32/sdkconfig_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_rpc.defaults new file mode 100644 index 00000000000000..3faf5754c82a99 --- /dev/null +++ b/examples/all-clusters-app/esp32/sdkconfig_rpc.defaults @@ -0,0 +1,92 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# Copyright (c) 2024 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 ESP32. +# +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=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_CUSTOM_FILENAME="partitions.csv" + +# Vendor and product id +CONFIG_DEVICE_VENDOR_ID=0xFFF1 +CONFIG_DEVICE_PRODUCT_ID=0x8001 + +# Main task needs a bit more stack than the default +# default is 3584, bump this up to 5k. +CONFIG_ESP_MAIN_TASK_STACK_SIZE=5120 + +# PW RPC Debug channel +CONFIG_EXAMPLE_UART_PORT_NUM=0 +CONFIG_EXAMPLE_UART_BAUD_RATE=115200 +CONFIG_EXAMPLE_UART_RXD=3 +CONFIG_EXAMPLE_UART_TXD=1 +CONFIG_ENABLE_PW_RPC=y + +# Disable shell +CONFIG_ENABLE_CHIP_SHELL=n + +# Serial Flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" + + +#disable Bluetooth modem sleep +#enable it may cause GPIO ISR triggers continuously +CONFIG_BTDM_CTRL_MODEM_SLEEP=n +CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG=n +CONFIG_BTDM_CTRL_LPCLK_SEL_MAIN_XTAL=n + +# Enable HKDF in mbedtls +CONFIG_MBEDTLS_HKDF_C=y + +# Build chip tests +CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y + +# Memory Optimizations +CONFIG_NIMBLE_MAX_CONNECTIONS=1 +CONFIG_BTDM_CTRL_BLE_MAX_CONN=1 +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n + +# Reduce the event logging buffer to reduce the DRAM overflow +# TODO: [ESP32] Fix the DRAM overflow in esp32 apps #34717 +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE=512 diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 9a48c18494406d..7725253af6c9f7 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -34,7 +34,6 @@ steps: ./scripts/build/build_examples.py --enable-flashbundle --target esp32-devkitc-light-rpc --target esp32-m5stack-all-clusters-ipv6only --target - esp32-m5stack-all-clusters-rpc-ipv6only --target esp32-m5stack-light --target esp32-m5stack-light-ipv6only --target esp32-m5stack-ota-requestor build --create-archives diff --git a/scripts/build/BUILD.gn b/scripts/build/BUILD.gn index 36b8209285576e..f5995db875efe2 100644 --- a/scripts/build/BUILD.gn +++ b/scripts/build/BUILD.gn @@ -26,7 +26,6 @@ pw_python_package("build_examples") { "testdata/dry_run_android-arm64-chip-tool.txt", "testdata/dry_run_efr32-brd4187c-light-rpc-no-version.txt", "testdata/dry_run_esp32-devkitc-light-rpc.txt", - "testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt", "testdata/dry_run_linux-arm64-chip-tool-ipv6only-clang.txt", "testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt", "testdata/dry_run_linux-x64-all-clusters-coverage.txt", diff --git a/scripts/build/test.py b/scripts/build/test.py index 48a7e4fe53bafc..f1488ba17b870a 100644 --- a/scripts/build/test.py +++ b/scripts/build/test.py @@ -108,7 +108,6 @@ def test_general_dry_runs(self): # build options do not change too much TARGETS = [ 'esp32-devkitc-light-rpc', - 'esp32-m5stack-all-clusters-minimal-rpc-ipv6only', 'android-arm64-chip-tool', 'nrf-nrf52840dk-pump', 'efr32-brd4187c-light-rpc-no-version', diff --git a/scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt b/scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt deleted file mode 100644 index 7d6977d6fc05cc..00000000000000 --- a/scripts/build/testdata/dry_run_esp32-m5stack-all-clusters-minimal-rpc-ipv6only.txt +++ /dev/null @@ -1,26 +0,0 @@ -# Commands will be run in CHIP project root. -cd "{root}" - -# Generating esp32-m5stack-all-clusters-minimal-rpc-ipv6only -mkdir -p {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only - -cp examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults - -rm -f examples/all-clusters-minimal-app/esp32/sdkconfig - -bash -c 'echo -e "\nCONFIG_DISABLE_IPV4=y\n" >>{out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults' - -bash -c 'echo -e "\nCONFIG_LWIP_IPV4=n\n" >>{out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults' - -bash -c 'echo -e "\nCONFIG_ESP_INSIGHTS_ENABLED=n\nCONFIG_ENABLE_ESP_INSIGHTS_TRACE=n\n" >>{out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults' - -bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; -export SDKCONFIG_DEFAULTS={out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults -idf.py -C examples/all-clusters-minimal-app/esp32 -B {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only reconfigure' - -rm -f examples/all-clusters-minimal-app/esp32/sdkconfig - -# Building esp32-m5stack-all-clusters-minimal-rpc-ipv6only -bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh; -export SDKCONFIG_DEFAULTS={out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only/sdkconfig.defaults -idf.py -C examples/all-clusters-minimal-app/esp32 -B {out}/esp32-m5stack-all-clusters-minimal-rpc-ipv6only build'