From 13187768189c90f4be14bc588d07ef07fe4dd8be Mon Sep 17 00:00:00 2001 From: Seth Rickard Date: Wed, 9 Feb 2022 14:35:27 -0600 Subject: [PATCH] use the chip option for OpenThread ftd/mtd selection (#14969) Remove redundant Thread device type configurations in sysconfig files. --- examples/lock-app/cc13x2x7_26x2x7/chip.syscfg | 6 ------ .../cc13x2x7_26x2x7/chip.syscfg | 6 ------ examples/platform/cc13x2_26x2/args.gni | 1 - .../ti_simplelink_sdk/ti_simplelink_sdk.gni | 15 ++++++++------- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg b/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg index b5153bf099c450..adb95464b498f2 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg @@ -138,12 +138,6 @@ TRNG1.$name = "CONFIG_TRNG_0"; TRNG2.$name = "CONFIG_TRNG_1"; TRNG3.$name = "CONFIG_TRNG_APP"; -/* Thread */ -Thread.deviceType = "ftd"; -Thread.deviceTypeReadOnly = true; -/* Thread SysConfig generated sources are not used until the upstream modules - * can be updated to enable CHIP. - */ RTOS.name = "FreeRTOS"; /* BLE */ diff --git a/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg b/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg index f195ca15ec32d7..b2409535110003 100644 --- a/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg @@ -136,12 +136,6 @@ TRNG1.$name = "CONFIG_TRNG_0"; TRNG2.$name = "CONFIG_TRNG_1"; TRNG3.$name = "CONFIG_TRNG_APP"; -/* Thread */ -Thread.deviceType = "ftd"; -Thread.deviceTypeReadOnly = true; -/* Thread SysConfig generated sources are not used until the upstream modules - * can be updated to enable CHIP. - */ RTOS.name = "FreeRTOS"; /* BLE */ diff --git a/examples/platform/cc13x2_26x2/args.gni b/examples/platform/cc13x2_26x2/args.gni index b7df0e17eafb6c..7d18cc869d4831 100644 --- a/examples/platform/cc13x2_26x2/args.gni +++ b/examples/platform/cc13x2_26x2/args.gni @@ -16,7 +16,6 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/platform/cc13x2_26x2/args.gni") -chip_openthread_ftd = true openthread_config_file = "" openthread_core_config_deps = [] diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index c0459bb9633763..9e5f73e5b9ecfa 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -20,6 +20,7 @@ import("//build_overrides/openthread.gni") import("//build_overrides/pigweed.gni") import("//build_overrides/ti_simplelink_sdk.gni") +import("${chip_root}/src/platform/device.gni") import("${dir_pw_build}/python.gni") import("${freertos_root}/freertos.gni") import("${mbedtls_root}/mbedtls.gni") @@ -230,10 +231,10 @@ template("ti_simplelink_sdk") { public_configs = [ ":${sdk_target_name}_config" ] } - if (ti_simplelink_device_family == "cc13x2_26x2") { - openthread_example = "cli_mtd" - } else if (ti_simplelink_device_family == "cc13x2x7_26x2x7") { + if (chip_openthread_ftd) { openthread_example = "cli_ftd" + } else { + openthread_example = "cli_mtd" } config("${sdk_target_name}_openthread_platform_config") { @@ -290,12 +291,12 @@ template("ti_simplelink_sdk") { "${chip_root}/third_party/openthread/repo:openthread_config", ] - if (ti_simplelink_device_family == "cc13x2_26x2") { - public_configs += - [ "${chip_root}/third_party/openthread/repo:openthread_mtd_config" ] - } else if (ti_simplelink_device_family == "cc13x2x7_26x2x7") { + if (chip_openthread_ftd) { public_configs += [ "${chip_root}/third_party/openthread/repo:openthread_ftd_config" ] + } else { + public_configs += + [ "${chip_root}/third_party/openthread/repo:openthread_mtd_config" ] } }