You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: examples/all-clusters-app/nxp/zephyr/README.md
+104-57
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,12 @@
1
1
# CHIP NXP Zephyr All-clusters Application
2
2
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.
4
5
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.
7
10
8
11
<hr>
9
12
@@ -22,14 +25,17 @@ and provides a prototype application that demonstrates device commissioning and
22
25
23
26
## Introduction
24
27
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.
27
31
28
32
The example supports:
29
-
- Matter over Wi-Fi
33
+
34
+
- Matter over Wi-Fi
30
35
31
36
The supported boards are:
32
-
-`rd_rw612_bga`
37
+
38
+
-`rd_rw612_bga`
33
39
34
40
<aname="building"></a>
35
41
@@ -39,37 +45,49 @@ In order to build the Project CHIP example, we recommend using a Linux
39
45
distribution (the demo-application was compiled on Ubuntu 20.04).
40
46
41
47
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:
45
55
46
56
```shell
47
57
$ west init zephyrproject -m https://github.com/nxp-zephyr-ear/zephyr.git --mr zephyr_rw61x_v3.6_RFP
48
58
```
49
59
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.
53
64
54
65
Steps to build the example, targetting `rd_rw612_bga` board:
55
66
56
67
1. Activate your Matter env:
68
+
57
69
```shell
58
70
source<path to CHIP workspace>/scripts/activate.sh
59
71
```
72
+
60
73
2. Source zephyr-env.sh:
74
+
61
75
```shell
62
76
source<path to zephyr repo>/zephyr-env.sh
63
77
```
78
+
64
79
3. Run west build command:
80
+
65
81
```shell
66
82
west build -b rd_rw612_bga -p <path to example folder>
67
83
```
68
84
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`.
71
88
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)
73
91
74
92
<aname="flashdebug"></a>
75
93
@@ -78,32 +96,41 @@ You can get more details on `west build` with [Zephyr's building guide](https://
78
96
### Flashing without debugging
79
97
80
98
`west` can be used to flash a target, as an example for `rd_rw612_bga` board:
99
+
81
100
```shell
82
101
west flash -i <J-Link serial number>
83
102
```
84
103
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)
>**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
88
109
89
110
### Flash and debug
90
111
91
112
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)
>**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)
> **Note**: As the build provides an elf file, any compatible debugging tool can
119
+
> be used.
96
120
97
121
<aname="factorydata"></a>
98
122
99
123
## Factory data
100
124
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.
103
130
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`.
105
133
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`.
107
134
```
108
135
&flexspi {
109
136
status = "okay";
@@ -118,74 +145,92 @@ For example, the factory data partition on rd_rw612_bga is reserved in the last
118
145
};
119
146
```
120
147
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.
122
152
123
153
### Build with factory data support
124
154
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.
127
157
128
158
Example:
159
+
129
160
```bash
130
161
west build -b rd_rw612_bga -p <path to example folder> -- -DFILE_SUFFIX=fdata
131
162
```
132
163
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.
135
166
136
167
### Generate factory data
137
168
138
169
#### Automatically (recommended)
139
170
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`.
142
174
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.
145
178
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.
150
186
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
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)
157
196
158
197
<aname="ota-software-update"></a>
159
198
160
199
## OTA Software Update
161
200
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)
163
203
164
204
<aname="testing-the-example"></a>
165
205
166
206
## Testing the example
167
207
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).
169
210
170
211
<aname="matter-cli"></a>
171
212
172
213
## Using Matter CLI in NXP Zephyr examples
173
214
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
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
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