|
| 1 | +# Configuring Openthread libraries on TI CC13x4 Platforms |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +TI Matter example applications provide configuration option for how Thread code |
| 6 | +is included in the build. Thread code can be included in as (1) full source or |
| 7 | +(2) as optimized for matter thread certified library. The library builds have |
| 8 | +been optimized for matter to disable features such as Thread Joiner capability |
| 9 | +in order to save on Flash/RAM usage. |
| 10 | + |
| 11 | +Build arguments have been added to enable Matter applications to link against |
| 12 | +certified Openthread FTD/MTD libraries or custom user libraries. |
| 13 | + |
| 14 | +## Platform Code Changes |
| 15 | + |
| 16 | +To configure a TI example to utilize either an Openthread source or library |
| 17 | +build, open up the `args.gni` file of the example: |
| 18 | + |
| 19 | +To configure the device as an FTD or MTD, set following parameter to either true |
| 20 | +or false respectively. |
| 21 | + |
| 22 | +``` |
| 23 | +chip_openthread_ftd = true |
| 24 | +``` |
| 25 | + |
| 26 | +- **Openthread Library From Source**: |
| 27 | + |
| 28 | + 1. `ot_ti_lib_dir` Is set to an empty string |
| 29 | + |
| 30 | + ``` |
| 31 | + ot_ti_lib_dir="" |
| 32 | + ``` |
| 33 | +
|
| 34 | + 2. `chip_openthread_target` Is set to an empty string |
| 35 | +
|
| 36 | + ``` |
| 37 | + chip_openthread_target = "" |
| 38 | + ``` |
| 39 | +
|
| 40 | + 3. `openthread_external_platform` Points to the Openthread build dependency |
| 41 | + ``` |
| 42 | + openthread_external_platform="${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" |
| 43 | + ``` |
| 44 | +
|
| 45 | +- **TI Certified Openthread Library**: |
| 46 | +
|
| 47 | + 1. `ot_ti_lib_dir` Is set to an empty string |
| 48 | +
|
| 49 | + ``` |
| 50 | + ot_ti_lib_dir="" |
| 51 | + ``` |
| 52 | +
|
| 53 | + 2. `chip_openthread_target` Points to the TI certified library dependency |
| 54 | +
|
| 55 | + ``` |
| 56 | + chip_openthread_target = "${chip_root}/third_party/openthread/platforms/ti:ot-ti-cert" |
| 57 | + ``` |
| 58 | +
|
| 59 | + 3. `openthread_external_platform` Points to the Openthread build dependency |
| 60 | + ``` |
| 61 | + `openthread_external_platform="${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti"` |
| 62 | + ``` |
| 63 | +
|
| 64 | +- **Custom Openthread Library**: |
| 65 | +
|
| 66 | + 1. `ot_ti_lib_dir` Points to a library directory containing a custom |
| 67 | + `libopenthread-ftd/mtd` variant |
| 68 | +
|
| 69 | + ``` |
| 70 | + ot_ti_lib_dir="${chip_root}/CUSTOM_LIB_DIR_PATH/" |
| 71 | + ``` |
| 72 | +
|
| 73 | + 2. `chip_openthread_target` Is set to an empty string |
| 74 | +
|
| 75 | + ``` |
| 76 | + chip_openthread_target = "" |
| 77 | + ``` |
| 78 | +
|
| 79 | + 3. `openthread_external_platform` Points to the Openthread build dependency |
| 80 | +
|
| 81 | + ``` |
| 82 | + openthread_external_platform="${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" |
| 83 | + ``` |
| 84 | +
|
| 85 | +The TI Openthread certified library for the MTD/FTD configurations is based on |
| 86 | +the following header file: |
| 87 | +
|
| 88 | +- `third_party/openthread/ot-ti/src/openthread-core-cc13xx_cc26xx-config-matter.h` |
| 89 | +
|
| 90 | +In order to update the Openthread configuration when building from source or a |
| 91 | +custom library, users may adjust features via the following configuration header |
| 92 | +file: |
| 93 | +
|
| 94 | +- `${chip_root}/examples/platform/cc13x4_26x4/project_include/OpenThreadConfig.h` |
| 95 | +
|
| 96 | +Please refer to TI's standalone Openthread Application build process for |
| 97 | +instructions on acquiring FTD/MTD libraries as they are automatically built when |
| 98 | +generating the standalone applications. |
| 99 | +
|
| 100 | +- `third_party/openthread/ot-ti/README.md` |
0 commit comments