Skip to content

Commit 82b1e1b

Browse files
NXP folder architecture improvement (#33987)
* [NXP] Adding nxp_matter_support submodule Adding a reference to the nxp_matter_support repo that would be used to get NXP SDK support files. Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP] Moving NXP Matter SDK support files to a dedicated nxp_matter_support repo Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP][script] Adding an update nxp sdk script allowing to initialize all nxp SDK with west for all platform Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP][doc][k32w0] Updating nxp sdk update steps to use new update_nxp_sdk.py script + updating environement setup documentation Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP][k32w0] Updating default sdk path to nxp_matter_support Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * Restyled by gn * Restyled by prettier-markdown * [NXP][script] Updating update_nxp_sdk script to clean force update processing Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * Updating nxp_sdk update script after code review - dataclass is now used - subprocess dependencies on cwd removed with possible (for west update and west forall cwd is still required) - python logging module is now used Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> --------- Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent f779369 commit 82b1e1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+271
-8087
lines changed

.gitmodules

+5
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,8 @@
321321
url = https://github.com/Infineon/optiga-trust-m.git
322322
branch = matter_support
323323
platforms = infineon
324+
[submodule "third_party/nxp/nxp_matter_support"]
325+
path = third_party/nxp/nxp_matter_support
326+
url = https://github.com/NXP/nxp_matter_support.git
327+
branch = master
328+
platforms = nxp

build_overrides/nxp_sdk.gni

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414

1515
declare_args() {
1616
# Root directory for NXP SDKs.
17-
nxp_sdk_build_root = "//third_party/nxp"
17+
nxp_sdk_matter_support_root = "//third_party/nxp/nxp_matter_support"
18+
}
19+
20+
declare_args() {
21+
nxp_sdk_build_root = "${nxp_sdk_matter_support_root}/gn_build"
1822
}

examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ declare_args() {
4949
setup_discriminator = 3840
5050
}
5151

52-
example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
52+
example_platform_dir =
53+
"${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}"
5354
common_example_dir = "${chip_root}/examples/platform/nxp/common"
5455

5556
if (tcp_download == true && wifi_connect == true) {

examples/build_overrides/nxp_sdk.gni

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414

1515
declare_args() {
1616
# Root directory for NXP SDKs.
17-
nxp_sdk_build_root = "//third_party/connectedhomeip/third_party/nxp"
17+
nxp_sdk_matter_support_root =
18+
"//third_party/connectedhomeip/third_party/nxp/nxp_matter_support"
19+
}
20+
21+
declare_args() {
22+
nxp_sdk_build_root = "${nxp_sdk_matter_support_root}/gn_build"
1823
}

examples/contact-sensor-app/nxp/k32w/k32w0/README.md

+66-57
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,42 @@ network.
1414

1515
<hr>
1616

17-
- [CHIP K32W0 Contact Sensor Example Application](#chip-k32w061-contact-sensor-example-application)
18-
- [Introduction](#introduction)
19-
- [Bluetooth LE Advertising](#bluetooth-le-advertising)
20-
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
21-
- [Device UI](#device-ui)
22-
- [Building](#building)
23-
- [Overwrite board config files](#overwrite-board-config-files)
24-
- [Known issues building](#known-issues-building)
25-
- [Long Idle Time ICD Support](#long-idle-time-icd-support)
26-
- [Manufacturing data](#manufacturing-data)
27-
- [Flashing and debugging](#flashing-and-debugging)
28-
- [Pigweed Tokenizer](#pigweed-tokenizer)
29-
- [Detokenizer script](#detokenizer-script)
30-
- [Notes](#notes)
31-
- [Known issues tokenizer](#known-issues-tokenizer)
32-
- [NXP Ultrafast P256 ECC Library](#nxp-ultrafast-p256-ecc-library)
33-
- [Building steps](#building-steps)
34-
- [Tinycrypt ECC library](#tinycrypt-ecc-library)
35-
- [Building steps](#building-steps-1)
36-
- [OTA](#ota)
37-
- [Writing the SSBL](#writing-the-ssbl)
38-
- [Writing the PSECT](#writing-the-psect)
39-
- [Writing the application](#writing-the-application)
40-
- [OTA Testing](#ota-testing)
41-
- [Known issues ota](#known-issues-ota)
42-
- [Low power](#low-power)
43-
- [Known issues low power](#known-issues-low-power)
44-
- [Removing SSBL Upgrade region](#removing-ssbl-upgrade-region)
45-
46-
</hr>
17+
- [CHIP K32W061 Contact Sensor Example Application](#chip-k32w061-contact-sensor-example-application)
18+
- [Introduction](#introduction)
19+
- [SE051H Secure Element](#se051h-secure-element)
20+
- [Bluetooth LE Advertising](#bluetooth-le-advertising)
21+
- [LIT ICD Active Mode](#lit-icd-active-mode)
22+
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
23+
- [Thread Provisioning](#thread-provisioning)
24+
- [Device UI](#device-ui)
25+
- [No expansion board](#no-expansion-board)
26+
- [Building](#building)
27+
- [Long Idle Time ICD Support](#long-idle-time-icd-support)
28+
- [Overwrite board config files](#overwrite-board-config-files)
29+
- [Known issues building](#known-issues-building)
30+
- [Rotating device id](#rotating-device-id)
31+
- [Manufacturing data](#manufacturing-data)
32+
- [Flashing and debugging](#flashing-and-debugging)
33+
- [Pigweed tokenizer](#pigweed-tokenizer)
34+
- [Detokenizer script](#detokenizer-script)
35+
- [Notes](#notes)
36+
- [Known issues tokenizer](#known-issues-tokenizer)
37+
- [NXP Ultrafast P256 ECC Library](#nxp-ultrafast-p256-ecc-library)
38+
- [Building steps](#building-steps)
39+
- [Tinycrypt ECC library](#tinycrypt-ecc-library)
40+
- [Building steps](#building-steps-1)
41+
- [OTA](#ota)
42+
- [Writing the SSBL](#writing-the-ssbl)
43+
- [Features](#features)
44+
- [Multi image](#multi-image)
45+
- [Simple hash verification](#simple-hash-verification)
46+
- [Writing the PSECT](#writing-the-psect)
47+
- [Writing the application](#writing-the-application)
48+
- [OTA Testing](#ota-testing)
49+
- [Known issues ota](#known-issues-ota)
50+
- [Low power](#low-power)
51+
- [Known issues low power](#known-issues-low-power)
52+
- [Removing SSBL Upgrade Region](#removing-ssbl-upgrade-region)
4753

4854
## Introduction
4955

@@ -179,44 +185,47 @@ contact status.
179185
## Building
180186

181187
In order to build the Project CHIP example, we recommend using a Linux
182-
distribution (the demo-application was compiled on Ubuntu 20.04).
188+
distribution (supported Operating Systems are listed in
189+
[BUILDING.md](../../../../../docs/guides/BUILDING.md#tested-operating systems)).
183190

184-
Activate the Matter environment:
191+
- Make sure that below prerequisites are correctly installed (as described in
192+
[BUILDING.md](../../../../../docs/guides/BUILDING.md#prerequisites)))
185193

186-
```bash
187-
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
194+
```
195+
sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
196+
libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
197+
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
188198
```
189199

190-
To bring the SDK in the environment, the user can:
200+
- Step 1: checkout NXP specific submodules only
191201

192-
- download it with west tool, in which case it will be handled automatically
193-
by gn:
202+
```
203+
user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive
204+
```
194205

195-
```bash
196-
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
197-
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml
198-
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update
199-
```
206+
- Step 2: activate local environment
200207

201-
In case there are local modification to the already installed github NXP
202-
SDK, use the below `west forall` command instead of the `west init` command
203-
to reset the west workspace. Warning: all local changes will be lost after
204-
running this command.
208+
```
209+
user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh
210+
```
205211

206-
```bash
207-
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
208-
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west forall -c "git reset --hard && git clean -xdf" -a
209-
```
212+
If the script says the environment is out of date, you can update it by running
213+
the following command:
210214

211-
- set up a custom path to the SDK, in which case
212-
`k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\"` must be added to the `gn gen`
213-
command:
215+
```
216+
user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh
217+
```
214218

215-
```
216-
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/custom/path/to/SDK
217-
```
219+
- Step 3: Init NXP SDK(s)
220+
221+
```
222+
user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/setup/nxp/update_nxp_sdk.py --platform k32w0
223+
```
224+
225+
Note: By default setup/nxp/update_nxp_sdk.py will try to initialize all NXP
226+
SDKs. Arg "-- help" could be used to view all available options.
218227

219-
Start building the application:
228+
- Start building the application:
220229

221230
```bash
222231
user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w/k32w0

examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ declare_args() {
4949
setup_discriminator = 3840
5050
}
5151

52-
example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}"
52+
example_platform_dir =
53+
"${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}"
5354
common_example_dir = "${chip_root}/examples/platform/nxp/common"
5455

5556
if (tcp_download == true && wifi_connect == true) {

examples/lighting-app/nxp/k32w/k32w0/README.md

+60-50
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,37 @@ network.
1717
<hr>
1818

1919
- [CHIP K32W061 Lighting Example Application](#chip-k32w061-lighting-example-application)
20-
- [Introduction](#introduction)
21-
- [Bluetooth LE Advertising](#bluetooth-le-advertising)
22-
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
23-
- [Device UI](#device-ui)
24-
- [Building](#building)
25-
- [Overwrite board config files](#overwrite-board-config-files)
20+
- [Introduction](#introduction)
21+
- [SE051H Secure Element](#se051h-secure-element)
22+
- [Bluetooth LE Advertising](#bluetooth-le-advertising)
23+
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
24+
- [Thread Provisioning](#thread-provisioning)
25+
- [Device UI](#device-ui)
26+
- [No expansion board](#no-expansion-board)
27+
- [Identify cluster LED state](#identify-cluster-led-state)
28+
- [Building](#building)
29+
- [Overwrite board config files](#overwrite-board-config-files)
2630
- [Known issues building](#known-issues-building)
27-
- [Manufacturing data](#manufacturing-data)
28-
- [Flashing and debugging](#flashing-and-debugging)
29-
- [Pigweed Tokenizer](#pigweed-tokenizer)
30-
- [Detokenizer script](#detokenizer-script)
31-
- [Notes](#notes)
32-
- [Known issues tokenizer](#known-issues-tokenizer)
33-
- [NXP Ultrafast P256 ECC Library](#nxp-ultrafast-p256-ecc-library)
34-
- [Building steps](#building-steps)
35-
- [Tinycrypt ECC library](#tinycrypt-ecc-library)
36-
- [Building steps](#building-steps-1)
37-
- [OTA](#ota)
38-
- [Writing the SSBL](#writing-the-ssbl)
39-
- [Writing the PSECT](#writing-the-psect)
40-
- [Writing the application](#writing-the-application)
41-
- [OTA Testing](#ota-testing)
42-
- [Known issues OTA](#known-issues-ota)
43-
</hr>
31+
- [Rotating device id](#rotating-device-id)
32+
- [Manufacturing data](#manufacturing-data)
33+
- [Flashing and debugging](#flashing-and-debugging)
34+
- [Pigweed tokenizer](#pigweed-tokenizer)
35+
- [Detokenizer script](#detokenizer-script)
36+
- [Notes](#notes)
37+
- [Known issues tokenizer](#known-issues-tokenizer)
38+
- [NXP Ultrafast P256 ECC Library](#nxp-ultrafast-p256-ecc-library)
39+
- [Building steps](#building-steps)
40+
- [Tinycrypt ECC library](#tinycrypt-ecc-library)
41+
- [Building steps](#building-steps-1)
42+
- [OTA](#ota)
43+
- [Writing the SSBL](#writing-the-ssbl)
44+
- [Features](#features)
45+
- [Multi image](#multi-image)
46+
- [Simple hash verification](#simple-hash-verification)
47+
- [Writing the PSECT](#writing-the-psect)
48+
- [Writing the application](#writing-the-application)
49+
- [OTA Testing](#ota-testing)
50+
- [Known issues ota](#known-issues-ota)
4451

4552
## Introduction
4653

@@ -190,44 +197,47 @@ effects:
190197
## Building
191198

192199
In order to build the Project CHIP example, we recommend using a Linux
193-
distribution (the demo-application was compiled on Ubuntu 20.04).
200+
distribution (supported Operating Systems are listed in
201+
[BUILDING.md](../../../../../docs/guides/BUILDING.md#tested-operating systems)).
194202

195-
Activate the Matter environment:
203+
- Make sure that below prerequisites are correctly installed (as described in
204+
[BUILDING.md](../../../../../docs/guides/BUILDING.md#prerequisites)))
196205

197-
```bash
198-
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
206+
```
207+
sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
208+
libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
209+
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
199210
```
200211

201-
To bring the SDK in the environment, the user can:
212+
- Step 1: checkout NXP specific submodules only
202213

203-
- download it with west tool, in which case it will be handled automatically
204-
by gn:
214+
```
215+
user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive
216+
```
205217

206-
```bash
207-
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
208-
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml
209-
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update
210-
```
218+
- Step 2: activate local environment
211219

212-
In case there are local modification to the already installed github NXP
213-
SDK, use the below `west forall` command instead of the `west init` command
214-
to reset the west workspace. Warning: all local changes will be lost after
215-
running this command.
220+
```
221+
user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh
222+
```
216223

217-
```bash
218-
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
219-
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west forall -c "git reset --hard && git clean -xdf" -a
220-
```
224+
If the script says the environment is out of date, you can update it by running
225+
the following command:
221226

222-
- set up a custom path to the SDK, in which case
223-
`k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\"` must be added to the `gn gen`
224-
command:
227+
```
228+
user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh
229+
```
230+
231+
- Step 3: Init NXP SDK(s)
232+
233+
```
234+
user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/setup/nxp/update_nxp_sdk.py --platform k32w0
235+
```
225236

226-
```
227-
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/custom/path/to/SDK
228-
```
237+
Note: By default setup/nxp/update_nxp_sdk.py will try to initialize all NXP
238+
SDKs. Arg "-- help" could be used to view all available options.
229239

230-
Start building the application:
240+
- Start building the application:
231241

232242
```bash
233243
user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lighting-app/nxp/k32w/k32w0

0 commit comments

Comments
 (0)