Skip to content

Commit

Permalink
[K32W0] Fix third_party paths (project-chip#11480)
Browse files Browse the repository at this point in the history
Change from third_party/k32w_sdk/nxp/k32w/k32w0/ to third_party/nxp/k32w0_sdk

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
  • Loading branch information
doru91 authored Nov 26, 2021
1 parent 22255ab commit aa7d199
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-k32w:0.5.28
image: connectedhomeip/chip-build-k32w:0.5.29
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
2 changes: 1 addition & 1 deletion build_overrides/k32w0_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

declare_args() {
# Root directory for K32W SDK build files.
k32w0_sdk_build_root = "//third_party/k32w_sdk/nxp/k32w/k32w0"
k32w0_sdk_build_root = "//third_party/nxp/k32w0_sdk"
}
2 changes: 1 addition & 1 deletion examples/build_overrides/k32w0_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
declare_args() {
# Root directory for k32w SDK.
k32w0_sdk_build_root =
"//third_party/connectedhomeip/third_party/k32w_sdk/nxp/k32w/k32w0"
"//third_party/connectedhomeip/third_party/nxp/k32w0_sdk"
}
16 changes: 8 additions & 8 deletions examples/lighting-app/nxp/k32w/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ network.

<hr>

- [CHIP K32W0 Lighting Example Application](#chip-k32w-lighting-example-application) -
- [CHIP K32W061 Lighting Example Application](#chip-k32w-lighting-example-application) -
- [Introduction](#introduction)
- [Bluetooth LE Advertising](#bluetooth-le-advertising)
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
Expand All @@ -33,7 +33,7 @@ network.

![K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg)

The K32W0 lighting example application provides a working demonstration of a
The K32W061 lighting example application provides a working demonstration of a
light bulb device, built using the Project CHIP codebase and the NXP K32W061
SDK. The example supports remote access (e.g.: using CHIP Tool from a mobile
phone) and control of a light bulb over a low-power, 802.15.4 Thread network. It
Expand All @@ -58,7 +58,7 @@ devices.
### SE051H Secure Element

Deployment of this firmware configuration requires the K32W061 board setups
using the K32W0/JN5189 module board, SE051 Expansion board and Generic Expansion
using the K32W061 module board, SE051 Expansion board and Generic Expansion
board as shown below:

![SE051H + K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-se.jpg)
Expand Down Expand Up @@ -173,13 +173,13 @@ distribution (the demo-application was compiled on Ubuntu 20.04).
- with Secure Element

```
user@ubuntu:~/Desktop/git/connectedhomeip$ export K32W061_SDK_ROOT=/home/user/Desktop/SDK_2_6_4_K32W061DK6/
user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/k32w_sdk/sdk_fixes/patch_k32w_sdk.sh
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W061_SDK_ROOT=/home/user/Desktop/SDK_2_6_4_K32W061DK6/
user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
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="k32w0_sdk_root=\"${K32W061_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lightin-app/nxp/k32w/k32w0$ ninja -C out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ $K32W061_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W061_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ ninja -C out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ $NXP_K32W061_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/
```

- without Secure element
Expand Down
12 changes: 6 additions & 6 deletions examples/lock-app/nxp/k32w/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ network.

![K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg)

The K32W0 lock example application provides a working demonstration of a
The K32W061 lock example application provides a working demonstration of a
connected door lock device, built using the Project CHIP codebase and the NXP
K32W061 SDK. The example supports remote access (e.g.: using CHIP Tool from a
mobile phone) and control of a simulated door lock over a low-power, 802.15.4
Expand All @@ -59,7 +59,7 @@ devices.
### SE051H Secure Element

Deployment of this firmware configuration requires the K32W061 board setups
using the K32W0/JN5189 module board, SE051 Expansion board and Generic Expansion
using the K32W061 module board, SE051 Expansion board and Generic Expansion
board as shown below:

![SE051H + K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-se.jpg)
Expand Down Expand Up @@ -177,13 +177,13 @@ distribution (the demo-application was compiled on Ubuntu 20.04).
- with Secure Element

```
user@ubuntu:~/Desktop/git/connectedhomeip$ export K32W061_SDK_ROOT=/home/user/Desktop/SDK_2_6_4_K32W061DK6/
user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/k32w_sdk/sdk_fixes/patch_k32w_sdk.sh
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_K32W061_SDK_ROOT=/home/user/Desktop/SDK_2_6_4_K32W061DK6/
user@ubuntu:~/Desktop/git/connectedhomeip$ ./third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/k32w/k32w0/
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${K32W061_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ gn gen out/debug --args="k32w0_sdk_root=\"${NXP_K32W061_SDK_ROOT}\" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1"
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ ninja -C out/debug
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ $K32W061_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/
user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w/k32w0$ $NXP_K32W061_SDK_ROOT/tools/imagetool/sign_images.sh out/debug/
```

- without Secure element
Expand Down
8 changes: 4 additions & 4 deletions gn_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ fi
# K32W SDK setup
k32w_sdk_args=""

if [[ -d "$K32W061_SDK_ROOT" ]]; then
k32w_sdk_args+="k32w_sdk_root=\"$K32W061_SDK_ROOT\""
if [[ -d "$NXP_K32W061_SDK_ROOT" ]]; then
k32w_sdk_args+="k32w_sdk_root=\"$NXP_K32W061_SDK_ROOT\""
extra_args+=" $k32w_sdk_args enable_k32w_builds=true"
fi

echo
if [[ ! -d "$K32W061_SDK_ROOT" ]]; then
echo "Hint: Set \$K32W061_SDK_ROOT to enable building for K32W061"
if [[ ! -d "$NXP_K32W061_SDK_ROOT" ]]; then
echo "Hint: Set \$NXP_K32W061_SDK_ROOT to enable building for K32W061"
else
echo 'To build the K32W lock sample as a standalone project':
echo "(cd $CHIP_ROOT/examples/lock-app/k32w; gn gen out/debug --args='$k32w_sdk_args'; ninja -C out/debug)"
Expand Down
6 changes: 3 additions & 3 deletions scripts/examples/k32w_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ source "$(dirname "$0")/../../scripts/activate.sh"
set -x
env

"$(dirname "$0")"/../../third_party/k32w_sdk/sdk_fixes/patch_k32w_sdk.sh
"$(dirname "$0")"/../../third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh

if [ -z "$3" ]; then
gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$K32W061_SDK_ROOT\" is_debug=false chip_with_low_power=1"
gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$NXP_K32W061_SDK_ROOT\" is_debug=false chip_with_low_power=1"
else
gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$K32W061_SDK_ROOT\" is_debug=false chip_with_low_power=0"
gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$NXP_K32W061_SDK_ROOT\" is_debug=false chip_with_low_power=0"
fi

ninja -C "$2"
4 changes: 2 additions & 2 deletions scripts/examples/k32w_se_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ source "$(dirname "$0")/../../scripts/activate.sh"
set -x
env

"$(dirname "$0")"/../../third_party/k32w_sdk/sdk_fixes/patch_k32w_sdk.sh
"$(dirname "$0")"/../../third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh

gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$K32W061_SDK_ROOT\" is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1"
gn gen --check --fail-on-unused-args --root="$1" "$2" --args="k32w0_sdk_root=\"$NXP_K32W061_SDK_ROOT\" is_debug=false chip_crypto=\"mbedtls\" chip_with_se05x=1"
ninja -C "$2"
2 changes: 1 addition & 1 deletion src/platform/nxp/k32w/k32w0/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ chip_build_tests = false

chip_mdns = "platform"

mbedtls_target = "${chip_root}/third_party/k32w_sdk/nxp/k32w/k32w0:mbedtls"
mbedtls_target = "${chip_root}/third_party/nxp/k32w0_sdk:mbedtls"
openthread_external_mbedtls = mbedtls_target

openthread_project_core_config_file = "OpenThreadConfig.h"
Expand Down
19 changes: 0 additions & 19 deletions third_party/k32w_sdk/sdk_fixes/patch_k32w_sdk.sh

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni")

declare_args() {
# Location of the k32w0 SDK.
k32w0_sdk_root = getenv("K32W_SDK_ROOT")
k32w0_sdk_root = getenv("NXP_K32W061_SDK_ROOT")
chip_with_OM15082 = 0
chip_with_ot_cli = 0
chip_with_low_power = 0
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

if [[ ! -d $NXP_K32W061_SDK_ROOT ]]; then
echo "NXP_K32W061_SDK_ROOT is not set"
exit 1
fi

cp ./third_party/nxp/k32w0_sdk/sdk_fixes/gpio_pins.h "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/openthread/reed/bm/
cp ./third_party/nxp/k32w0_sdk/sdk_fixes/pin_mux.c "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/openthread/enablement/

#TODO internal: https://jira.sw.nxp.com/browse/MCB-2678
cp ./third_party/nxp/k32w0_sdk/sdk_fixes/SecLib.h "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/SecLib/

# TODO internal: https://jira.sw.nxp.com/browse/MCB-2675
cp -r ./third_party/nxp/k32w0_sdk/sdk_fixes/app_dual_mode_low_power.h "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common/
cp -r ./third_party/nxp/k32w0_sdk/sdk_fixes/app_dual_mode_switch.h "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/hybrid/ble_ot/lped_ble_wuart/ble_802_15_4_common/

echo "K32W SDK MR3 QP1 was patched!"
exit 0
File renamed without changes.
2 changes: 1 addition & 1 deletion third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import("//build_overrides/chip.gni")
import("//build_overrides/k32w0_sdk.gni")
import("//build_overrides/openthread.gni")
import("${chip_root}/third_party/k32w_sdk/nxp/k32w/k32w0/k32w0_sdk.gni")
import("${chip_root}/third_party/nxp/k32w0_sdk/k32w0_sdk.gni")

openthread_nxp_root = "${chip_root}/third_party/openthread/ot-nxp"

Expand Down

0 comments on commit aa7d199

Please sign in to comment.