From 41300eb991da1e8862014aec6bc1f52f46d49181 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 17 Feb 2022 00:39:14 -0500 Subject: [PATCH] Fix k32w paths (#15143) * Fix k32w paths * Separate out release and debug args in gn_build and only compile release for k32w to avoid LWIP error * Restyle * Enable OTA requestor by default for the lighting app Signed-off-by: Doru Gucea * Revert "Separate out release and debug args in gn_build and only compile release for k32w to avoid LWIP error" This reverts commit c145e92201b7289a17d1997f309911e17449e264. * Fix LWIP DEBUG redefinition Signed-off-by: Doru Gucea * Restyled by clang-format Co-authored-by: Doru Gucea Co-authored-by: Restyled.io --- BUILD.gn | 6 +++--- config/k32w/toolchain/BUILD.gn | 6 +++--- docs/QUICK_START.md | 8 ++++---- docs/guides/nxp_k32w_android_commissioning.md | 4 ++-- gn_build.sh | 6 +++--- src/lwip/k32w0/lwipopts.h | 3 +++ 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 9598963d7447d0..4b72ed7366bf6e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -436,19 +436,19 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_k32w_lighting_app_build) { group("k32w_lighting_app") { - deps = [ "${chip_root}/examples/lighting-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ] + deps = [ "${chip_root}/examples/lighting-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ] } } if (enable_k32w_lock_app_build) { group("k32w_lock_app") { - deps = [ "${chip_root}/examples/lock-app/k32w(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ] + deps = [ "${chip_root}/examples/lock-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ] } } if (enable_k32w_shell_app_build) { group("k32w_shell_app") { - deps = [ "${chip_root}/examples/shell/k32w(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ] + deps = [ "${chip_root}/examples/shell/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ] } } diff --git a/config/k32w/toolchain/BUILD.gn b/config/k32w/toolchain/BUILD.gn index 0ae9b115f7899d..6faaab239872cf 100644 --- a/config/k32w/toolchain/BUILD.gn +++ b/config/k32w/toolchain/BUILD.gn @@ -20,20 +20,20 @@ import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") arm_toolchain("k32w_lighting_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/lighting-app/k32w/args.gni") + import("${chip_root}/examples/lighting-app/nxp/k32w/k32w0/args.gni") } } arm_toolchain("k32w_lock_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/lock-app/k32w/args.gni") + import("${chip_root}/examples/lock-app/nxp/k32w/k32w0/args.gni") } } arm_toolchain("k32w_shell_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/shell/k32w/args.gni") + import("${chip_root}/examples/shell/nxp/k32w/k32w0/args.gni") } } diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md index 2191f08e5f8d15..5a4027e3dc7278 100644 --- a/docs/QUICK_START.md +++ b/docs/QUICK_START.md @@ -17,10 +17,10 @@ and platforms. Use one of the controllers listed above and then a Border Router and Node combination listed below. -|
Border Router
|
Node
| Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [**ot-br**](https://openthread.io/guides/border-router/build)
Thread Border Router
  • RasPi
  • BeagleBone | **lighting-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/k32w/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/efr32/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. | -| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lock-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/k32w/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md)
  • [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. | +|
    Border Router
    |
    Node
    | Description | +| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lighting-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/efr32/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. | +| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lock-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md)
  • [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. | ## Controllers diff --git a/docs/guides/nxp_k32w_android_commissioning.md b/docs/guides/nxp_k32w_android_commissioning.md index bdeb564ccd227c..93ec768876b2de 100644 --- a/docs/guides/nxp_k32w_android_commissioning.md +++ b/docs/guides/nxp_k32w_android_commissioning.md @@ -311,11 +311,11 @@ To make your PC work as a Thread Border Router, complete the following tasks: ## Building and programming NXP K32W Lock/Light Example Application See -[NXP K32W Lock Example Application README](../../examples/lock-app/k32w/README.md) +[NXP K32W Lock Example Application README](../../examples/lock-app/nxp/k32w/k32w0/README.md) to learn how to build and program the lock example onto an K32W061 DK6. See -[NXP K32W Light Example Application README](../../examples/lighting-app/k32w/README.md) +[NXP K32W Light Example Application README](../../examples/lighting-app/nxp/k32w/k32w0/README.md) to learn how to build and program the light example onto an K32W061 DK6.
    diff --git a/gn_build.sh b/gn_build.sh index 7fe16d8038ce25..a2ea89a9384bcb 100755 --- a/gn_build.sh +++ b/gn_build.sh @@ -156,8 +156,8 @@ fi k32w_sdk_args="" 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" + k32w_sdk_args+="k32w0_sdk_root=\"$NXP_K32W061_SDK_ROOT\"" + extra_args+=" $k32w0_sdk_args enable_k32w_builds=true" fi echo @@ -165,7 +165,7 @@ 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)" + echo "(cd $CHIP_ROOT/examples/lock-app/nxp/k32w/k32w0; gn gen out/debug --args='$k32w_sdk_args'; ninja -C out/debug)" fi echo diff --git a/src/lwip/k32w0/lwipopts.h b/src/lwip/k32w0/lwipopts.h index fef3def735f2c0..daeb6afb17c035 100644 --- a/src/lwip/k32w0/lwipopts.h +++ b/src/lwip/k32w0/lwipopts.h @@ -131,7 +131,10 @@ // TODO: make LWIP_DEBUG conditional on build type +#ifndef LWIP_DEBUG #define LWIP_DEBUG 0 +#endif + #define MEMP_OVERFLOW_CHECK (0) #define MEMP_SANITY_CHECK (0) #define MEM_DEBUG (LWIP_DBG_OFF)