Skip to content

Commit a94fec9

Browse files
abiradartirestyled-commitsbzbarsky-apple
authored
[TI] CC2674 migration support (#28975)
* cc2674 migration support * spelling fixes * Restyled by gn * renamed migration file and added to toc * more restyling * more restyling pt2 * more restyling pt3 * more restyling pt4 * more restyling pt5 * more restyling pt6 * Restyled by prettier-markdown * Restyled by prettier-markdown * added toc * Restyled by prettier-markdown * Restyled by prettier-markdown * fixed path to ti overview img * more path changes for ti md files * Restyled by prettier-markdown * Restyled by prettier-markdown * Fix restyled issue. * build and publish fix --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
1 parent 6315ea5 commit a94fec9

File tree

9 files changed

+216
-38
lines changed

9 files changed

+216
-38
lines changed

.github/.wordlist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,7 @@ UnitLocalization
14301430
unpair
14311431
unprovisioned
14321432
Unsecure
1433+
Unselect
14331434
untrusted
14341435
updateAvailable
14351436
updateNotAvailable

docs/guides/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- [Silicon Labs - Building](./silabs_efr32_building.md)
2424
- [Silicon Labs - Software Update](./silabs_efr32_software_update.md)
2525
- [STMicroelectronics (STM32)](./stm32_getting_started_guide.md)
26-
- [TI - Platform Overview](./ti_platform_overview.md)
26+
- [TI - Platform Overview](./ti/ti_platform_overview.md)
2727
- [Open IoT SDK - Platform Overview](./openiotsdk_platform_overview.md)
2828
- [Open IoT SDK - Examples](./openiotsdk_examples.md)
2929
- [Open IoT SDK - Unit Tests](./openiotsdk_unit_tests.md)

docs/guides/darwin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Example:
267267
- [SiliconLabs](./silabs_efr32_building.md)
268268
- [Simulated Linux](./simulated_device_linux.md)
269269
- [Telink](/examples/lighting-app/telink/README.md)
270-
- [TI Platform](./ti_platform_overview.md)
270+
- [TI Platform](./ti/ti_platform_overview.md)
271271
- [TI All Clusters](/examples/all-clusters-app/cc13x4_26x4/README.md)
272272
- [Tizen](/examples/lighting-app/tizen/README.md)
273273

docs/guides/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and features.
1010
1111
*
1212
esp32/README
13+
ti/ti_platform_overview
1314
```
1415

1516
## Build Guides
@@ -39,7 +40,7 @@ esp32/README
3940
- [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme)
4041
- [Silicon Labs - Building](./silabs_efr32_building.md)
4142
- [Silicon Labs - Software Update](./silabs_efr32_software_update.md)
42-
- [TI - Platform Overview](./ti_platform_overview.md)
43+
- [TI - Platform Overview](./ti/ti_platform_overview.md)
4344

4445
## Tool Guides
4546

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Running Matter Examples on the TI SimpleLink CC2674P10 and CC2674R10
2+
3+
The existing Matter project examples are based on LP_EM_CC1354P10_6. If using
4+
the CC2674P10, the following migration steps are required. Developers are
5+
strongly encouraged to start with a `cc13x4_26x4` example and migrate the
6+
project accordingly. Example projects can be found in the following location:
7+
`matter/examples/[application]/cc13x4_26x4`
8+
9+
## Dependencies
10+
11+
The following must be installed on your system before proceeding:
12+
13+
- [SysConfig](https://www.ti.com/tool/SYSCONFIG) v1.16.2 or later
14+
- [SIMPLELINK-LOWPOWER-F2-SDK](https://www.ti.com/tool/SIMPLELINK-LOWPOWER-SDK)
15+
v7.10.01.24
16+
17+
## Matter source code changes
18+
19+
The following are changes to the Matter source code files which should be
20+
applied to convert a `matter/examples/[application]/cc13x4_26x4` project to the
21+
CC2674P10 device
22+
23+
- `examples/[application]/cc13x4_26x4/args.gni`, modify/add the following
24+
defines for the CC2674
25+
- `ti_simplelink_board = CC2674`
26+
- `ti_simplelink_device = CC2674P10RGZ`
27+
- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx`, replace this folder
28+
contents with the 7.10.01.24 version from
29+
[TI's downloads page](https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/7.10.01.24)
30+
which is required to add support SDK for the CC2674P10 device.
31+
32+
## Configuring `chip.syscfg` in the SysConfig GUI
33+
34+
1. To open `matter/examples/[application]/cc13x4_26x4/chip.syscfg` in the GUI,
35+
add the following line to the top of the file:
36+
37+
```
38+
// @cliArgs --product <path to SDK>/.metadata/product.json --board /ti/boards/LP_EM_CC1354P10_6 --rtos freertos
39+
```
40+
41+
2. Open the `syscfg` file using the standalone Sysconfig GUI
42+
(`sysconfig_gui.sh`) from the SysConfig installation folder.
43+
3. Click on _Show Device View_ and then click _Switch_.
44+
4. Select _Board_ as _None_ and _Device_ as _`CC2674P10RGZ`_, Unselect
45+
_`Lock PinMux`_, and click _Confirm_.
46+
5. To fix errors, make the following module changes:
47+
- _RF Design_ and _RF Stacks -> BLE -> Radio_: click on _accepting the
48+
current value_, which should be _`LP_CC2674P10_RGZ`_ in the drop down menu
49+
for _Based On RF Design_
50+
- _TI DEVICES -> Device Configuration_: Clear
51+
_`XOSC Cap Array Modification`_
52+
- _TI DRIVERS -> RF_: Set _Global Event Mask_ as _None_ and _No. of Antenna
53+
Switch Control Pins_ as _0_
54+
- _TI DRIVERS -> UART2 -> `PinMux`_: Set _UART Peripheral_ to _UART0_, _TX
55+
Pin_ to _`DIO_13/19`_, and _RX Pin_ to _`DIO_12/18`_
56+
- _TI DRIVERS APPS -> Button_: Set _`PinMux`_ of _CONFIG_BTN_LEFT_ to
57+
_`DIO_15`_ and _CONFIG_BTN_RIGHT_ to _`DIO_14`_
58+
- _TI DRIVERS APPS -> LED_: Set _`PinMux`_ of _CONFIG_LED_RED_ to _`DIO_6`_
59+
and _CONFIG_LED_RIGHT_ to _`DIO_7`_
60+
6. Save the SysConfig file (click on _Save As_) and ensure the file name matches
61+
the reference from `BUILD.gn` (default project name is `chip.syscfg`).
62+
7. Open the new SysConfig file with a text editor and remove the generated
63+
arguments.
64+
```
65+
/**
66+
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
67+
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
68+
* @cliArgs --device "CC2674P10RGZ" --package "RGZ" --part "Default" --rtos "freertos" --product "simplelink_cc13xx_cc26xx_sdk@7.10.01.24"
69+
* @versions {"tool":"1.18.0+3130"}
70+
*/
71+
```
72+
8. Move the `*.syscfg` file into the
73+
`matter/examples/[application]/cc13x4_26x4/` folder. Make sure that the
74+
`args.gni` parameters are aligned for the `CC2674P10RGZ` as detailed above,
75+
and build the example using the `README.md` instructions.
76+
77+
## Modifications required for the CC2674R10
78+
79+
After applying all items in the "Configuring `chip.syscfg` in the SysConfig GUI"
80+
section, additional steps must also be applied to generate Matter project for
81+
the CC2674R10.
82+
83+
- `examples/[application]/cc13x4_26x4/args.gni` should have
84+
`ti_simplelink_board` as `CC2674` and `ti_simplelink_device = CC2674R10RGZ`.
85+
- `examples/[application]/cc13x4_26x4/chip.syscfg` opened with a Text Editor
86+
should change `ble.radioConfig.codeExportConfig.$name` to
87+
`ti_devices_radioconfig_code_export_param2` and `ble.rfDesign` to
88+
`LP_EM_CC1354P10_1`
89+
90+
Furthermore, the subsequent changes apply specifically for the CC2674R10 and
91+
should be addressed from a SysConfig Editor.
92+
93+
1. Pins will need to be reconfigured as such:
94+
95+
| SysConfig pin name | R10 `PinMux` |
96+
| ------------------ | ------------ |
97+
| UART_RX | `DIO_2` |
98+
| UART_TX | `DIO_3` |
99+
| CONFIG_BTN_LEFT | `DIO_13` |
100+
| CONFIG_BTN_RIGHT | `DIO_14` |
101+
| CONFIG_LED_RED | `DIO_6` |
102+
| CONFIG_LED_GREEN | `DIO_7` |
103+
104+
2. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> Code
105+
Export Configuration_, acknowledge and dismiss the PA radio setup error
106+
3. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> RF
107+
Command Symbols_, change `CMD_RADIO_SETUP` from `RF_cmdRadioSetup` to
108+
`RF_cmdIeeeRadioSetup` and add the following functions from the drop-down:
109+
`CMD_TX_TEST`,`CMD_IEEE_ED_SCAN`, `CMD_IEEE_CSMA`, and `CMD_IEEE_RX_ACK`.

docs/guides/ti_platform_overview.md docs/guides/ti/ti_platform_overview.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
```{toctree}
2+
:glob:
3+
:maxdepth: 1
4+
5+
*
6+
```
7+
18
# Texas Instruments platform overview
29

310
The TI platform is a [Matter][matter_gh] platform based on the Texas Instruments
@@ -6,7 +13,7 @@ Incorporated SimpleLink SDK.
613
The following diagram is a simplified representation of a Matter application
714
which built on the TI Platform.
815

9-
![matter_ti_overview_simplified](images/matter_ti_overview_simplified.png)
16+
![matter_ti_overview_simplified](./../images/matter_ti_overview_simplified.png)
1017

1118
## Texas Instruments SimpleLink SDK
1219

@@ -96,9 +103,9 @@ handled by the platform implementation files.
96103
Sample Matter applications are provided for the TI platform. These can be used
97104
as reference for your own application.
98105

99-
- [lock-app](../../examples/lock-app/cc13x2x7_26x2x7/README.md)
100-
- [pump-app](../../examples/pump-app/cc13x2x7_26x2x7/README.md)
101-
- [pump-controller-app](../../examples/pump-controller-app/cc13x2x7_26x2x7/README.md)
106+
- [lock-app](../../../examples/lock-app/cc13x2x7_26x2x7/README.md)
107+
- [pump-app](../../../examples/pump-app/cc13x2x7_26x2x7/README.md)
108+
- [pump-controller-app](../../../examples/pump-controller-app/cc13x2x7_26x2x7/README.md)
102109

103110
<hr>
104111

@@ -110,6 +117,15 @@ SimpleLink SDK.
110117

111118
<hr>
112119

120+
## CC2674 Migration
121+
122+
For instructions on how to migrate the CC1354P10-6 examples to either the
123+
CC2674P10 or the CC2674R10, please refer to the guide linked below.
124+
125+
- [TI CC2674 Migration Guide](./matter_cc2674_migration.md)
126+
127+
<hr>
128+
113129
### TI Support
114130

115131
For technical support, please consider creating a post on TI's [E2E forum][e2e].

src/platform/cc13xx_26xx/cc13x4_26x4/ble_user_config.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#ifndef CC23X0
6969
#if !defined(DeviceFamily_CC26X1)
7070
#include <driverlib/pka.h>
71-
#if !defined(DeviceFamily_CC13X4)
71+
#if !defined(DeviceFamily_CC13X4) && !defined(DeviceFamily_CC26X4)
7272
#include <driverlib/rf_bt5_coex.h>
7373
#endif
7474
#else

third_party/ti_simplelink_sdk/ti_simplelink_board.gni

+17-9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
declare_args() {
1616
# TI SimpleLink board used
1717
ti_simplelink_board = ""
18+
ti_simplelink_device = ""
1819
}
1920

2021
if (ti_simplelink_board == "") {
@@ -25,14 +26,16 @@ assert(ti_simplelink_board != "", "ti_simplelink_board must be specified")
2526

2627
# Differentiate between boards
2728
#
28-
# | Development Kit | Device Family | SoC | |
29-
# | ----------------- | --------------- | ---------- | ------------------- |
30-
# | CC1352R1_LAUNCHXL | cc13x2_26x2 | cc1352r1f3 | Thread MTD + no BLE |
31-
# | CC2652R1_LAUNCHXL | cc13x2_26x2 | cc2652r1f3 | Thread MTD + no BLE |
32-
# | LP_CC2652R7 | cc13x2x7_26x2x7 | cc2652r1f7 | Thread FTD + BLE |
33-
# | CC134P10_6_LAUNCHXL| cc13x4_26x4 | cc1354p10 | Thread FTD + BLE |
34-
# | CC3220SF_LAUNCHXL | cc32xx | cc3220SF | Wi-Fi |
35-
# | CC3235SF_LAUNCHXL | cc32xx | cc3235SF | Wi-Fi |
29+
# | Development Kit | Device Family | SoC | |
30+
# | ----------------- | --------------- | ---------- | ------------------- |
31+
# | CC1352R1_LAUNCHXL | cc13x2_26x2 | cc1352r1f3 | Thread MTD + no BLE |
32+
# | CC2652R1_LAUNCHXL | cc13x2_26x2 | cc2652r1f3 | Thread MTD + no BLE |
33+
# | LP_CC2652R7 | cc13x2x7_26x2x7 | cc2652r1f7 | Thread FTD + BLE |
34+
# | CC134P10_6_LAUNCHXL | cc13x4_26x4 | cc1354p10 | Thread FTD + BLE |
35+
# | CC2674 | cc13x4_24x4 | CC2674P10RGZ | Thread FTD + BLE |
36+
# | CC2674 | cc13x4_24x4 | CC2674R10RGZ | Thread FTD + BLE |
37+
# | CC3220SF_LAUNCHXL | cc32xx | cc3220SF | Wi-Fi |
38+
# | CC3235SF_LAUNCHXL | cc32xx | cc3235SF | Wi-Fi |
3639

3740
# XXX: Can we do an array with a case statement?
3841
if (ti_simplelink_board == "CC1352R1_LAUNCHXL") {
@@ -51,12 +54,17 @@ if (ti_simplelink_board == "CC1352R1_LAUNCHXL") {
5154
# set -DDeviceFamily_CC26X2?
5255
ti_simplelink_soc = "cc2652r1f3"
5356
ti_simplelink_bim_name = "cc2652r1lp"
54-
} else if (ti_simplelink_board == "LP_EM_CC1354P10_6") {
57+
} else if (ti_simplelink_board == "LP_EM_CC1354P10_6" ||
58+
ti_simplelink_board == "LP_EM_CC1354P10_1") {
5559
ti_simplelink_device_family = "cc13x4_26x4"
5660
ti_simplelink_soc_family = "cc13x4"
5761
ti_simplelink_isa = "m33f"
5862
ti_simplelink_soc = "cc1354p10"
5963
ti_simplelink_bim_name = "cc1354p10"
64+
} else if (ti_simplelink_board == "CC2674") {
65+
ti_simplelink_device_family = "cc13x4_26x4" #driverlib paths
66+
ti_simplelink_soc_family = "cc13x4" #ble path
67+
ti_simplelink_isa = "m33f"
6068
} else if (ti_simplelink_board == "LP_CC2652R7") {
6169
ti_simplelink_device_family = "cc13x2x7_26x2x7"
6270
ti_simplelink_soc_family = "cc26x2"

third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni

+64-21
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ template("ti_sysconfig") {
9090
"-fno-exceptions",
9191
"-fno-unwind-tables",
9292
]
93-
defines += [ "DeviceFamily_CC13X4" ]
93+
if (ti_simplelink_device == "") {
94+
defines += [ "DeviceFamily_CC13X4" ]
95+
} else {
96+
defines += [ "DeviceFamily_CC26X4" ]
97+
}
9498
} else if (ti_simplelink_device_family == "cc32xx") {
9599
ldflags += [ "-nostartfiles" ]
96100
defines += [ "CC32XXWARE" ]
@@ -108,20 +112,37 @@ template("ti_sysconfig") {
108112
sources = invoker.sources
109113
outputs = gen_outputs
110114

111-
args = [
112-
ti_sysconfig_root,
113-
"-s",
114-
rebase_path(ti_simplelink_sdk_root + "/.metadata/product.json",
115-
root_build_dir),
116-
"-o",
117-
rebase_path(output_dir, root_build_dir),
118-
"--compiler",
119-
"gcc",
120-
"--board",
121-
"/ti/boards/" + ti_simplelink_board,
122-
"--rtos",
123-
"freertos",
124-
]
115+
if (ti_simplelink_device == "") {
116+
args = [
117+
ti_sysconfig_root,
118+
"-s",
119+
rebase_path(ti_simplelink_sdk_root + "/.metadata/product.json",
120+
root_build_dir),
121+
"-o",
122+
rebase_path(output_dir, root_build_dir),
123+
"--compiler",
124+
"gcc",
125+
"--board",
126+
"/ti/boards/" + ti_simplelink_board,
127+
"--rtos",
128+
"freertos",
129+
]
130+
} else {
131+
args = [
132+
ti_sysconfig_root,
133+
"-s",
134+
rebase_path(ti_simplelink_sdk_root + "/.metadata/product.json",
135+
root_build_dir),
136+
"-o",
137+
rebase_path(output_dir, root_build_dir),
138+
"--compiler",
139+
"gcc",
140+
"--device",
141+
ti_simplelink_device,
142+
"--rtos",
143+
"freertos",
144+
]
145+
}
125146

126147
foreach(source, sources) {
127148
args += [ rebase_path(source, root_build_dir) ]
@@ -205,7 +226,17 @@ template("ti_simplelink_sdk") {
205226
defines += [ "DeviceFamily_CC13X2X7_CC26X2X7" ]
206227
libs += [ "${ti_simplelink_sdk_root}/source/ti/devices/cc13x2x7_cc26x2x7/driverlib/bin/gcc/driverlib.lib" ]
207228
} else if (ti_simplelink_device_family == "cc13x4_26x4") {
208-
defines += [ "DeviceFamily_CC13X4" ]
229+
if (ti_simplelink_device == "") {
230+
defines += [ "DeviceFamily_CC13X4" ]
231+
} else {
232+
defines += [ "DeviceFamily_CC26X4" ]
233+
}
234+
if (ti_simplelink_board == "LP_EM_CC1354P10_1" ||
235+
(ti_simplelink_board == "CC2674" &&
236+
ti_simplelink_device == "CC2674R10RGZ")) {
237+
defines += [ "EM_CC1354P10_1_LP" ]
238+
}
239+
defines += [ "FLASH_ONLY_BUILD" ]
209240
libs += [ "${ti_simplelink_sdk_root}/source/ti/devices/cc13x4_cc26x4/driverlib/bin/gcc/driverlib.lib" ]
210241
}
211242

@@ -439,11 +470,23 @@ template("ti_simplelink_sdk") {
439470
"${ti_simplelink_sdk_root}/source/ti/ble5stack/common/cc26xx/freertos/",
440471
]
441472
} else if (ti_simplelink_device_family == "cc13x4_26x4") {
442-
libs += [
443-
"${ti_simplelink_sdk_root}/source/ti/dmm/lib/gcc/m4f/libdmmlib_freertos.a",
444-
"${ti_simplelink_sdk_root}/source/ti/ble5stack_flash/libraries/cc1354p10_6/OneLib.a",
445-
"${ti_simplelink_sdk_root}/source/ti/ble5stack_flash/libraries/cc1354p10_6/StackWrapper.a",
446-
]
473+
libs += [ "${ti_simplelink_sdk_root}/source/ti/dmm/lib/gcc/m4f/libdmmlib_freertos.a" ]
474+
if (ti_simplelink_board == "LP_EM_CC1354P10_1" ||
475+
(ti_simplelink_board == "CC2674" &&
476+
ti_simplelink_device == "CC2674R10RGZ")) {
477+
libs += [
478+
"${ti_simplelink_sdk_root}/source/ti/ble5stack_flash/libraries/cc1354p10_1/OneLib.a",
479+
"${ti_simplelink_sdk_root}/source/ti/ble5stack_flash/libraries/cc1354p10_1/StackWrapper.a",
480+
]
481+
} else if (ti_simplelink_board == "LP_EM_CC1354P10_6" ||
482+
(ti_simplelink_board == "CC2674" &&
483+
ti_simplelink_device == "CC2674P10RGZ")) {
484+
libs += [
485+
"${ti_simplelink_sdk_root}/source/ti/ble5stack_flash/libraries/cc1354p10_6/OneLib.a",
486+
"${ti_simplelink_sdk_root}/source/ti/ble5stack_flash/libraries/cc1354p10_6/StackWrapper.a",
487+
]
488+
}
489+
447490
defines += [
448491
"ONE_BLE_LIB_SIZE_OPTIMIZATION",
449492
"NVOCMP_NVPAGES=3",

0 commit comments

Comments
 (0)