From 269ad37bb9f7a136a2ef038be53a1562d130e864 Mon Sep 17 00:00:00 2001 From: Sarthak Shaha Date: Fri, 13 Oct 2023 15:08:13 -0400 Subject: [PATCH] Remove support for light-switch app for wifi NCP combinations and Thermostat app for SiWx917 --- scripts/examples/gn_silabs_example.sh | 217 ++++++++++++++------------ 1 file changed, 113 insertions(+), 104 deletions(-) diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index 484788eb4baf28..cad865ced6eb63 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -157,112 +157,112 @@ else shift while [ $# -gt 0 ]; do case $1 in - --clean) - DIR_CLEAN=true - shift - ;; - --wifi) - if [ -z "$2" ]; then - echo "--wifi requires rs9116 or SiWx917 or wf200" - exit 1 - fi - if [ "$2" = "rs9116" ]; then - optArgs+="use_rs9116=true " - elif [ "$2" = "SiWx917" ]; then - optArgs+="use_SiWx917=true " - elif [ "$2" = "wf200" ]; then - optArgs+="use_wf200=true " - else - echo "Wifi usage: --wifi rs9116|SiWx917|wf200" - exit 1 - fi + --clean) + DIR_CLEAN=true + shift + ;; + --wifi) + if [ -z "$2" ]; then + echo "--wifi requires rs9116 or SiWx917 or wf200" + exit 1 + fi + if [ "$2" = "rs9116" ]; then + optArgs+="use_rs9116=true " + elif [ "$2" = "SiWx917" ]; then + optArgs+="use_SiWx917=true " + elif [ "$2" = "wf200" ]; then + optArgs+="use_wf200=true " + else + echo "Wifi usage: --wifi rs9116|SiWx917|wf200" + exit 1 + fi + USE_WIFI=true + optArgs+="chip_device_platform =\"efr32\" " + shift + shift + ;; + --icd) + optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " + shift + ;; + --low-power) + optArgs+="chip_build_libshell=false enable_openthread_cli=false show_qr_code=false disable_lcd=true " + shift + ;; + --chip_enable_wifi_ipv4) + optArgs="chip_enable_wifi_ipv4=true chip_inet_config_enable_ipv4=true " + shift + ;; + --additional_data_advertising) + optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true " + shift + ;; + --use_ot_lib) + optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" " + shift + ;; + --use_ot_coap_lib) + optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" use_thread_coap_lib=true " + shift + ;; + --use_chip_lwip_lib) + optArgs+="lwip_root=\""//third_party/connectedhomeip/third_party/lwip"\" " + shift + ;; + # Option not to be used until ot-efr32 github is updated + # --use_ot_github_sources) + # optArgs+="openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread\" openthread_efr32_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/src/src\"" + # shift + # ;; + --release) + optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false " + shift + ;; + --docker) + optArgs+="efr32_sdk_root=\"$GSDK_ROOT\" " + USE_DOCKER=true + shift + ;; + --uart_log) + optArgs+="sl_uart_log_output=true " + shift + ;; + + --slc_generate) + optArgs+="slc_generate=true " + USE_SLC=true + shift + ;; + --slc_reuse_files) + optArgs+="slc_reuse_files=true " + USE_SLC=true + shift + ;; + --gn_path) + if [ -z "$2" ]; then + echo "--gn_path requires a path to GN" + exit 1 + else + GN_PATH="$2" + fi + GN_PATH_PROVIDED=true + shift + shift + ;; + *"sl_matter_version_str="*) + optArgs+="$1 " + USE_GIT_SHA_FOR_VERSION=false + shift + ;; + *) + if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then USE_WIFI=true + # NCP Mode so base MCU is an EFR32 optArgs+="chip_device_platform =\"efr32\" " - shift - shift - ;; - --icd) - optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " - shift - ;; - --low-power) - optArgs+="chip_build_libshell=false enable_openthread_cli=false show_qr_code=false disable_lcd=true " - shift - ;; - --chip_enable_wifi_ipv4) - optArgs="chip_enable_wifi_ipv4=true chip_inet_config_enable_ipv4=true " - shift - ;; - --additional_data_advertising) - optArgs+="chip_enable_additional_data_advertising=true chip_enable_rotating_device_id=true " - shift - ;; - --use_ot_lib) - optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" " - shift - ;; - --use_ot_coap_lib) - optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" use_thread_coap_lib=true " - shift - ;; - --use_chip_lwip_lib) - optArgs+="lwip_root=\""//third_party/connectedhomeip/third_party/lwip"\" " - shift - ;; - # Option not to be used until ot-efr32 github is updated - # --use_ot_github_sources) - # optArgs+="openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/openthread\" openthread_efr32_root=\"//third_party/connectedhomeip/third_party/openthread/ot-efr32/src/src\"" - # shift - # ;; - --release) - optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false " - shift - ;; - --docker) - optArgs+="efr32_sdk_root=\"$GSDK_ROOT\" " - USE_DOCKER=true - shift - ;; - --uart_log) - optArgs+="sl_uart_log_output=true " - shift - ;; - - --slc_generate) - optArgs+="slc_generate=true " - USE_SLC=true - shift - ;; - --slc_reuse_files) - optArgs+="slc_reuse_files=true " - USE_SLC=true - shift - ;; - --gn_path) - if [ -z "$2" ]; then - echo "--gn_path requires a path to GN" - exit 1 - else - GN_PATH="$2" - fi - GN_PATH_PROVIDED=true - shift - shift - ;; - *"sl_matter_version_str="*) - optArgs+="$1 " - USE_GIT_SHA_FOR_VERSION=false - shift - ;; - *) - if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then - USE_WIFI=true - # NCP Mode so base MCU is an EFR32 - optArgs+="chip_device_platform =\"efr32\" " - fi - optArgs+=$1" " - shift - ;; + fi + optArgs+=$1" " + shift + ;; esac done @@ -278,6 +278,15 @@ else optArgs+="chip_device_platform =\"SiWx917\" " fi + # Deprecated support for Light-swtich app for NCP combinations and Thermostat app for SiWx917 + if + [[ $ROOT == *"light-switch-app"* && $optArgs != *"chip_device_platform =\"SiWx917\""* && $USE_WIFI == true ]] || + [[ $ROOT == *"thermostat"* && $optArgs == *"chip_device_platform =\"SiWx917\" "* ]] + then + echo "Provided App and Build Options are not supported" + exit 1 + fi + if [ "$USE_GIT_SHA_FOR_VERSION" == true ]; then { ShortCommitSha=$(git describe --always --dirty --exclude '*')