Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[K32W0] SDK 2.6.13 additional changes #31382

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
435db90
[K32W] Fix a corner case when switching the TLV processors
marius-alex-tache Nov 10, 2023
4b6eade
[K32W] Make Validate public
marius-alex-tache Nov 6, 2023
7c9a634
[K32W0] Add CRC validation during factory data OTA
marius-alex-tache Nov 6, 2023
7f5cd83
[K32W0] Add additional check for provider pointer
marius-alex-tache Nov 7, 2023
7c4b8ec
[K32W0] Change root node revision to 2
dvagner Dec 27, 2023
fa335c2
[K32W] Expose SearchForId in factory data provider public API
marius-alex-tache Nov 7, 2023
0e257e9
[K32W0] Refactor custom factory data provider
marius-alex-tache Nov 7, 2023
683fa35
[K32W] Add platform support for Product Appearance
marius-alex-tache Nov 13, 2023
39822c3
[K32W] Remove maxLengths array
marius-alex-tache Nov 13, 2023
a823afb
[K32W0] Remove usage of maxLength array
marius-alex-tache Nov 13, 2023
2d7b14a
[K32W0] remove unused code in LowPowerHook.cpp file
tanyue518 Aug 8, 2023
cc64c54
[K32W0] use Encoding::HexToBytes to parse the ota encryption key
Nov 21, 2023
44ab56d
[K32W0] remove extra PWR_DisallowDeviceToSleep() which will cause uns…
Nov 28, 2023
b19dae0
[K32W] Revert removal of disallow to sleep and enclose it in specific…
marius-alex-tache Dec 5, 2023
a3817d6
[K32W0] Update reference app readme files
marius-alex-tache Dec 5, 2023
4d28a60
[K32W0] Fix ICD parameters
andrei-menzopol Nov 23, 2023
eab27e2
Restyled by clang-format
restyled-commits Jan 12, 2024
38aee0d
Restyled by gn
restyled-commits Jan 12, 2024
0cb5589
Restyled by prettier-markdown
restyled-commits Jan 12, 2024
b4db3c7
[K32W0] Fix gn check error
marius-alex-tache Jan 12, 2024
f3acb49
Restyled by gn
restyled-commits Jan 12, 2024
62be582
[K32W1] Fix gn check errors
marius-alex-tache Jan 12, 2024
7e060f7
Restyled by gn
restyled-commits Jan 12, 2024
1f43887
[K32W1] Fix another gn error
marius-alex-tache Jan 12, 2024
855b82f
Restyled by gn
restyled-commits Jan 12, 2024
e5e5885
[K32W] Send a report before resetting the device during OTA
marius-alex-tache Jan 15, 2024
74d4424
Restyled by clang-format
restyled-commits Jan 15, 2024
5439ace
[K32W0] Remove deprecated dependency
marius-alex-tache Jan 15, 2024
2a33dad
[K32W1] Remove deprecated dependency
marius-alex-tache Jan 15, 2024
4b67b58
Restyled by gn
restyled-commits Jan 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ cluster OccupancySensing = 1030 {
}

endpoint 0 {
device type ma_rootdevice = 22, version 1;
device type ma_rootdevice = 22, version 2;

binding cluster OtaSoftwareUpdateProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
],
"deviceVersions": [
1
2
],
"deviceIdentifiers": [
22
Expand Down Expand Up @@ -4748,4 +4748,4 @@
}
],
"log": []
}
}
5 changes: 1 addition & 4 deletions examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ k32w0_executable("contact_sensor_app") {
"${k32w0_platform_dir}/common/CustomFactoryDataProvider.h",
]

defines = [
"CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1",
"CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS=3",
]
defines = [ "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1" ]
}

deps = [
Expand Down
56 changes: 29 additions & 27 deletions examples/contact-sensor-app/nxp/k32w/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,56 +177,58 @@ contact status.
In order to build the Project CHIP example, we recommend using a Linux
distribution (the demo-application was compiled on Ubuntu 20.04).

- Start building the application either with Secure Element or without, SDK is
downloaded with west tool.
Activate the Matter environment:

- without Secure Element
```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
```

```
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
To bring the SDK in the environment, the user can:

- download it with west tool, in which case it will be handled automatically
by gn:

```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update
```

In case there are local modification to the already installed git NXP SDK:
Use the below west `forall` command instead of the west init command to
reset the west workspace. Warning: all local changes will be lost after
In case there are local modification to the already installed github NXP
SDK, use the below `west forall` command instead of the `west init` command
to reset the west workspace. Warning: all local changes will be lost after
running this command.

```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$west forall -c "git reset --hard && git clean -xdf" -a
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west forall -c "git reset --hard && git clean -xdf" -a
```

Build the application

Prior to building, the user can specify a custom `SDK` path by setting
`NXP_K32W0_SDK_ROOT`:
- set up a custom path to the SDK, in which case
`k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\"` must be added to the `gn gen`
command:

```
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=$(pwd)/third_party/nxp/k32w0_sdk/repo/core
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/custom/path/to/SDK
```

If the environment variable `NXP_K32W0_SDK_ROOT` is not set, it will default
to the `SDK` found in `third_party/nxp/k32w0_sdk/repo/core`.
Start building the application:

```
user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w/k32w0
user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ gn gen out/debug --args="chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ ninja -C out/debug
```
```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w/k32w0
user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ gn gen out/debug --args="chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ ninja -C out/debug
```

- with Secure element Exactly the same steps as above but set
chip_with_se05x=1 in the gn command and add argument
chip_enable_ota_requestor=false
To build with Secure Element, follow the same steps as above but set
`chip_with_se05x=1 chip_enable_ota_requestor=false` in the `gn gen` command.

Note that option chip_enable_ota_requestor=false are required for building with
Secure Element. These can be changed if building without Secure Element
Note that option `chip_enable_ota_requestor=false` is required for building with
Secure Element due to flash constraints.

- K32W041AM flavor

Exactly the same steps as above but set argument build_for_k32w041am=1 in
Exactly the same steps as above but set argument `build_for_k32w041am=1` in
the gn command.

Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
#define CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER 0
#endif

#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
#ifndef CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS
// Set to 3: default number of custom Ids from CustomFactoryDataProvider example
#define CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS 3
#endif
#endif

// VID/PID for product => will be used by Basic Information Cluster
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA220
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ using namespace chip::app;

AppTask AppTask::sAppTask;
#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
static AppTask::FactoryDataProvider sFactoryDataProvider;
static chip::DeviceLayer::FactoryDataProviderImpl sFactoryDataProvider;
#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
static chip::DeviceLayer::CustomFactoryDataProvider sCustomFactoryDataProvider;
#endif
#endif

static Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::OnIdentifyStart, AppTask::OnIdentifyStop,
Expand Down Expand Up @@ -199,6 +202,9 @@ CHIP_ERROR AppTask::Init()
SetDeviceInstanceInfoProvider(&sFactoryDataProvider);
SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider);
SetCommissionableDataProvider(&sFactoryDataProvider);
#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
sCustomFactoryDataProvider.ParseFunctionExample();
#endif
#else
#ifdef ENABLE_HSM_DEVICE_ATTESTATION
SetDeviceAttestationCredentialsProvider(Examples::GetExampleSe05xDACProvider());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@

class AppTask
{
public:
#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
using FactoryDataProvider = chip::DeviceLayer::CustomFactoryDataProvider;
#else
using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl;
#endif
#endif

public:
CHIP_ERROR StartAppTask();
static void AppTaskMain(void * pvParameter);
Expand Down
5 changes: 1 addition & 4 deletions examples/lighting-app/nxp/k32w/k32w0/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ k32w0_executable("light_app") {
"${k32w0_platform_dir}/common/CustomFactoryDataProvider.h",
]

defines = [
"CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1",
"CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS=3",
]
defines = [ "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1" ]
}

deps = [
Expand Down
66 changes: 33 additions & 33 deletions examples/lighting-app/nxp/k32w/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,58 +192,58 @@ effects:
In order to build the Project CHIP example, we recommend using a Linux
distribution (the demo-application was compiled on Ubuntu 20.04).

- Start building the application either with Secure Element or without, SDK is
downloaded with west tool.
- without Secure Element
Activate the Matter environment:

```
```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update
```

In case there are local modification to the already installed git NXP SDK: Use
the below west `forall` command instead of the west init command to reset the
west workspace. Warning: all local changes will be lost after running this
command.
To bring the SDK in the environment, the user can:

```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$west forall -c "git reset --hard && git clean -xdf" -a
```
- download it with west tool, in which case it will be handled automatically
by gn:

Build the application
```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west init -l manifest --mf west.yml
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west update
```

Prior to building, the user can specify a custom `SDK` path by setting
`NXP_K32W0_SDK_ROOT`:
In case there are local modification to the already installed github NXP
SDK, use the below `west forall` command instead of the `west init` command
to reset the west workspace. Warning: all local changes will be lost after
running this command.

```
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=$(pwd)/third_party/nxp/k32w0_sdk/repo/core
```
```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd third_party/nxp/k32w0_sdk/repo
user@ubuntu:~/Desktop/git/connectedhomeip/third_party/nxp/k32w0_sdk/repo$ west forall -c "git reset --hard && git clean -xdf" -a
```

- set up a custom path to the SDK, in which case
`k32w0_sdk_root=\"${NXP_K32W0_SDK_ROOT}\"` must be added to the `gn gen`
command:

If the environment variable `NXP_K32W0_SDK_ROOT` is not set, it will default to
the `SDK` found in `third_party/nxp/k32w0_sdk/repo/core`.
```
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W0_SDK_ROOT=/custom/path/to/SDK
```

```
Start building the application:

```bash
user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lighting-app/nxp/k32w/k32w0
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug --args="chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"platform\" chip_with_se05x=0 chip_pw_tokenizer_logging=true"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ ninja -C out/debug
```

- with Secure element

```
Exactly the same steps as above but set chip_with_se05x=1 in the gn command
and add argument chip_enable_ota_requestor=false
```
To build with Secure Element, follow the same steps as above but set
`chip_with_se05x=1 chip_enable_ota_requestor=false` in the `gn gen` command.

Note that option chip_enable_ota_requestor=false are required for building with
Secure Element. These can be changed if building without Secure Element
Note that option `chip_enable_ota_requestor=false` is required for building with
Secure Element due to flash constraints.

- K32W041AM flavor

Exactly the same steps as above but set argument build_for_k32w041am=1 in
Exactly the same steps as above but set argument `build_for_k32w041am=1` in
the gn command.

Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
#define CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER 0
#endif

#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
#ifndef CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS
// Set to 3: default number of custom Ids from CustomFactoryDataProvider example
#define CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS 3
#endif
#endif

// VID/PID for product => will be used by Basic Information Cluster
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA220
Expand Down
8 changes: 7 additions & 1 deletion examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ using namespace chip::app;

AppTask AppTask::sAppTask;
#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
static AppTask::FactoryDataProvider sFactoryDataProvider;
static chip::DeviceLayer::FactoryDataProviderImpl sFactoryDataProvider;
#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
static chip::DeviceLayer::CustomFactoryDataProvider sCustomFactoryDataProvider;
#endif
#endif

// This key is for testing/certification only and should not be used in production devices.
Expand Down Expand Up @@ -190,6 +193,9 @@ CHIP_ERROR AppTask::Init()
SetDeviceInstanceInfoProvider(&sFactoryDataProvider);
SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider);
SetCommissionableDataProvider(&sFactoryDataProvider);
#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
sCustomFactoryDataProvider.ParseFunctionExample();
#endif
#else
#ifdef ENABLE_HSM_DEVICE_ATTESTATION
SetDeviceAttestationCredentialsProvider(Examples::GetExampleSe05xDACProvider());
Expand Down
9 changes: 0 additions & 9 deletions examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@

class AppTask
{
public:
#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
#if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER
using FactoryDataProvider = chip::DeviceLayer::CustomFactoryDataProvider;
#else
using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl;
#endif
#endif

public:
CHIP_ERROR StartAppTask();
static void AppTaskMain(void * pvParameter);
Expand Down
2 changes: 2 additions & 0 deletions examples/lighting-app/nxp/k32w/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ k32w1_executable("light_app") {
"main/main.cpp",
]

public = [ "${chip_root}/src/platform/nxp/k32w/k32w1/DefaultTestEventTriggerDelegate.h" ]

deps = [
":sdk",
"${chip_root}/examples/common/QRCode",
Expand Down
5 changes: 1 addition & 4 deletions examples/lock-app/nxp/k32w/k32w0/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ k32w0_executable("lock_app") {
"${k32w0_platform_dir}/common/CustomFactoryDataProvider.h",
]

defines = [
"CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1",
"CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS=3",
]
defines = [ "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1" ]
}

deps = [
Expand Down
Loading
Loading