Skip to content

Commit 4deacb0

Browse files
restyled-commitsyeaissa
authored andcommitted
Restyled by prettier-markdown
1 parent ce8f661 commit 4deacb0

File tree

3 files changed

+108
-59
lines changed

3 files changed

+108
-59
lines changed

examples/all-clusters-app/nxp/zephyr/README.md

+104-57
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# CHIP NXP Zephyr All-clusters Application
22

3-
The all-clusters example implements a server which can be accessed by a CHIP controller and can accept basic cluster commands.
3+
The all-clusters example implements a server which can be accessed by a CHIP
4+
controller and can accept basic cluster commands.
45

5-
The example is based on [Project CHIP](https://github.com/project-chip/connectedhomeip) and the NXP Zephyr SDK,
6-
and provides a prototype application that demonstrates device commissioning and different cluster control.
6+
The example is based on
7+
[Project CHIP](https://github.com/project-chip/connectedhomeip) and the NXP
8+
Zephyr SDK, and provides a prototype application that demonstrates device
9+
commissioning and different cluster control.
710

811
<hr>
912

@@ -22,14 +25,17 @@ and provides a prototype application that demonstrates device commissioning and
2225

2326
## Introduction
2427

25-
The Zephyr application provides a working demonstration of supported board integration from Zephyr,
26-
built using the Project CHIP codebase and the NXP/Zephyr SDK.
28+
The Zephyr application provides a working demonstration of supported board
29+
integration from Zephyr, built using the Project CHIP codebase and the
30+
NXP/Zephyr SDK.
2731

2832
The example supports:
29-
- Matter over Wi-Fi
33+
34+
- Matter over Wi-Fi
3035

3136
The supported boards are:
32-
- `rd_rw612_bga`
37+
38+
- `rd_rw612_bga`
3339

3440
<a name="building"></a>
3541

@@ -39,37 +45,49 @@ In order to build the Project CHIP example, we recommend using a Linux
3945
distribution (the demo-application was compiled on Ubuntu 20.04).
4046

4147
Prerequisites:
42-
- Follow instruction from [BUILDING.md](../../../../docs/guides/BUILDING.md) to setup the Matter environment
43-
- Follow instruction from [Getting Started Guide](https://docs.zephyrproject.org/latest/develop/getting_started/index.html) to setup a Zephyr workspace,
44-
however, the west init command to use is as follows:
48+
49+
- Follow instruction from [BUILDING.md](../../../../docs/guides/BUILDING.md)
50+
to setup the Matter environment
51+
- Follow instruction from
52+
[Getting Started Guide](https://docs.zephyrproject.org/latest/develop/getting_started/index.html)
53+
to setup a Zephyr workspace, however, the west init command to use is as
54+
follows:
4555

4656
```shell
4757
$ west init zephyrproject -m https://github.com/nxp-zephyr-ear/zephyr.git --mr zephyr_rw61x_v3.6_RFP
4858
```
4959

50-
51-
>**Note**: Currently, supported NXP platforms in Zephyr targetting Matter are not available in the official Zephyr repo,
52-
> you'll have to use the NXP fork `https://github.com/nxp-zephyr-ear/zephyr` github repo. Reach to your NXP contact for more details.
60+
> **Note**: Currently, supported NXP platforms in Zephyr targetting Matter are
61+
> not available in the official Zephyr repo, you'll have to use the NXP fork
62+
> `https://github.com/nxp-zephyr-ear/zephyr` github repo. Reach to your NXP
63+
> contact for more details.
5364
5465
Steps to build the example, targetting `rd_rw612_bga` board:
5566

5667
1. Activate your Matter env:
68+
5769
```shell
5870
source <path to CHIP workspace>/scripts/activate.sh
5971
```
72+
6073
2. Source zephyr-env.sh:
74+
6175
```shell
6276
source <path to zephyr repo>/zephyr-env.sh
6377
```
78+
6479
3. Run west build command:
80+
6581
```shell
6682
west build -b rd_rw612_bga -p <path to example folder>
6783
```
6884

69-
By default, a folder `build` will be created in the same folder you run the command from.
70-
The binaries will be created in `build/zephyr` with the name `zephyr.elf` and `zephyr.bin`.
85+
By default, a folder `build` will be created in the same folder you run the
86+
command from. The binaries will be created in `build/zephyr` with the name
87+
`zephyr.elf` and `zephyr.bin`.
7188

72-
You can get more details on `west build` with [Zephyr's building guide](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html#building-west-build)
89+
You can get more details on `west build` with
90+
[Zephyr's building guide](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html#building-west-build)
7391

7492
<a name="flashdebug"></a>
7593

@@ -78,32 +96,41 @@ You can get more details on `west build` with [Zephyr's building guide](https://
7896
### Flashing without debugging
7997

8098
`west` can be used to flash a target, as an example for `rd_rw612_bga` board:
99+
81100
```shell
82101
west flash -i <J-Link serial number>
83102
```
84103

85-
You can get more details on `west flash` with [Zephyr's flashing guide](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html#flashing-west-flash)
104+
You can get more details on `west flash` with
105+
[Zephyr's flashing guide](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html#flashing-west-flash)
86106

87-
>**Note**: `west flash` will not start a debug session, it will only flash and reset the device
107+
> **Note**: `west flash` will not start a debug session, it will only flash and
108+
> reset the device
88109
89110
### Flash and debug
90111

91112
To debug a Matter with Zephyr application, you could use several methods:
92-
- [MCUXpresso IDE (version >= 11.6.0)](https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE)
93-
- `west debug` [Zephyr's debugging guide](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html#id29)
94113

95-
>**Note**: As the build provides an elf file, any compatible debugging tool can be used.
114+
- [MCUXpresso IDE (version >= 11.6.0)](https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE)
115+
- `west debug`
116+
[Zephyr's debugging guide](https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html#id29)
117+
118+
> **Note**: As the build provides an elf file, any compatible debugging tool can
119+
> be used.
96120
97121
<a name="factorydata"></a>
98122

99123
## Factory data
100124

101-
NXP Zephyr examples are not using factory data support by default.
102-
Please refer the the section below to build with factory data.
125+
NXP Zephyr examples are not using factory data support by default. Please refer
126+
the the section below to build with factory data.
127+
128+
You may refer to `src/platform/nxp/zephyr/boards/<board>/<board>.overlay` file
129+
to obtain the memory region used by this partition.
103130

104-
You may refer to `src/platform/nxp/zephyr/boards/<board>/<board>.overlay` file to obtain the memory region used by this partition.
131+
For example, the factory data partition on rd_rw612_bga is reserved in the last
132+
sector of the flexspi flash of RD BGA board, at `0x1BFFF000`.
105133

106-
For example, the factory data partition on rd_rw612_bga is reserved in the last sector of the flexspi flash of RD BGA board, at `0x1BFFF000`.
107134
```
108135
&flexspi {
109136
status = "okay";
@@ -118,74 +145,92 @@ For example, the factory data partition on rd_rw612_bga is reserved in the last
118145
};
119146
```
120147

121-
>**Note**: You may also refer to `src/platform/nxp/zephyr/boards/<board>/<board>.overlay` file to check other memory partitions used by the platform, such as the file system partition mentioned with the `storage` label.
148+
> **Note**: You may also refer to
149+
> `src/platform/nxp/zephyr/boards/<board>/<board>.overlay` file to check other
150+
> memory partitions used by the platform, such as the file system partition
151+
> mentioned with the `storage` label.
122152
123153
### Build with factory data support
124154

125-
To build the example with factory data support, you can add `-DFILE_SUFFIX=fdata` in the
126-
west build command line.
155+
To build the example with factory data support, you can add
156+
`-DFILE_SUFFIX=fdata` in the west build command line.
127157

128158
Example:
159+
129160
```bash
130161
west build -b rd_rw612_bga -p <path to example folder> -- -DFILE_SUFFIX=fdata
131162
```
132163

133-
`prj_fdata.conf` configuration file will enable `CONFIG_CHIP_FACTORY_DATA` Kconfig so the application will load the
134-
factory data at boot.
164+
`prj_fdata.conf` configuration file will enable `CONFIG_CHIP_FACTORY_DATA`
165+
Kconfig so the application will load the factory data at boot.
135166

136167
### Generate factory data
137168

138169
#### Automatically (recommended)
139170

140-
The factory data can be generated automatically during the build of the application.
141-
To do so, you can uncomment the `CONFIG_CHIP_FACTORY_DATA_BUILD=y` in `prj_fdata.conf`.
171+
The factory data can be generated automatically during the build of the
172+
application. To do so, you can uncomment the `CONFIG_CHIP_FACTORY_DATA_BUILD=y`
173+
in `prj_fdata.conf`.
142174

143-
You will have to specify the source of the certificates to be used for the factory data.
144-
Please refer to `CHIP_FACTORY_DATA_CERT_SOURCE` Kconfig for more info.
175+
You will have to specify the source of the certificates to be used for the
176+
factory data. Please refer to `CHIP_FACTORY_DATA_CERT_SOURCE` Kconfig for more
177+
info.
145178

146-
>**Note**: The application demonstrates the usage of encrypted Matter factory data storage.
147-
> Matter factory data should be encrypted using an AES 128 software key before flashing them to the device flash.
148-
> You can encrypt the factory data automatically during the build by enabling `CHIP_ENCRYPTED_FACTORY_DATA` Kconfig.
149-
> See also `CHIP_ENCRYPTED_FACTORY_DATA_AES128_KEY` Kconfig if you want to use a specific key.
179+
> **Note**: The application demonstrates the usage of encrypted Matter factory
180+
> data storage. Matter factory data should be encrypted using an AES 128
181+
> software key before flashing them to the device flash. You can encrypt the
182+
> factory data automatically during the build by enabling
183+
> `CHIP_ENCRYPTED_FACTORY_DATA` Kconfig. See also
184+
> `CHIP_ENCRYPTED_FACTORY_DATA_AES128_KEY` Kconfig if you want to use a specific
185+
> key.
150186
151-
The resulting factory data will be provided along `zephyr.bin` as a binary file named `factory_data.bin`.
152-
In order to flash it to your device, you need to know the partition address: please refer to `factory_partition` defined in `src/platform/nxp/zephyr/boards/<board>/<board>.overlay`.
187+
The resulting factory data will be provided along `zephyr.bin` as a binary file
188+
named `factory_data.bin`. In order to flash it to your device, you need to know
189+
the partition address: please refer to `factory_partition` defined in
190+
`src/platform/nxp/zephyr/boards/<board>/<board>.overlay`.
153191

154192
#### Manually
155193

156-
See [Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md)
194+
See
195+
[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md)
157196

158197
<a name="ota-software-update"></a>
159198

160199
## OTA Software Update
161200

162-
See [Guide for OTA Software Update on NXP devices using Zephyr SDK](../../../../docs/guides/nxp/nxp_zephyr_ota_software_update.md)
201+
See
202+
[Guide for OTA Software Update on NXP devices using Zephyr SDK](../../../../docs/guides/nxp/nxp_zephyr_ota_software_update.md)
163203

164204
<a name="testing-the-example"></a>
165205

166206
## Testing the example
167207

168-
To know how to commission a device over BLE, follow the instructions from [chip-tool's README.md 'Commission a device over BLE'](../../../chip-tool/README.md#commission-a-device-over-ble).
208+
To know how to commission a device over BLE, follow the instructions from
209+
[chip-tool's README.md 'Commission a device over BLE'](../../../chip-tool/README.md#commission-a-device-over-ble).
169210

170211
<a name="matter-cli"></a>
171212

172213
## Using Matter CLI in NXP Zephyr examples
173214

174-
Some Matter examples for the development kits from NXP include
175-
a command-line interface that allows access to application logs and
215+
Some Matter examples for the development kits from NXP include a command-line
216+
interface that allows access to application logs and
176217
[Zephyr shell](https://docs.zephyrproject.org/1.13.0/subsystems/shell.html).
177218

178-
Depending on the platform, the CLI console and the logs can be split on two different interfaces.
219+
Depending on the platform, the CLI console and the logs can be split on two
220+
different interfaces.
179221

180-
You may refer to `boards/<board name>.overlay` file to check how the board is configured for the example.
181-
The binding `zephyr,console` is used to print the logs, while the binding `zephyr,shell-uart` is used for the CLI.
182-
If the logs and the CLI are split among two serial interfaces, you will have to open both ports.
222+
You may refer to `boards/<board name>.overlay` file to check how the board is
223+
configured for the example. The binding `zephyr,console` is used to print the
224+
logs, while the binding `zephyr,shell-uart` is used for the CLI. If the logs and
225+
the CLI are split among two serial interfaces, you will have to open both ports.
183226

184-
As an example, the Matter CLI on `rd_rw612_bga` is configured to be output on `flexcomm3` with a baudrate of `115200`.
185-
The logs are configured to be output on `flexcomm0` with a baudrate of `115200`.
227+
As an example, the Matter CLI on `rd_rw612_bga` is configured to be output on
228+
`flexcomm3` with a baudrate of `115200`. The logs are configured to be output on
229+
`flexcomm0` with a baudrate of `115200`.
186230

187-
>**Note**: `flexcomm3` is wired to the USB FTDI port of the RD BGA board by default.
188-
> `flexcomm0` is wired to `GPIO2` (RX) and `GPIO3` (TX). Those pins are accessible on `HD2` pin header.
231+
> **Note**: `flexcomm3` is wired to the USB FTDI port of the RD BGA board by
232+
> default. `flexcomm0` is wired to `GPIO2` (RX) and `GPIO3` (TX). Those pins are
233+
> accessible on `HD2` pin header.
189234
190235
To access the CLI console, use a serial terminal emulator of your choice, like
191236
Minicom or GNU Screen. Use the baud rate set to `115200`.
@@ -255,6 +300,7 @@ Pressing the Tab key with a command entered in the command line cycles through
255300
available options for the given command.
256301

257302
You can also run the `help` command:
303+
258304
```shell
259305
uart:~$ help
260306
Please press the <Tab> button to see all available commands.
@@ -287,9 +333,9 @@ Available commands:
287333
288334
#### `reboot` subcommand
289335
290-
Performs either a warm or cold reset.
291-
Difference between warm and cold resets may vary from a platform to another, but on default Cortex-M architectures,
292-
both methods are the same, so use either one if nothing is specific to your platform.
336+
Performs either a warm or cold reset. Difference between warm and cold resets
337+
may vary from a platform to another, but on default Cortex-M architectures, both
338+
methods are the same, so use either one if nothing is specific to your platform.
293339
294340
```shell
295341
uart:~$ kernel reboot cold|warm
@@ -358,7 +404,8 @@ MT:W0GU2OTB00KA0648G00
358404
359405
#### `none qrcodeurl` subcommand
360406
361-
Prints the URL to view the device onboarding QR code in a web browser. Takes no arguments.
407+
Prints the URL to view the device onboarding QR code in a web browser. Takes no
408+
arguments.
362409
363410
```shell
364411
uart:~$ matter onboardingcodes none qrcodeurl
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# CHIP NXP Zephyr Laundry Washer Application
22

3-
All instructions describing how to use a Matter application on NXP Zephyr can be found in [README.md](../../../all-clusters-app/nxp/zephyr/README.md) root readme
3+
All instructions describing how to use a Matter application on NXP Zephyr can be
4+
found in [README.md](../../../all-clusters-app/nxp/zephyr/README.md) root readme
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# CHIP NXP Zephyr Thermostat Application
22

3-
All instructions describing how to use a Matter application on NXP Zephyr can be found in [README.md](../../../all-clusters-app/nxp/zephyr/README.md) root readme
3+
All instructions describing how to use a Matter application on NXP Zephyr can be
4+
found in [README.md](../../../all-clusters-app/nxp/zephyr/README.md) root readme

0 commit comments

Comments
 (0)