Skip to content

Commit 530edbf

Browse files
s07641069j-ororke
authored andcommitted
[Telink] Readme files update & Add USB target to CI (project-chip#34502)
* [Telink] Add USB target to CI * [Telink] update readme files * [Telink] fix the unit test
1 parent da98298 commit 530edbf

File tree

20 files changed

+436
-170
lines changed

20 files changed

+436
-170
lines changed

.github/workflows/examples-telink.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ jobs:
189189
- name: clean out build output
190190
run: rm -rf ./out
191191

192-
- name: Build example Telink (B91) Pump App
192+
- name: Build example Telink (B91 USB) Pump App
193193
run: |
194194
./scripts/run_in_build_env.sh \
195-
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump' build"
195+
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-usb' build"
196196
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
197-
telink tlsr9518adk80d pump-app \
198-
out/telink-tlsr9518adk80d-pump/zephyr/zephyr.elf \
197+
telink tlsr9518adk80d pump-app-usb \
198+
out/telink-tlsr9518adk80d-pump-usb/zephyr/zephyr.elf \
199199
/tmp/bloat_reports/
200200
201201
- name: clean out build output

examples/air-quality-sensor-app/telink/README.md

+26-10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ You can use this example as a reference for creating your own application.
44

55
![Telink B91 EVK](http://wiki.telink-semi.cn/wiki/assets/Hardware/B91_Generic_Starter_Kit_Hardware_Guide/connection_chart.png)
66

7+
## Supported devices
8+
9+
The example supports building and running on the following devices:
10+
11+
| Board/SoC | Build target | Zephyr Board Info |
12+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
13+
| [B91](https://wiki.telink-semi.cn/wiki/Hardware/B91_Generic_Starter_Kit_Hardware_Guide) [TLSR9518ADK80D](https://wiki.telink-semi.cn/wiki/chip-series/TLSR951x-Series) | `tlsr9518adk80d`, `tlsr9518adk80d-mars`, `tlsr9518adk80d-usb` | [TLSR9518ADK80D](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9518adk80d/doc/index.rst) |
14+
| [B92](https://wiki.telink-semi.cn/wiki/Hardware/B92_Generic_Starter_Kit_Hardware_Guide) [TLSR9528A](https://wiki.telink-semi.cn/wiki/chip-series/TLSR952x-Series) | `tlsr9528a`, `tlsr9528a_retention` | [TLSR9528A](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9528a/doc/index.rst) |
15+
| [B95](https://wiki.telink-semi.cn/wiki/Hardware/B95_Generic_Starter_Kit_Hardware_Guide) [TLSR9258A](https://wiki.telink-semi.cn/wiki/chip-series/TLSR925x-Series) | `tlsr9258a` | [TLSR9258A](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9258a/doc/index.rst) |
16+
| [W91](https://wiki.telink-semi.cn/wiki/Hardware/W91_Generic_Starter_Kit_Hardware_Guide) [TLSR9118BDK40D](https://wiki.telink-semi.cn/wiki/chip-series/TLSR911x-Series) | `tlsr9118bdk40d` | [TLSR9118BDK40D](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9118bdk40d/doc/index.rst) |
17+
718
## Build and flash
819

920
1. Run the Docker container:
@@ -12,7 +23,7 @@ You can use this example as a reference for creating your own application.
1223
$ docker run -it --rm -v $PWD:/host -w /host ghcr.io/project-chip/chip-build-telink:$(wget -q -O - https://raw.githubusercontent.com/project-chip/connectedhomeip/master/.github/workflows/examples-telink.yaml 2> /dev/null | grep chip-build-telink | awk -F: '{print $NF}')
1324
```
1425

15-
Compatible docker image version can be found in next file:
26+
You can find the compatible Docker image version in the file:
1627

1728
```bash
1829
$ .github/workflows/examples-telink.yaml
@@ -24,8 +35,8 @@ You can use this example as a reference for creating your own application.
2435
$ source ./scripts/activate.sh -p all,telink
2536
```
2637

27-
3. In the example dir run (replace _<build_target>_ with your board name, for
28-
example, `tlsr9118bdk40d`, `tlsr9518adk80d`, `tlsr9528a` or `tlsr9258a`):
38+
3. Build the example (replace _<build_target>_ with your board name, see
39+
[Supported devices](#supported-devices)):
2940

3041
```bash
3142
$ west build -b <build_target>
@@ -35,9 +46,12 @@ You can use this example as a reference for creating your own application.
3546
MB, for example, `-DFLASH_SIZE=1m` or `-DFLASH_SIZE=4m`:
3647

3748
```bash
38-
$ west build -b tlsr9518adk80d -- -DFLASH_SIZE=4m
49+
$ west build -b <build_target> -- -DFLASH_SIZE=4m
3950
```
4051

52+
You can find the target built file called **_zephyr.bin_** under the
53+
**_build/zephyr_** directory.
54+
4155
4. Flash binary:
4256

4357
```
@@ -56,16 +70,18 @@ To get output from device, connect UART to following pins:
5670
| TX | PB2 (pin 16 of J34 connector) |
5771
| GND | GND |
5872

73+
Baud rate: 115200 bits/s
74+
5975
### Buttons
6076

6177
The following buttons are available on **tlsr9518adk80d** board:
6278

63-
| Name | Function | Description |
64-
| :------- | :--------------------- | :----------------------------------------------------------------------------------------------------- |
65-
| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and back to uncommissioned state |
66-
| Button 2 | `AirQuality` control | Manually triggers the `AirQuality` state |
67-
| Button 3 | Thread start | Commission thread with static credentials and enables the Thread on device |
68-
| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
79+
| Name | Function | Description |
80+
| :------- | :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
81+
| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and return to a decommissioned state (to activate, push the button 3 times) |
82+
| Button 2 | `AirQuality` control | Manually triggers the `AirQuality` state |
83+
| Button 3 | Thread start | Commission thread with static credentials and enables the Thread on device |
84+
| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
6985

7086
### LEDs
7187

examples/all-clusters-app/telink/README.md

+26-10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ creating your own application.
66

77
![Telink B91 EVK](http://wiki.telink-semi.cn/wiki/assets/Hardware/B91_Generic_Starter_Kit_Hardware_Guide/connection_chart.png)
88

9+
## Supported devices
10+
11+
The example supports building and running on the following devices:
12+
13+
| Board/SoC | Build target | Zephyr Board Info |
14+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
15+
| [B91](https://wiki.telink-semi.cn/wiki/Hardware/B91_Generic_Starter_Kit_Hardware_Guide) [TLSR9518ADK80D](https://wiki.telink-semi.cn/wiki/chip-series/TLSR951x-Series) | `tlsr9518adk80d`, `tlsr9518adk80d-mars`, `tlsr9518adk80d-usb` | [TLSR9518ADK80D](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9518adk80d/doc/index.rst) |
16+
| [B92](https://wiki.telink-semi.cn/wiki/Hardware/B92_Generic_Starter_Kit_Hardware_Guide) [TLSR9528A](https://wiki.telink-semi.cn/wiki/chip-series/TLSR952x-Series) | `tlsr9528a`, `tlsr9528a_retention` | [TLSR9528A](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9528a/doc/index.rst) |
17+
| [B95](https://wiki.telink-semi.cn/wiki/Hardware/B95_Generic_Starter_Kit_Hardware_Guide) [TLSR9258A](https://wiki.telink-semi.cn/wiki/chip-series/TLSR925x-Series) | `tlsr9258a` | [TLSR9258A](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9258a/doc/index.rst) |
18+
| [W91](https://wiki.telink-semi.cn/wiki/Hardware/W91_Generic_Starter_Kit_Hardware_Guide) [TLSR9118BDK40D](https://wiki.telink-semi.cn/wiki/chip-series/TLSR911x-Series) | `tlsr9118bdk40d` | [TLSR9118BDK40D](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9118bdk40d/doc/index.rst) |
19+
920
## Build and flash
1021

1122
1. Run the Docker container:
@@ -14,7 +25,7 @@ creating your own application.
1425
$ docker run -it --rm -v $PWD:/host -w /host ghcr.io/project-chip/chip-build-telink:$(wget -q -O - https://raw.githubusercontent.com/project-chip/connectedhomeip/master/.github/workflows/examples-telink.yaml 2> /dev/null | grep chip-build-telink | awk -F: '{print $NF}')
1526
```
1627

17-
Compatible docker image version can be found in next file:
28+
You can find the compatible Docker image version in the file:
1829

1930
```bash
2031
$ .github/workflows/examples-telink.yaml
@@ -26,8 +37,8 @@ creating your own application.
2637
$ source ./scripts/activate.sh -p all,telink
2738
```
2839

29-
3. In the example dir run (replace _<build_target>_ with your board name, for
30-
example, `tlsr9118bdk40d`, `tlsr9518adk80d`, `tlsr9528a` or `tlsr9258a`):
40+
3. Build the example (replace _<build_target>_ with your board name, see
41+
[Supported devices](#supported-devices)):
3142

3243
```bash
3344
$ west build -b <build_target>
@@ -37,9 +48,12 @@ creating your own application.
3748
MB, for example, `-DFLASH_SIZE=1m` or `-DFLASH_SIZE=4m`:
3849

3950
```bash
40-
$ west build -b tlsr9518adk80d -- -DFLASH_SIZE=4m
51+
$ west build -b <build_target> -- -DFLASH_SIZE=4m
4152
```
4253

54+
You can find the target built file called **_zephyr.bin_** under the
55+
**_build/zephyr_** directory.
56+
4357
4. Flash binary:
4458

4559
```
@@ -58,16 +72,18 @@ To get output from device, connect UART to following pins:
5872
| TX | PB2 (pin 16 of J34 connector) |
5973
| GND | GND |
6074

75+
Baud rate: 115200 bits/s
76+
6177
### Buttons
6278

6379
The following buttons are available on **tlsr9518adk80d** board:
6480

65-
| Name | Function | Description |
66-
| :------- | :--------------------- | :----------------------------------------------------------------------------------------------------- |
67-
| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and back to uncommissioned state |
68-
| Button 2 | Not used | Not used |
69-
| Button 3 | Thread start | Commission thread with static credentials and enables the Thread on device |
70-
| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
81+
| Name | Function | Description |
82+
| :------- | :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
83+
| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and return to a decommissioned state (to activate, push the button 3 times) |
84+
| Button 2 | Not used | Not used |
85+
| Button 3 | Thread start | Commission thread with static credentials and enables the Thread on device |
86+
| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
7187

7288
### LEDs
7389

examples/all-clusters-minimal-app/telink/README.md

+31-13
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ for creating your own application.
66

77
![Telink B91 EVK](http://wiki.telink-semi.cn/wiki/assets/Hardware/B91_Generic_Starter_Kit_Hardware_Guide/connection_chart.png)
88

9+
## Supported devices
10+
11+
The example supports building and running on the following devices:
12+
13+
| Board/SoC | Build target | Zephyr Board Info |
14+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
15+
| [B91](https://wiki.telink-semi.cn/wiki/Hardware/B91_Generic_Starter_Kit_Hardware_Guide) [TLSR9518ADK80D](https://wiki.telink-semi.cn/wiki/chip-series/TLSR951x-Series) | `tlsr9518adk80d`, `tlsr9518adk80d-mars`, `tlsr9518adk80d-usb` | [TLSR9518ADK80D](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9518adk80d/doc/index.rst) |
16+
| [B92](https://wiki.telink-semi.cn/wiki/Hardware/B92_Generic_Starter_Kit_Hardware_Guide) [TLSR9528A](https://wiki.telink-semi.cn/wiki/chip-series/TLSR952x-Series) | `tlsr9528a`, `tlsr9528a_retention` | [TLSR9528A](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9528a/doc/index.rst) |
17+
| [B95](https://wiki.telink-semi.cn/wiki/Hardware/B95_Generic_Starter_Kit_Hardware_Guide) [TLSR9258A](https://wiki.telink-semi.cn/wiki/chip-series/TLSR925x-Series) | `tlsr9258a` | [TLSR9258A](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9258a/doc/index.rst) |
18+
| [W91](https://wiki.telink-semi.cn/wiki/Hardware/W91_Generic_Starter_Kit_Hardware_Guide) [TLSR9118BDK40D](https://wiki.telink-semi.cn/wiki/chip-series/TLSR911x-Series) | `tlsr9118bdk40d` | [TLSR9118BDK40D](https://github.com/telink-semi/zephyr/blob/develop/boards/riscv/tlsr9118bdk40d/doc/index.rst) |
19+
920
## Build and flash
1021

1122
1. Run the Docker container:
@@ -14,7 +25,7 @@ for creating your own application.
1425
$ docker run -it --rm -v $PWD:/host -w /host ghcr.io/project-chip/chip-build-telink:$(wget -q -O - https://raw.githubusercontent.com/project-chip/connectedhomeip/master/.github/workflows/examples-telink.yaml 2> /dev/null | grep chip-build-telink | awk -F: '{print $NF}')
1526
```
1627

17-
Compatible docker image version can be found in next file:
28+
You can find the compatible Docker image version in the file:
1829

1930
```bash
2031
$ .github/workflows/examples-telink.yaml
@@ -26,8 +37,8 @@ for creating your own application.
2637
$ source ./scripts/activate.sh -p all,telink
2738
```
2839

29-
3. In the example dir run (replace _<build_target>_ with your board name, for
30-
example, `tlsr9118bdk40d`, `tlsr9518adk80d`, `tlsr9528a` or `tlsr9258a`):
40+
3. Build the example (replace _<build_target>_ with your board name, see
41+
[Supported devices](#supported-devices)):
3142

3243
```bash
3344
$ west build -b <build_target>
@@ -37,9 +48,12 @@ for creating your own application.
3748
MB, for example, `-DFLASH_SIZE=1m` or `-DFLASH_SIZE=4m`:
3849

3950
```bash
40-
$ west build -b tlsr9518adk80d -- -DFLASH_SIZE=4m
51+
$ west build -b <build_target> -- -DFLASH_SIZE=4m
4152
```
4253

54+
You can find the target built file called **_zephyr.bin_** under the
55+
**_build/zephyr_** directory.
56+
4357
4. Flash binary:
4458

4559
```
@@ -58,27 +72,31 @@ To get output from device, connect UART to following pins:
5872
| TX | PB2 (pin 16 of J34 connector) |
5973
| GND | GND |
6074

75+
Baud rate: 115200 bits/s
76+
6177
### Buttons
6278

6379
The following buttons are available on **tlsr9518adk80d** board:
6480

65-
| Name | Function | Description |
66-
| :------- | :--------------------- | :----------------------------------------------------------------------------------------------------- |
67-
| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and back to uncommissioned state |
68-
| Button 2 | Not used | Not used |
69-
| Button 2 | Not used | Not used |
70-
| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
81+
| Name | Function | Description |
82+
| :------- | :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
83+
| Button 1 | Factory reset | Perform factory reset to forget currently commissioned Thread network and return to a decommissioned state (to activate, push the button 3 times) |
84+
| Button 2 | Not used | Not used |
85+
| Button 2 | Not used | Not used |
86+
| Button 4 | Open commission window | The button is opening commissioning window to perform commissioning over BLE |
7187

7288
### LEDs
7389

74-
**Red** LED indicates current state of Thread network. It ables to be in
90+
#### Indicate current state of Thread network
91+
92+
**Red** LED indicates current state of Thread network. It is able to be in
7593
following states:
7694

7795
| State | Description |
7896
| :-------------------------- | :--------------------------------------------------------------------------- |
7997
| Blinks with short pulses | Device is not commissioned to Thread, Thread is disabled |
80-
| Blinls with frequent pulses | Device is commissioned, Thread enabled. Device trying to JOIN thread network |
81-
| Blinks with whde pulses | Device commissioned and joined to thread network as CHILD |
98+
| Blinks with frequent pulses | Device is commissioned, Thread enabled. Device trying to JOIN thread network |
99+
| Blinks with wide pulses | Device commissioned and joined to thread network as CHILD |
82100

83101
### CHIP tool commands
84102

0 commit comments

Comments
 (0)