Skip to content

Commit

Permalink
use the chip option for OpenThread ftd/mtd selection (#14969)
Browse files Browse the repository at this point in the history
Remove redundant Thread device type configurations in sysconfig files.
  • Loading branch information
srickardti authored and pull[bot] committed Feb 3, 2024
1 parent f9d4cfb commit 1318776
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
6 changes: 0 additions & 6 deletions examples/lock-app/cc13x2x7_26x2x7/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 0 additions & 6 deletions examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion examples/platform/cc13x2_26x2/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<OpenThreadConfig.h>"
openthread_core_config_deps = []

Expand Down
15 changes: 8 additions & 7 deletions third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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" ]
}
}

Expand Down

0 comments on commit 1318776

Please sign in to comment.