From fe5ddda8cdc897bc73ed0e94faaa2cb2d926cf9d Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:12:14 +0200 Subject: [PATCH] [NXP] Update gn args naming (#36294) * [nxp][common] Update gn args after name change Signed-off-by: marius-alex-tache * [nxp] Bump nxp_matter_support Signed-off-by: marius-alex-tache * Restyled by gn * Restyled by prettier-markdown * [nxp] Fix rt1060 arg Signed-off-by: marius-alex-tache * [nxp] Fix rt1170 arg Signed-off-by: marius-alex-tache --------- Signed-off-by: marius-alex-tache Co-authored-by: Restyled.io --- config/nxp/chip-cmake-freertos/CMakeLists.txt | 8 ++--- docs/platforms/nxp/nxp_manufacturing_flow.md | 16 ++++----- docs/platforms/nxp/nxp_mcxw71_ota_guide.md | 2 +- .../all-clusters-app/nxp/rt/rt1060/BUILD.gn | 2 +- .../all-clusters-app/nxp/rt/rt1060/README.md | 10 +++--- .../all-clusters-app/nxp/rt/rt1170/BUILD.gn | 2 +- .../all-clusters-app/nxp/rt/rt1170/README.md | 8 ++--- .../all-clusters-app/nxp/rt/rw61x/BUILD.gn | 12 +++---- .../all-clusters-app/nxp/rt/rw61x/README.md | 16 ++++----- examples/contact-sensor-app/nxp/README.md | 6 ++-- .../contact-sensor-app/nxp/k32w0/BUILD.gn | 2 +- .../contact-sensor-app/nxp/k32w0/README.md | 18 +++++----- .../contact-sensor-app/nxp/k32w0/args.gni | 2 +- .../nxp/k32w0/include/FreeRTOSConfig.h | 2 +- .../nxp/k32w0/main/AppTask.cpp | 26 +++++++------- .../nxp/k32w0/main/include/AppEvent.h | 4 +-- .../nxp/k32w0/main/main.cpp | 10 +++--- .../contact-sensor-app/nxp/k32w1/BUILD.gn | 12 +++---- .../contact-sensor-app/nxp/k32w1/args.gni | 2 +- .../contact-sensor-app/nxp/mcxw71/BUILD.gn | 12 +++---- .../contact-sensor-app/nxp/mcxw71/args.gni | 2 +- .../laundry-washer-app/nxp/rt/rt1060/BUILD.gn | 2 +- .../laundry-washer-app/nxp/rt/rt1170/BUILD.gn | 2 +- .../laundry-washer-app/nxp/rt/rw61x/BUILD.gn | 12 +++---- examples/lighting-app/nxp/README.md | 2 +- examples/lighting-app/nxp/k32w0/BUILD.gn | 2 +- examples/lighting-app/nxp/k32w0/README.md | 14 ++++---- examples/lighting-app/nxp/k32w0/args.gni | 2 +- examples/lighting-app/nxp/k32w1/BUILD.gn | 12 +++---- examples/lighting-app/nxp/k32w1/README.md | 14 ++++---- examples/lighting-app/nxp/k32w1/args.gni | 8 ++--- .../lighting-app/nxp/k32w1/with_pw_rpc.gni | 2 +- examples/lighting-app/nxp/mcxw71/BUILD.gn | 12 +++---- examples/lighting-app/nxp/mcxw71/README.md | 14 ++++---- examples/lighting-app/nxp/mcxw71/args.gni | 8 ++--- .../lighting-app/nxp/mcxw71/with_pw_rpc.gni | 2 +- examples/lock-app/nxp/README.md | 2 +- examples/lock-app/nxp/k32w1/BUILD.gn | 14 ++++---- examples/lock-app/nxp/k32w1/args.gni | 6 ++-- examples/lock-app/nxp/mcxw71/BUILD.gn | 14 ++++---- examples/lock-app/nxp/mcxw71/args.gni | 6 ++-- .../k32w0/doc/CustomFactoryDataProvider.md | 4 +-- .../project_include/freeRTOS/FreeRTOSConfig.h | 2 +- .../nxp/mcxw71_k32w1/app/support/BUILD.gn | 6 ++-- .../mcxw71_k32w1/app/support/FreeRtosHooks.c | 5 +-- examples/thermostat/nxp/rt/rt1060/BUILD.gn | 2 +- examples/thermostat/nxp/rt/rt1170/BUILD.gn | 2 +- examples/thermostat/nxp/rt/rw61x/BUILD.gn | 12 +++---- scripts/build/builders/nxp.py | 10 +++--- .../nxp/common/ble/BLEManagerCommon.cpp | 28 +++++++-------- src/platform/nxp/k32w0/BLEManagerImpl.cpp | 4 +-- src/platform/nxp/k32w0/BUILD.gn | 9 +++-- src/platform/nxp/k32w0/LowPowerHooks.cpp | 2 +- .../nxp/k32w0/PlatformManagerImpl.cpp | 4 +-- .../nxp/k32w0/ThreadStackManagerImpl.cpp | 4 +-- src/platform/nxp/mcxw71_k32w1/BUILD.gn | 20 +++++------ .../nxp/mcxw71_k32w1/LowPowerHooks.cpp | 2 +- src/platform/nxp/mcxw71_k32w1/args.gni | 12 +------ src/platform/nxp/rt/rt1060/BUILD.gn | 4 +-- src/platform/nxp/rt/rt1170/BUILD.gn | 4 +-- src/platform/nxp/rt/rw61x/BUILD.gn | 20 +++++------ third_party/nxp/nxp_matter_support | 2 +- .../openthread/platforms/nxp/k32w0/BUILD.gn | 2 +- .../platforms/nxp/mcxw71_k32w1/BUILD.gn | 36 +++++++++++-------- .../platforms/nxp/rt/rt1060/BUILD.gn | 4 +-- .../platforms/nxp/rt/rt1170/BUILD.gn | 4 +-- .../platforms/nxp/rt/rw61x/BUILD.gn | 4 +-- 67 files changed, 263 insertions(+), 269 deletions(-) diff --git a/config/nxp/chip-cmake-freertos/CMakeLists.txt b/config/nxp/chip-cmake-freertos/CMakeLists.txt index 27bedc50ae53a9..517d3539329b2b 100644 --- a/config/nxp/chip-cmake-freertos/CMakeLists.txt +++ b/config/nxp/chip-cmake-freertos/CMakeLists.txt @@ -44,10 +44,10 @@ endif() # ============================================================================== matter_add_gn_arg_string("nxp_nvm_component" ${CONFIG_CHIP_NVM_COMPONENT}) matter_add_gn_arg_string("nxp_platform" ${CONFIG_CHIP_NXP_PLATFORM}) -matter_add_gn_arg("chip_with_factory_data" ${CONFIG_CHIP_FACTORY_DATA}) -matter_add_gn_arg("chip_enable_secure_dac_private_key_storage" ${CONFIG_CHIP_SECURE_DAC_PRIVATE_KEY_STORAGE}) -matter_add_gn_arg("chip_enable_secure_whole_factory_data" ${CONFIG_CHIP_ENABLE_SECURE_WHOLE_FACTORY_DATA}) -matter_add_gn_arg_bool("chip_enable_matter_cli" CONFIG_CHIP_LIB_SHELL) +matter_add_gn_arg_bool("nxp_use_factory_data" ${CONFIG_CHIP_FACTORY_DATA}) +matter_add_gn_arg_bool("nxp_enable_secure_dac_private_key_storage" ${CONFIG_CHIP_SECURE_DAC_PRIVATE_KEY_STORAGE}) +matter_add_gn_arg_bool("nxp_enable_secure_whole_factory_data" ${CONFIG_CHIP_ENABLE_SECURE_WHOLE_FACTORY_DATA}) +matter_add_gn_arg_bool("nxp_enable_matter_cli" CONFIG_CHIP_LIB_SHELL) matter_add_gn_arg_bool("chip_enable_pairing_autostart" CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART) if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE) diff --git a/docs/platforms/nxp/nxp_manufacturing_flow.md b/docs/platforms/nxp/nxp_manufacturing_flow.md index 08e09c866388ff..28618b276a5e01 100644 --- a/docs/platforms/nxp/nxp_manufacturing_flow.md +++ b/docs/platforms/nxp/nxp_manufacturing_flow.md @@ -148,7 +148,7 @@ Here is the interpretation of the **optional** parameters: ## 4. Build app and usage -Use `chip_with_factory_data=1` when compiling to enable factory data usage. +Use `nxp_use_factory_data=true` when compiling to enable factory data usage. Run chip-tool with a new PAA: @@ -177,7 +177,7 @@ Implementation of manufacturing data provisioning has been validated using test certificates generated by `OpenSSL 1.1.1l`. Also, demo **DAC**, **PAI** and **PAA** certificates needed in case -`chip_with_factory_data=1` is used can be found in +`nxp_use_factory_data=true` is used can be found in `./scripts/tools/nxp/demo_generated_certs`. ## 6. Increased security for DAC private key @@ -207,7 +207,7 @@ python3 ./scripts/tools/nxp/factory_data_generator/generate.py -i 10000 -s UXKLz There is no need for an extra binary. - Write factory data binary. -- Build the application with `chip_with_factory_data=1` set. +- Build the application with `nxp_use_factory_data=true` set. - Write the application to the board and use it as usual. Factory data should now contain a corresponding encrypted blob instead of the @@ -236,19 +236,19 @@ Supported platforms: there are three implementations for factory data protection -- whole factory data protection with AES encryption ( chip_with_factory_data=1 - chip_enable_secure_whole_factory_data=true ) +- whole factory data protection with AES encryption ( + nxp_use_factory_data=true nxp_enable_secure_whole_factory_data=true ) `examples/platform/nxp/rt/rw61x/factory_data/source/AppFactoryDataExample.cpp`\ `src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.cpp` -- only dac private key protection ( chip_with_factory_data=1 - chip_enable_secure_dac_private_key_storage=true ) +- only dac private key protection ( nxp_use_factory_data=true + nxp_enable_secure_dac_private_key_storage=true ) `examples/platform/nxp/rt/rw61x/factory_data/source/AppFactoryDataExample.cpp` \ `src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp` - whole factory data protection with hard-coded AES key ( - chip_with_factory_data=1 ) + nxp_use_factory_data=true ) `examples/platform/nxp/common/factory_data/source/AppFactoryDataDefaultImpl.cpp` \ `src/platform/nxp/common/factory_data/FactoryDataProviderFwkImpl.cpp` diff --git a/docs/platforms/nxp/nxp_mcxw71_ota_guide.md b/docs/platforms/nxp/nxp_mcxw71_ota_guide.md index b21bf933d7e98e..c8d97b7ade4690 100644 --- a/docs/platforms/nxp/nxp_mcxw71_ota_guide.md +++ b/docs/platforms/nxp/nxp_mcxw71_ota_guide.md @@ -61,7 +61,7 @@ version. A user can update the factory data through OTA, at the same time the application firmware is updated by enabling the following processor in the `gn args`: -- `chip_enable_ota_factory_data_processor=1` to enable default factory data +- `nxp_enable_ota_factory_data_processor=true` to enable default factory data update processor (disabled by default). The OTA image used must be updated to include the new factory data. diff --git a/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn b/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn index 16e0b03e017c94..beca71ac1002d8 100644 --- a/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn @@ -167,7 +167,7 @@ rt_executable("all_cluster_app") { "${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/all-clusters-app/nxp/rt/rt1060/README.md b/examples/all-clusters-app/nxp/rt/rt1060/README.md index 558ae4127fe72e..96822ff6eb2453 100644 --- a/examples/all-clusters-app/nxp/rt/rt1060/README.md +++ b/examples/all-clusters-app/nxp/rt/rt1060/README.md @@ -393,14 +393,14 @@ thermostat application for now. - Build Matter with Border Router configuration with ble-wifi commissioning: ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true chip_enable_matter_cli=true chip_config_network_layer_ble=true chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\" hci_spinel_single_uart=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true nxp_enable_matter_cli=true chip_config_network_layer_ble=true chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\" hci_spinel_single_uart=true" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug ``` - Build Matter with Border Router configuration with onnetwork commissioning: ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true chip_enable_matter_cli=true chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"your_wifi_ssid\" wifi_auto_connect_at_boot_password=\"your_wifi_password\" chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\"" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true nxp_enable_matter_cli=true chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"your_wifi_ssid\" wifi_auto_connect_at_boot_password=\"your_wifi_password\" chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\"" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug ``` @@ -419,15 +419,15 @@ Optional GN options that can be added when building an application: Wifi + OpenThread Border Router configuration. Note that is only supported on the on the thermostat application for now. - To enable the [matter CLI](README.md#matter-shell), the argument - `chip_enable_matter_cli=true` must be added to the _gn gen_ command. + `nxp_enable_matter_cli=true` must be added to the _gn gen_ command. - To build the application in debug mode, the argument `is_debug=true optimize_debug=false` must be added to the _gn gen_ command. - By default, the MIMXRT1060-EVK-B will be chosen. To switch to an MIMXRT1060-EVK, the argument `evkname=\"evkmimxrt1060\"` must be added to the _gn gen_ command. - To build with the option to have Matter certificates/keys pre-loaded in a - specific flash area the argument `chip_with_factory_data=1` must be added to - the _gn gen_ command. For more information, see + specific flash area the argument `nxp_use_factory_data=true` must be added + to the _gn gen_ command. For more information, see [Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) diff --git a/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn b/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn index 724a6e89ec6558..70a0a4d640738c 100644 --- a/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn @@ -153,7 +153,7 @@ rt_executable("all_cluster_app") { "${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/all-clusters-app/nxp/rt/rt1170/README.md b/examples/all-clusters-app/nxp/rt/rt1170/README.md index 7ff91872a4b1b4..8b992982045e71 100644 --- a/examples/all-clusters-app/nxp/rt/rt1170/README.md +++ b/examples/all-clusters-app/nxp/rt/rt1170/README.md @@ -218,7 +218,7 @@ thermostat application for now. (ble-wifi) : ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt11170$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true chip_config_network_layer_ble=true chip_enable_ble=true chip_enable_openthread=true chip_enable_matter_cli=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt11170$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true chip_config_network_layer_ble=true chip_enable_ble=true chip_enable_openthread=true nxp_enable_matter_cli=true" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1170$ ninja -C out/debug ``` @@ -238,13 +238,13 @@ Optional GN options that can be added when building an application: on the on the thermostat application for now. - To enable the [matter CLI](#testing-the-all-clusters-application-with-matter-cli-enabled), - the argument `chip_enable_matter_cli=true` must be added to the _gn gen_ + the argument `nxp_enable_matter_cli=true` must be added to the _gn gen_ command. - To build the application in debug mode, the argument `is_debug=true optimize_debug=false` must be added to the _gn gen_ command. - To build with the option to have Matter certificates/keys pre-loaded in a - specific flash area the argument `chip_with_factory_data=1` must be added to - the _gn gen_ command. For more information, see + specific flash area the argument `nxp_use_factory_data=true` must be added + to the _gn gen_ command. For more information, see [Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) - To build the application with the OTA Requestor enabled, the arguments `chip_enable_ota_requestor=true no_mcuboot=false` must be added to the _gn diff --git a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn index 19fa822ec24688..73f21538380b0e 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn @@ -56,8 +56,8 @@ rt_sdk("sdk") { defines = [] # To be moved, temporary mbedtls config fix to build app with factory data - if (chip_enable_secure_dac_private_key_storage || - chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_dac_private_key_storage || + nxp_enable_secure_whole_factory_data) { defines += [ "MBEDTLS_NIST_KW_C", "MBEDTLS_PSA_CRYPTO_CLIENT", @@ -141,10 +141,10 @@ rt_executable("all_cluster_app") { "../../common/main/main.cpp", ] - if (chip_enable_secure_dac_private_key_storage || - chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_dac_private_key_storage || + nxp_enable_secure_whole_factory_data) { sources += [ "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp" ] - if (chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_whole_factory_data) { defines += [ "ENABLE_SECURE_WHOLE_FACTORY_DATA" ] } } else { @@ -184,7 +184,7 @@ rt_executable("all_cluster_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/all-clusters-app/nxp/rt/rw61x/README.md b/examples/all-clusters-app/nxp/rt/rw61x/README.md index 9b19031c00b44d..455073d390fc02 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/README.md +++ b/examples/all-clusters-app/nxp/rt/rw61x/README.md @@ -137,7 +137,7 @@ thermostat application for now. (ble-wifi) : ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ gn gen --args="chip_enable_wifi=true chip_enable_openthread=true chip_enable_matter_cli=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ gn gen --args="chip_enable_wifi=true chip_enable_openthread=true nxp_enable_matter_cli=true" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ ninja -C out/debug ``` @@ -157,7 +157,7 @@ Optional GN options that can be added when building an application: on the on the thermostat application for now. - To enable the [matter CLI](README.md#testing-the-all-clusters-application-with-matter-cli-enabled), - the argument `chip_enable_matter_cli=true` must be added to the _gn gen_ + the argument `nxp_enable_matter_cli=true` must be added to the _gn gen_ command. - By default, the `NXP RD-RW612-BGA` board revision will be chosen. To switch to `NXP FRDM-RW612` board revision, the argument `board_version=\"frdm\"` @@ -165,8 +165,8 @@ Optional GN options that can be added when building an application: - To build the application in debug mode, the argument `is_debug=true optimize_debug=false` must be added to the _gn gen_ command. - To build with the option to have Matter certificates/keys pre-loaded in a - specific flash area the argument `chip_with_factory_data=1` must be added to - the _gn gen_ command. (for more information see + specific flash area the argument `nxp_use_factory_data=true` must be added + to the _gn gen_ command. (for more information see [Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md). - To build the application with the OTA Requestor enabled, the arguments `chip_enable_ota_requestor=true no_mcuboot=false` must be added to the _gn @@ -187,13 +187,13 @@ software key before flashing them to the device flash. Using DAC private key secure usage: Experimental feature, contain some limitation: potential concurrent access issue during sign with dac key operation due to the lack of protection between multiple access to `ELS` crypto module. -The argument `chip_enable_secure_dac_private_key_storage=1` must be added to the -_gn gen_ command to enable secure private DAC key usage with S50. -`chip_with_factory_data=1` must have been added to the _gn gen_ command +The argument `nxp_enable_secure_dac_private_key_storage=true` must be added to +the _gn gen_ command to enable secure private DAC key usage with S50. +`nxp_use_factory_data=true` must have been added to the _gn gen_ command DAC private key generation: The argument `chip_convert_dac_private_key=1` must be added to the _gn gen_ command to enable DAC private plain key conversion to -blob with S50. `chip_enable_secure_dac_private_key_storage=1` must have been +blob with S50. `nxp_enable_secure_dac_private_key_storage=1` must have been added to the _gn gen_ command `ELS` contain concurrent access risks. They must be fixed before enabling it by diff --git a/examples/contact-sensor-app/nxp/README.md b/examples/contact-sensor-app/nxp/README.md index 803f067ce3de72..908da90cfcb664 100644 --- a/examples/contact-sensor-app/nxp/README.md +++ b/examples/contact-sensor-app/nxp/README.md @@ -133,7 +133,7 @@ corresponding to data model target. ### Manufacturing data -Use `chip_with_factory_data=1` in the gn build command to enable factory data. +Use `nxp_use_factory_data=true` in the gn build command to enable factory data. For a full guide on manufacturing flow, please see [Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md). @@ -181,9 +181,9 @@ will be very low. In order to build with low power support, the following gn args must be used: ``` -chip_with_low_power = 1 +nxp_use_low_power = true chip_openthread_ftd = false -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_logging = false ``` diff --git a/examples/contact-sensor-app/nxp/k32w0/BUILD.gn b/examples/contact-sensor-app/nxp/k32w0/BUILD.gn index f032603d00457b..a691fc87137b66 100644 --- a/examples/contact-sensor-app/nxp/k32w0/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w0/BUILD.gn @@ -100,7 +100,7 @@ k32w0_executable("contact_sensor_app") { "main/main.cpp", ] - if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) { + if (nxp_use_factory_data && use_custom_factory_provider == 1) { sources += [ "${k32w0_platform_dir}/common/CustomFactoryDataProvider.cpp", "${k32w0_platform_dir}/common/CustomFactoryDataProvider.h", diff --git a/examples/contact-sensor-app/nxp/k32w0/README.md b/examples/contact-sensor-app/nxp/k32w0/README.md index bc39009afc3cb9..c390bc3ab5215b 100644 --- a/examples/contact-sensor-app/nxp/k32w0/README.md +++ b/examples/contact-sensor-app/nxp/k32w0/README.md @@ -243,8 +243,8 @@ Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the build argument (chip_with_OM15082) inside the gn build instruction should be set to zero. The argument chip_with_OM15082 is set to zero by default. -In case that Openthread CLI is needed, chip_with_ot_cli build argument must be -set to 1. +In case that Openthread CLI is needed, `nxp_enable_ot_cli` build argument must +be set to `true`. In case the board doesn't have 32KHz crystal fitted, one can use the 32KHz free running oscillator as a clock source. In this case one must set the use_fro_32k @@ -371,10 +371,10 @@ CHIPProjectConfig.h. Regarding factory data provider, there are two options: - use the default factory data provider: `FactoryDataProviderImpl` by setting - `chip_with_factory_data=1` in the gn build command. + `nxp_use_factory_data=true` in the gn build command. - use a custom factory data provider: please see [Guide for implementing a custom factory data provider](../../../platform/nxp/k32w0/doc/CustomFactoryDataProvider.md). - This can be enabled when `chip_with_factory_data=1` by setting + This can be enabled when `nxp_use_factory_data=true` by setting `use_custom_factory_provider=1` in the gn build command. ## Flashing and debugging @@ -697,9 +697,9 @@ factory data TLV value. A user can select which default processors to enable: -- `chip_enable_ota_firmware_processor=1` to enable default firmware (app/SSBL) - update processor (enabled by default). -- `chip_enable_ota_factory_data_processor=1` to enable default factory data +- `nxp_enable_ota_firmware_processor=true` to enable default firmware + (app/SSBL) update processor (enabled by default). +- `nxp_enable_ota_factory_data_processor=true` to enable default factory data update processor (disabled by default). The address for storing the custom OTA entry can also be specified: @@ -799,9 +799,9 @@ The example also offers the possibility to run in low power mode. This means that the board will go in a deep power down mode most of the time and the power consumption will be very low. -In order to build with low power support, the _chip_with_low_power=1_ must be +In order to build with low power support, the _nxp_use_low_power=true_ must be provided to the build system. In this case, please note that the GN build -arguments _chip_with_OM15082_ and _chip_with_ot_cli_ must be set to 0 and +arguments _chip_with_OM15082_ and _nxp_enable_ot_cli_ must be set to false and _chip_logging_ must be set to false to disable logging. In order to maintain a low power consumption, the LEDs showing the state of the diff --git a/examples/contact-sensor-app/nxp/k32w0/args.gni b/examples/contact-sensor-app/nxp/k32w0/args.gni index f4b68ae740c40c..1f2e2ef966e4c9 100644 --- a/examples/contact-sensor-app/nxp/k32w0/args.gni +++ b/examples/contact-sensor-app/nxp/k32w0/args.gni @@ -35,6 +35,6 @@ is_debug = false chip_crypto = "platform" chip_crypto_flavor = "NXP-Ultrafast-P256" -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_with_OM15082 = 1 chip_pw_tokenizer_logging = true diff --git a/examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h b/examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h index 5694c591e51362..78fed95d41c6f9 100644 --- a/examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h +++ b/examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h @@ -41,7 +41,7 @@ #define configUSE_PREEMPTION 1 -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) #define configUSE_TICKLESS_IDLE 1 #else #define configUSE_TICKLESS_IDLE 0 diff --git a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp index 36cf190adf0b54..40ffd9d8bff252 100644 --- a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp @@ -65,7 +65,7 @@ TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. static QueueHandle_t sAppEventQueue; -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) static LEDWidget sStatusLED; static LEDWidget sContactSensorLED; #endif @@ -225,7 +225,7 @@ CHIP_ERROR AppTask::Init() AppTask::PrintOnboardingInfo(); /* HW init leds */ -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) LED_Init(); /* start with all LEDS turnedd off */ @@ -365,7 +365,7 @@ void AppTask::AppTaskMain(void * pvParameter) { TickType_t xTicksToWait = pdMS_TO_TICKS(10); -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) xTicksToWait = portMAX_DELAY; #endif @@ -403,7 +403,7 @@ void AppTask::AppTaskMain(void * pvParameter) // // Otherwise, blink the LED ON for a very short time. -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) if (sAppTask.mFunction != Function::kFactoryReset && sAppTask.mFunction != Function::kIdentify) { if (sIsThreadProvisioned) @@ -580,7 +580,7 @@ void AppTask::ResetActionEventHandler(void * aGenericEvent) sAppTask.CancelTimer(); sAppTask.mFunction = Function::kNoneSelected; -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) /* restore initial state for the LED indicating contact state */ if (!ContactSensorMgr().IsContactClosed()) { @@ -608,7 +608,7 @@ void AppTask::ResetActionEventHandler(void * aGenericEvent) sAppTask.mFunction = Function::kFactoryReset; /* LEDs will start blinking to signal that a Factory Reset was scheduled */ -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) sStatusLED.Set(false); sContactSensorLED.Set(false); @@ -706,7 +706,7 @@ void AppTask::BleStartAdvertising(intptr_t arg) if (ConnectivityMgr().IsBLEAdvertisingEnabled()) { ConnectivityMgr().SetBLEAdvertisingEnabled(false); -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) sStatusLED.Set(false); #endif K32W_LOG("Stopped BLE Advertising!"); @@ -717,7 +717,7 @@ void AppTask::BleStartAdvertising(intptr_t arg) if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() == CHIP_NO_ERROR) { -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) sStatusLED.Set(true); #endif K32W_LOG("Started BLE Advertising!"); @@ -845,14 +845,14 @@ void AppTask::OnStateChanged(ContactSensorManager::State aState) if (ContactSensorManager::State::kContactClosed == aState) { K32W_LOG("Contact state changed to closed.") -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) sContactSensorLED.Set(true); #endif } else if (ContactSensorManager::State::kContactOpened == aState) { K32W_LOG("Contact state changed to opened.") -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) sContactSensorLED.Set(false); #endif } @@ -876,7 +876,7 @@ void AppTask::OnIdentifyStart(Identify * identify) } K32W_LOG("Identify process has started. Status LED should blink every 0.5 seconds."); sAppTask.mFunction = Function::kIdentify; -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) sStatusLED.Set(false); sStatusLED.Blink(500); #endif @@ -926,7 +926,7 @@ void AppTask::PostEvent(const AppEvent * aEvent) void AppTask::DispatchEvent(AppEvent * aEvent) { -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) /* specific processing for events sent from App_PostCallbackMessage (see main.cpp) */ if (aEvent->Type == AppEvent::kEventType_Lp) { @@ -974,7 +974,7 @@ void AppTask::UpdateDeviceStateInternal(intptr_t arg) /* get onoff attribute value */ (void) app::Clusters::BooleanState::Attributes::StateValue::Get(1, &stateValueAttrValue); -#if !defined(chip_with_low_power) || (chip_with_low_power == 0) +#if !defined(nxp_use_low_power) || (nxp_use_low_power == 0) /* set the device state */ sContactSensorLED.Set(stateValueAttrValue); #endif diff --git a/examples/contact-sensor-app/nxp/k32w0/main/include/AppEvent.h b/examples/contact-sensor-app/nxp/k32w0/main/include/AppEvent.h index b8ae7e72540ef8..ce1e4fbbc79b7d 100644 --- a/examples/contact-sensor-app/nxp/k32w0/main/include/AppEvent.h +++ b/examples/contact-sensor-app/nxp/k32w0/main/include/AppEvent.h @@ -29,7 +29,7 @@ struct AppEvent kTimer, kContact, kInstall, -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) kEventType_Lp, #endif kOTAResume, @@ -56,7 +56,7 @@ struct AppEvent EventHandler Handler; -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) void * param; #endif }; diff --git a/examples/contact-sensor-app/nxp/k32w0/main/main.cpp b/examples/contact-sensor-app/nxp/k32w0/main/main.cpp index 9517d7e2cf4309..6d6c3af043bddd 100644 --- a/examples/contact-sensor-app/nxp/k32w0/main/main.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/main.cpp @@ -35,7 +35,7 @@ #include #endif -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) #include "fsl_gpio.h" #include "fsl_iocon.h" #include "gpio_pins.h" @@ -86,7 +86,7 @@ void APP_SetMaxTxPower() #endif /* low power requirements */ -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) extern "C" void setThreadInitialized(bool isInitialized); extern "C" bool isThreadInitialized(); #endif @@ -160,7 +160,7 @@ extern "C" void main_task(void const * argument) goto exit; } -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) setThreadInitialized(TRUE); #endif @@ -206,7 +206,7 @@ extern "C" void main_task(void const * argument) extern "C" void otSysEventSignalPending(void) { -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) /* make sure that 15.4 radio is initialized before waking up the Thread task */ if (isThreadInitialized()) #endif @@ -216,7 +216,7 @@ extern "C" void otSysEventSignalPending(void) } } -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) extern "C" void vOptimizeConsumption(void) { /* BUTTON2 change contact, BUTTON4 start adv/factoryreset */ diff --git a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn index 1b57e5f3cf9061..c96f9676b2336a 100644 --- a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn @@ -87,7 +87,7 @@ mcxw71_k32w1_sdk("sdk") { "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", ] - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { include_dirs += [ "${example_platform_dir}/board" ] sources += [ "${example_platform_dir}/board/peripherals.c", @@ -117,7 +117,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ] } - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { defines += [ "CONFIG_LOW_POWER=1" ] } else { defines += [ @@ -158,11 +158,11 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ] } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] @@ -216,7 +216,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "../common/main.cpp", ] - if (chip_with_low_power == 0) { + if (!nxp_use_low_power) { sources += [ "${common_example_dir}/ui_feedback/source/LedManager.cpp", "${example_platform_dir}/util/LedOnOff.cpp", @@ -263,7 +263,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "-T" + rebase_path(ldscript, root_build_dir), ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } diff --git a/examples/contact-sensor-app/nxp/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w1/args.gni index e5654bdbc707c6..363718f1a8bbab 100644 --- a/examples/contact-sensor-app/nxp/k32w1/args.gni +++ b/examples/contact-sensor-app/nxp/k32w1/args.gni @@ -39,6 +39,6 @@ is_debug = false chip_crypto = "platform" chip_openthread_ftd = false -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_with_diag_logs_demo = true diff --git a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn index 8bba2393f8fc43..48719dbc9bd6e9 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn +++ b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn @@ -86,7 +86,7 @@ mcxw71_k32w1_sdk("sdk") { "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", ] - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { include_dirs += [ "${example_platform_dir}/board" ] sources += [ "${example_platform_dir}/board/peripherals.c", @@ -116,7 +116,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ] } - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { defines += [ "CONFIG_LOW_POWER=1" ] } else { defines += [ @@ -157,11 +157,11 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ] } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] @@ -215,7 +215,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "../common/main.cpp", ] - if (chip_with_low_power == 0) { + if (!nxp_use_low_power) { sources += [ "${common_example_dir}/ui_feedback/source/LedManager.cpp", "${example_platform_dir}/util/LedOnOff.cpp", @@ -262,7 +262,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "-T" + rebase_path(ldscript, root_build_dir), ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } diff --git a/examples/contact-sensor-app/nxp/mcxw71/args.gni b/examples/contact-sensor-app/nxp/mcxw71/args.gni index 6e6015933d6cf2..bf06f4e4948fb3 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/args.gni +++ b/examples/contact-sensor-app/nxp/mcxw71/args.gni @@ -37,6 +37,6 @@ is_debug = false chip_crypto = "platform" chip_openthread_ftd = false -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_with_diag_logs_demo = true diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn index eb7ea93bbd1d2c..ee1e896987ae9b 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn @@ -170,7 +170,7 @@ rt_executable("laundry-washer") { "../../common/main/operational-state-delegate-impl.cpp", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn index 96b035e8628f5d..90be59719a193d 100644 --- a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn @@ -158,7 +158,7 @@ rt_executable("laundry-washer-app") { "../../common/main/operational-state-delegate-impl.cpp", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn index 7f22eca6b2c085..936f1de4a7d262 100644 --- a/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/laundry-washer-app/nxp/rt/rw61x/BUILD.gn @@ -57,8 +57,8 @@ rt_sdk("sdk") { defines = [] # To be moved, temporary mbedtls config fix to build app with factory data - if (chip_enable_secure_dac_private_key_storage || - chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_dac_private_key_storage || + nxp_enable_secure_whole_factory_data) { defines += [ "MBEDTLS_NIST_KW_C", "MBEDTLS_PSA_CRYPTO_CLIENT", @@ -142,10 +142,10 @@ rt_executable("laundry-washer") { "../../common/main/main.cpp", ] - if (chip_enable_secure_dac_private_key_storage || - chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_dac_private_key_storage || + nxp_enable_secure_whole_factory_data) { sources += [ "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp" ] - if (chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_whole_factory_data) { defines += [ "ENABLE_SECURE_WHOLE_FACTORY_DATA" ] } } else { @@ -189,7 +189,7 @@ rt_executable("laundry-washer") { "../../common/main/operational-state-delegate-impl.cpp", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/lighting-app/nxp/README.md b/examples/lighting-app/nxp/README.md index e0860a021ef30b..43fd85219fef20 100644 --- a/examples/lighting-app/nxp/README.md +++ b/examples/lighting-app/nxp/README.md @@ -128,7 +128,7 @@ corresponding to data model target. ### Manufacturing data -Use `chip_with_factory_data=1` in the gn build command to enable factory data. +Use `nxp_use_factory_data=true` in the gn build command to enable factory data. For a full guide on manufacturing flow, please see [Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md). diff --git a/examples/lighting-app/nxp/k32w0/BUILD.gn b/examples/lighting-app/nxp/k32w0/BUILD.gn index 65a62229a7f9cd..b44b45062d8793 100644 --- a/examples/lighting-app/nxp/k32w0/BUILD.gn +++ b/examples/lighting-app/nxp/k32w0/BUILD.gn @@ -99,7 +99,7 @@ k32w0_executable("light_app") { "main/main.cpp", ] - if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) { + if (nxp_use_factory_data && use_custom_factory_provider == 1) { sources += [ "${k32w0_platform_dir}/common/CustomFactoryDataProvider.cpp", "${k32w0_platform_dir}/common/CustomFactoryDataProvider.h", diff --git a/examples/lighting-app/nxp/k32w0/README.md b/examples/lighting-app/nxp/k32w0/README.md index 61f35a3e7116ac..43f25500c10b79 100644 --- a/examples/lighting-app/nxp/k32w0/README.md +++ b/examples/lighting-app/nxp/k32w0/README.md @@ -256,8 +256,8 @@ Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the build argument (chip_with_OM15082) inside the gn build instruction should be set to zero. The argument chip_with_OM15082 is set to zero by default. -In case that Openthread CLI is needed, chip_with_ot_cli build argument must be -set to 1. +In case that Openthread CLI is needed, `nxp_enable_ot_cli` build argument must +be set to true. In case the board doesn't have 32KHz crystal fitted, one can use the 32KHz free running oscillator as a clock source. In this case one must set the use_fro_32k @@ -348,10 +348,10 @@ CHIPProjectConfig.h. Regarding factory data provider, there are two options: - use the default factory data provider: `FactoryDataProviderImpl` by setting - `chip_with_factory_data=1` in the gn build command. + `nxp_use_factory_data=true` in the gn build command. - use a custom factory data provider: please see [Guide for implementing a custom factory data provider](../../../platform/nxp/k32w0/doc/CustomFactoryDataProvider.md). - This can be enabled when `chip_with_factory_data=1` by setting + This can be enabled when `nxp_use_factory_data=true` by setting `use_custom_factory_provider=1` in the gn build command. ## Flashing and debugging @@ -669,9 +669,9 @@ factory data TLV value. A user can select which default processors to enable: -- `chip_enable_ota_firmware_processor=1` to enable default firmware (app/SSBL) - update processor (enabled by default). -- `chip_enable_ota_factory_data_processor=1` to enable default factory data +- `nxp_enable_ota_firmware_processor=true` to enable default firmware + (app/SSBL) update processor (enabled by default). +- `nxp_enable_ota_factory_data_processor=true` to enable default factory data update processor (disabled by default). The address for storing the custom OTA entry can also be specified: diff --git a/examples/lighting-app/nxp/k32w0/args.gni b/examples/lighting-app/nxp/k32w0/args.gni index 7126cf38ad5f3b..da4649ea566184 100644 --- a/examples/lighting-app/nxp/k32w0/args.gni +++ b/examples/lighting-app/nxp/k32w0/args.gni @@ -26,6 +26,6 @@ is_debug = false chip_crypto = "platform" chip_crypto_flavor = "NXP-Ultrafast-P256" -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_with_OM15082 = 1 chip_pw_tokenizer_logging = true diff --git a/examples/lighting-app/nxp/k32w1/BUILD.gn b/examples/lighting-app/nxp/k32w1/BUILD.gn index 57a1b7921fcaf9..91f069732282aa 100644 --- a/examples/lighting-app/nxp/k32w1/BUILD.gn +++ b/examples/lighting-app/nxp/k32w1/BUILD.gn @@ -101,7 +101,7 @@ mcxw71_k32w1_sdk("sdk") { "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", ] - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { include_dirs += [ "${example_platform_dir}/board" ] sources += [ "${example_platform_dir}/board/peripherals.c", @@ -195,7 +195,7 @@ mcxw71_k32w1_executable("light_app") { sources += [ "${example_platform_dir}/rpc/AppRpc.cpp" ] } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] @@ -218,7 +218,7 @@ mcxw71_k32w1_executable("light_app") { "${chip_root}/src/platform/logging:default", ] - if (chip_config_dimmable_led) { + if (nxp_config_dimmable_led) { defines += [ "LIGHTING_MANAGER_ENABLE_DIMMABLE_LED=1" ] sources += [ "${common_example_dir}/led_widget/include/LedDimmer.h", @@ -246,7 +246,7 @@ mcxw71_k32w1_executable("light_app") { ] } - if (use_smu2_static) { + if (nxp_use_smu2_static) { ldscript = "${example_platform_dir}/app/ldscripts/app.ld" base_ldscript_dir = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc" } else { @@ -263,11 +263,11 @@ mcxw71_k32w1_executable("light_app") { "-T" + rebase_path(ldscript, root_build_dir), ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } - if (use_smu2_static) { + if (nxp_use_smu2_static) { ldflags += [ "-L" + rebase_path(base_ldscript_dir, root_build_dir) ] } diff --git a/examples/lighting-app/nxp/k32w1/README.md b/examples/lighting-app/nxp/k32w1/README.md index 61cec8077cc99a..0b81a1ac5dfdab 100644 --- a/examples/lighting-app/nxp/k32w1/README.md +++ b/examples/lighting-app/nxp/k32w1/README.md @@ -83,8 +83,8 @@ if changed, the names must be updated in `app.ld`. See `SMU2` memory range size. When compiling the application as an OT Full Thread Device -(`chip_openthread_ftd=true`), using `use_smu2_static=true` gn arg will cause the -following symbols to be moved to `SMU2` area: +(`chip_openthread_ftd=true`), using `nxp_use_smu2_static=true` gn arg will cause +the following symbols to be moved to `SMU2` area: | symbol name | file | | ----------------------------------- | ---------------------------- | @@ -93,19 +93,19 @@ following symbols to be moved to `SMU2` area: | `Server::sServer` | `Server.cpp` | | `ThreadStackManagerImpl::sInstance` | `ThreadStackManagerImpl.cpp` | -Additionally, using `use_smu2_dynamic=true` will cause the OpenThread buffers to -be dynamically allocated from a 13KB `SMU2` range after a successful +Additionally, using `nxp_use_smu2_dynamic=true` will cause the OpenThread +buffers to be dynamically allocated from a 13KB `SMU2` range after a successful commissioning process. -`use_smu2_static` and `use_smu2_dynamic` are set to `true` in the default -example. +`nxp_use_smu2_static` and `nxp_use_smu2_dynamic` are set to `true` in the +default example. ### LED PWM In the default configuration, the onboard RGB LED pins are configured as GPIO pins. In order to enable the dimming feature, the pins need to be configured in PWM mode and synced with channels of the `TPM` (Timer PWM Module). To enable -this feature, compile the application with: `chip_config_dimmable_led=true` +this feature, compile the application with: `nxp_config_dimmable_led=true` If the feature is enabled, the LED brightness can be controlled using `LevelControl` cluster diff --git a/examples/lighting-app/nxp/k32w1/args.gni b/examples/lighting-app/nxp/k32w1/args.gni index 5c854bc1c3c187..3d026f1fb48e9d 100644 --- a/examples/lighting-app/nxp/k32w1/args.gni +++ b/examples/lighting-app/nxp/k32w1/args.gni @@ -19,7 +19,7 @@ import("${chip_root}/config/standalone/args.gni") nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") nxp_device = "K32W1480" -chip_config_dimmable_led = false +nxp_config_dimmable_led = false chip_enable_ota_requestor = true chip_stack_lock_tracking = "fatal" chip_enable_ble = true @@ -29,11 +29,11 @@ is_debug = false chip_crypto = "platform" chip_openthread_ftd = true -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_system_config_provide_statistics = false chip_system_config_use_open_thread_inet_endpoints = true chip_with_lwip = false -use_smu2_static = true -use_smu2_dynamic = true +nxp_use_smu2_static = true +nxp_use_smu2_dynamic = true diff --git a/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni b/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni index c2dc1950544640..2afd19aeef800a 100644 --- a/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni +++ b/examples/lighting-app/nxp/k32w1/with_pw_rpc.gni @@ -31,7 +31,7 @@ chip_system_config_provide_statistics = false chip_system_config_use_open_thread_inet_endpoints = true chip_with_lwip = false -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false cpp_standard = "gnu++17" is_debug = false diff --git a/examples/lighting-app/nxp/mcxw71/BUILD.gn b/examples/lighting-app/nxp/mcxw71/BUILD.gn index f7e9c42b6e752c..8ee1b50b361ea4 100644 --- a/examples/lighting-app/nxp/mcxw71/BUILD.gn +++ b/examples/lighting-app/nxp/mcxw71/BUILD.gn @@ -101,7 +101,7 @@ mcxw71_k32w1_sdk("sdk") { "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", ] - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { include_dirs += [ "${example_platform_dir}/board" ] sources += [ "${example_platform_dir}/board/peripherals.c", @@ -198,7 +198,7 @@ mcxw71_k32w1_executable("light_app") { sources += [ "${example_platform_dir}/rpc/AppRpc.cpp" ] } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] @@ -221,7 +221,7 @@ mcxw71_k32w1_executable("light_app") { "${chip_root}/src/platform/logging:default", ] - if (chip_config_dimmable_led) { + if (nxp_config_dimmable_led) { defines += [ "LIGHTING_MANAGER_ENABLE_DIMMABLE_LED=1" ] sources += [ "${common_example_dir}/led_widget/include/LedDimmer.h", @@ -249,7 +249,7 @@ mcxw71_k32w1_executable("light_app") { ] } - if (use_smu2_static) { + if (nxp_use_smu2_static) { ldscript = "${example_platform_dir}/app/ldscripts/app.ld" base_ldscript_dir = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc" } else { @@ -266,11 +266,11 @@ mcxw71_k32w1_executable("light_app") { "-T" + rebase_path(ldscript, root_build_dir), ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } - if (use_smu2_static) { + if (nxp_use_smu2_static) { ldflags += [ "-L" + rebase_path(base_ldscript_dir, root_build_dir) ] } diff --git a/examples/lighting-app/nxp/mcxw71/README.md b/examples/lighting-app/nxp/mcxw71/README.md index 3cded8b8be9230..c9c4007485889b 100644 --- a/examples/lighting-app/nxp/mcxw71/README.md +++ b/examples/lighting-app/nxp/mcxw71/README.md @@ -83,8 +83,8 @@ if changed, the names must be updated in `app.ld`. See `SMU2` memory range size. When compiling the application as an OT Full Thread Device -(`chip_openthread_ftd=true`), using `use_smu2_static=true` gn arg will cause the -following symbols to be moved to `SMU2` area: +(`chip_openthread_ftd=true`), using `nxp_use_smu2_static=true` gn arg will cause +the following symbols to be moved to `SMU2` area: | symbol name | file | | ----------------------------------- | ---------------------------- | @@ -93,19 +93,19 @@ following symbols to be moved to `SMU2` area: | `Server::sServer` | `Server.cpp` | | `ThreadStackManagerImpl::sInstance` | `ThreadStackManagerImpl.cpp` | -Additionally, using `use_smu2_dynamic=true` will cause the OpenThread buffers to -be dynamically allocated from a 13KB `SMU2` range after a successful +Additionally, using `nxp_use_smu2_dynamic=true` will cause the OpenThread +buffers to be dynamically allocated from a 13KB `SMU2` range after a successful commissioning process. -`use_smu2_static` and `use_smu2_dynamic` are set to `true` in the default -example. +`nxp_use_smu2_static` and `nxp_use_smu2_dynamic` are set to `true` in the +default example. ### LED PWM In the default configuration, the onboard RGB LED pins are configured as GPIO pins. In order to enable the dimming feature, the pins need to be configured in PWM mode and synced with channels of the `TPM` (Timer PWM Module). To enable -this feature, compile the application with: `chip_config_dimmable_led=true` +this feature, compile the application with: `nxp_config_dimmable_led=true` If the feature is enabled, the LED brightness can be controlled using `LevelControl` cluster diff --git a/examples/lighting-app/nxp/mcxw71/args.gni b/examples/lighting-app/nxp/mcxw71/args.gni index 6a27d6605ea2b8..6be04211091da2 100644 --- a/examples/lighting-app/nxp/mcxw71/args.gni +++ b/examples/lighting-app/nxp/mcxw71/args.gni @@ -19,7 +19,7 @@ import("${chip_root}/config/standalone/args.gni") nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") nxp_device = "MCXW716C" -chip_config_dimmable_led = false +nxp_config_dimmable_led = false chip_enable_ota_requestor = true chip_stack_lock_tracking = "fatal" chip_enable_ble = true @@ -29,11 +29,11 @@ is_debug = false chip_crypto = "platform" chip_openthread_ftd = true -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false chip_system_config_provide_statistics = false chip_system_config_use_open_thread_inet_endpoints = true chip_with_lwip = false -use_smu2_static = true -use_smu2_dynamic = true +nxp_use_smu2_static = true +nxp_use_smu2_dynamic = true diff --git a/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni b/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni index c2dc1950544640..2afd19aeef800a 100644 --- a/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni +++ b/examples/lighting-app/nxp/mcxw71/with_pw_rpc.gni @@ -31,7 +31,7 @@ chip_system_config_provide_statistics = false chip_system_config_use_open_thread_inet_endpoints = true chip_with_lwip = false -chip_with_ot_cli = 0 +nxp_enable_ot_cli = false cpp_standard = "gnu++17" is_debug = false diff --git a/examples/lock-app/nxp/README.md b/examples/lock-app/nxp/README.md index a758ef50d7a348..9bbd88a17ed439 100644 --- a/examples/lock-app/nxp/README.md +++ b/examples/lock-app/nxp/README.md @@ -123,7 +123,7 @@ corresponding to data model target. ### Manufacturing data -Use `chip_with_factory_data=1` in the gn build command to enable factory data. +Use `nxp_use_factory_data=true` in the gn build command to enable factory data. For a full guide on manufacturing flow, please see [Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md). diff --git a/examples/lock-app/nxp/k32w1/BUILD.gn b/examples/lock-app/nxp/k32w1/BUILD.gn index c10cc05475ffee..d54a69400bfbf4 100644 --- a/examples/lock-app/nxp/k32w1/BUILD.gn +++ b/examples/lock-app/nxp/k32w1/BUILD.gn @@ -85,7 +85,7 @@ mcxw71_k32w1_sdk("sdk") { "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", ] - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { include_dirs += [ "${example_platform_dir}/board" ] sources += [ "${example_platform_dir}/board/peripherals.c", @@ -124,7 +124,7 @@ mcxw71_k32w1_executable("lock_app") { defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ] } - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { defines += [ "CONFIG_LOW_POWER=1" ] } else { defines += [ @@ -168,17 +168,17 @@ mcxw71_k32w1_executable("lock_app") { "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ] } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", @@ -248,7 +248,7 @@ mcxw71_k32w1_executable("lock_app") { "../common/main/main.cpp", ] - if (chip_with_low_power == 0) { + if (!nxp_use_low_power) { sources += [ "${common_example_dir}/ui_feedback/source/LedManager.cpp", "${example_platform_dir}/util/LedOnOff.cpp", @@ -291,7 +291,7 @@ mcxw71_k32w1_executable("lock_app") { "-T" + rebase_path(ldscript, root_build_dir), ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } diff --git a/examples/lock-app/nxp/k32w1/args.gni b/examples/lock-app/nxp/k32w1/args.gni index b7a2d790efb3e2..bf46484106ef35 100644 --- a/examples/lock-app/nxp/k32w1/args.gni +++ b/examples/lock-app/nxp/k32w1/args.gni @@ -37,8 +37,8 @@ is_debug = false chip_crypto = "platform" chip_openthread_ftd = false -chip_with_ot_cli = 0 -chip_enable_matter_cli = true +nxp_enable_ot_cli = false +nxp_enable_matter_cli = true chip_with_diag_logs_demo = true -chip_with_low_power = 0 +nxp_use_low_power = false diff --git a/examples/lock-app/nxp/mcxw71/BUILD.gn b/examples/lock-app/nxp/mcxw71/BUILD.gn index 0c34d3d8083a20..57328e2da8f8af 100644 --- a/examples/lock-app/nxp/mcxw71/BUILD.gn +++ b/examples/lock-app/nxp/mcxw71/BUILD.gn @@ -85,7 +85,7 @@ mcxw71_k32w1_sdk("sdk") { "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", ] - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { include_dirs += [ "${example_platform_dir}/board" ] sources += [ "${example_platform_dir}/board/peripherals.c", @@ -124,7 +124,7 @@ mcxw71_k32w1_executable("lock_app") { defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ] } - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { defines += [ "CONFIG_LOW_POWER=1" ] } else { defines += [ @@ -168,17 +168,17 @@ mcxw71_k32w1_executable("lock_app") { "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] - if (chip_with_low_power == 1) { + if (nxp_use_low_power) { sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ] } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", @@ -248,7 +248,7 @@ mcxw71_k32w1_executable("lock_app") { "../common/main/main.cpp", ] - if (chip_with_low_power == 0) { + if (!nxp_use_low_power) { sources += [ "${common_example_dir}/ui_feedback/source/LedManager.cpp", "${example_platform_dir}/util/LedOnOff.cpp", @@ -291,7 +291,7 @@ mcxw71_k32w1_executable("lock_app") { "-T" + rebase_path(ldscript, root_build_dir), ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } diff --git a/examples/lock-app/nxp/mcxw71/args.gni b/examples/lock-app/nxp/mcxw71/args.gni index 1a0940c96aabdb..59a25dfb43d9c9 100644 --- a/examples/lock-app/nxp/mcxw71/args.gni +++ b/examples/lock-app/nxp/mcxw71/args.gni @@ -37,8 +37,8 @@ is_debug = false chip_crypto = "platform" chip_openthread_ftd = false -chip_with_ot_cli = 0 -chip_enable_matter_cli = true +nxp_enable_ot_cli = false +nxp_enable_matter_cli = true chip_with_diag_logs_demo = true -chip_with_low_power = 0 +nxp_use_low_power = false diff --git a/examples/platform/nxp/k32w0/doc/CustomFactoryDataProvider.md b/examples/platform/nxp/k32w0/doc/CustomFactoryDataProvider.md index 59347d6bfd205d..b609598132ea4c 100644 --- a/examples/platform/nxp/k32w0/doc/CustomFactoryDataProvider.md +++ b/examples/platform/nxp/k32w0/doc/CustomFactoryDataProvider.md @@ -19,13 +19,13 @@ What **shall** be done to enable usage of a custom factory provider in the reference app: - Set `use_custom_factory_provider=1`. This option is only available when - factory data is used (`chip_with_factory_data=1`). An assert will be raised + factory data is used (`nxp_use_factory_data=true`). An assert will be raised if the condition is not met. - Modify the `BUILD.gn` of the application to take into account the new files where the custom factory provider is implemented: ``` - if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) + if (nxp_use_factory_data && use_custom_factory_provider == 1) { sources += [ "${k32w0_platform_dir}/common/CustomFactoryDataProvider.h", diff --git a/examples/platform/nxp/mcxw71_k32w1/app/project_include/freeRTOS/FreeRTOSConfig.h b/examples/platform/nxp/mcxw71_k32w1/app/project_include/freeRTOS/FreeRTOSConfig.h index 286566a027b6f9..b834ea38b834f1 100644 --- a/examples/platform/nxp/mcxw71_k32w1/app/project_include/freeRTOS/FreeRTOSConfig.h +++ b/examples/platform/nxp/mcxw71_k32w1/app/project_include/freeRTOS/FreeRTOSConfig.h @@ -48,7 +48,7 @@ extern uint32_t SystemCoreClock; #define configUSE_PREEMPTION 1 -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) #define configUSE_TICKLESS_IDLE 1 #else #define configUSE_TICKLESS_IDLE 0 diff --git a/examples/platform/nxp/mcxw71_k32w1/app/support/BUILD.gn b/examples/platform/nxp/mcxw71_k32w1/app/support/BUILD.gn index 96d05e9ba29f13..d49e9e7638c817 100644 --- a/examples/platform/nxp/mcxw71_k32w1/app/support/BUILD.gn +++ b/examples/platform/nxp/mcxw71_k32w1/app/support/BUILD.gn @@ -17,8 +17,6 @@ import("//build_overrides/nxp_sdk.gni") import("${nxp_sdk_matter_support_root}/gn_build/nxp_sdk.gni") -import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") - config("support_config") { include_dirs = [ "${chip_root}" ] @@ -53,9 +51,9 @@ source_set("freertos_memory_utils") { cflags = [ "-Wconversion" ] - if (chip_key_storage == "fwk_nvm") { + if (nxp_nvm_component == "fwk_nvm") { defines = [ "CHIP_PLAT_NVM_SUPPORT=1" ] - } else if (chip_key_storage == "littlefs") { + } else if (nxp_nvm_component == "littlefs") { defines = [ "CHIP_PLAT_NVM_SUPPORT=3" ] } diff --git a/examples/platform/nxp/mcxw71_k32w1/app/support/FreeRtosHooks.c b/examples/platform/nxp/mcxw71_k32w1/app/support/FreeRtosHooks.c index 72d5f1acc6161e..bc5acf2e88401b 100644 --- a/examples/platform/nxp/mcxw71_k32w1/app/support/FreeRtosHooks.c +++ b/examples/platform/nxp/mcxw71_k32w1/app/support/FreeRtosHooks.c @@ -134,8 +134,6 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) } #endif -extern void OTAIdleActivities(void); - void vApplicationIdleHook(void) { // Data queued by PDM will be written to external flash @@ -150,5 +148,8 @@ void vApplicationIdleHook(void) #endif OSA_InterruptEnable(); +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + extern void OTAIdleActivities(void); OTAIdleActivities(); +#endif } diff --git a/examples/thermostat/nxp/rt/rt1060/BUILD.gn b/examples/thermostat/nxp/rt/rt1060/BUILD.gn index 5eba1a328f799f..e57cc01b92b47b 100644 --- a/examples/thermostat/nxp/rt/rt1060/BUILD.gn +++ b/examples/thermostat/nxp/rt/rt1060/BUILD.gn @@ -183,7 +183,7 @@ rt_executable("thermostat") { deps = [ "${chip_root}/examples/${app_common_folder}" ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/thermostat/nxp/rt/rt1170/BUILD.gn b/examples/thermostat/nxp/rt/rt1170/BUILD.gn index c89df14eb5fc01..abb7090f962559 100644 --- a/examples/thermostat/nxp/rt/rt1170/BUILD.gn +++ b/examples/thermostat/nxp/rt/rt1170/BUILD.gn @@ -169,7 +169,7 @@ rt_executable("thermostat") { deps = [ "${chip_root}/examples/${app_common_folder}" ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/examples/thermostat/nxp/rt/rw61x/BUILD.gn b/examples/thermostat/nxp/rt/rw61x/BUILD.gn index 3e46391d30f8a8..ec0a6d4f0ec379 100644 --- a/examples/thermostat/nxp/rt/rw61x/BUILD.gn +++ b/examples/thermostat/nxp/rt/rw61x/BUILD.gn @@ -59,8 +59,8 @@ rt_sdk("sdk") { defines = [] # To be moved, temporary mbedtls config fix to build app with factory data - if (chip_enable_secure_dac_private_key_storage || - chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_dac_private_key_storage || + nxp_enable_secure_whole_factory_data) { defines += [ "MBEDTLS_NIST_KW_C", "MBEDTLS_PSA_CRYPTO_CLIENT", @@ -165,10 +165,10 @@ rt_executable("thermostat") { ] } - if (chip_enable_secure_dac_private_key_storage || - chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_dac_private_key_storage || + nxp_enable_secure_whole_factory_data) { sources += [ "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp" ] - if (chip_enable_secure_whole_factory_data) { + if (nxp_enable_secure_whole_factory_data) { defines += [ "ENABLE_SECURE_WHOLE_FACTORY_DATA" ] } } else { @@ -202,7 +202,7 @@ rt_executable("thermostat") { "${chip_root}/src/platform/logging:default", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "ENABLE_CHIP_SHELL" ] deps += [ "${chip_root}/examples/shell/shell_common:shell_common", diff --git a/scripts/build/builders/nxp.py b/scripts/build/builders/nxp.py index 91155f20c96f7b..0f9ebed42ad18b 100644 --- a/scripts/build/builders/nxp.py +++ b/scripts/build/builders/nxp.py @@ -236,18 +236,18 @@ def GnBuildArgs(self): args = [] if self.low_power: - args.append('chip_with_low_power=1') + args.append('nxp_use_low_power=true') if self.board == NxpBoard.K32W0: args.append('chip_pw_tokenizer_logging=false chip_with_OM15082=0') if self.smu2: - args.append('use_smu2_static=true use_smu2_dynamic=true') + args.append('nxp_use_smu2_static=true nxp_use_smu2_dynamic=true') if self.enable_factory_data: - args.append('chip_with_factory_data=1') + args.append('nxp_use_factory_data=true') if self.convert_dac_pk: - args.append('chip_convert_dac_private_key=1') + args.append('nxp_convert_dac_private_key=true') if self.use_fro32k: args.append('use_fro_32k=1') @@ -298,7 +298,7 @@ def GnBuildArgs(self): args.append('chip_enable_ble=false') if self.enable_shell: - args.append('chip_enable_matter_cli=true') + args.append('nxp_enable_matter_cli=true') if self.enable_thread: # thread is enabled by default on kw32 diff --git a/src/platform/nxp/common/ble/BLEManagerCommon.cpp b/src/platform/nxp/common/ble/BLEManagerCommon.cpp index 6078fa80acb715..e970dab55cc232 100644 --- a/src/platform/nxp/common/ble/BLEManagerCommon.cpp +++ b/src/platform/nxp/common/ble/BLEManagerCommon.cpp @@ -40,7 +40,7 @@ #include "stdio.h" #include "timers.h" -#if defined(CPU_JN518X) && defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(CPU_JN518X) && defined(nxp_use_low_power) && (nxp_use_low_power == 1) #include "PWR_Configuration.h" #endif @@ -54,7 +54,7 @@ *******************************************************************************/ extern "C" bool_t Ble_ConfigureHostStackConfig(void); -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) extern "C" void PWR_DisallowDeviceToSleep(void); extern "C" void PWR_AllowDeviceToSleep(void); #endif @@ -127,7 +127,7 @@ TimerHandle_t connectionTimeout; const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) static bool bleAppStopInProgress; #endif @@ -192,7 +192,7 @@ CHIP_ERROR BLEManagerCommon::_Init() VerifyOrExit(eventBits & CHIP_BLE_KW_EVNT_POWER_LEVEL_SET, err = CHIP_ERROR_INCORRECT_STATE); #endif -#if defined(CPU_JN518X) && defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(CPU_JN518X) && defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_ChangeDeepSleepMode(cPWR_PowerDown_RamRet); #endif @@ -516,7 +516,7 @@ BLEManagerCommon::ble_err_t BLEManagerCommon::blekw_start_advertising(gapAdverti return BLE_E_START_ADV; } -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_DisallowDeviceToSleep(); #endif @@ -524,13 +524,13 @@ BLEManagerCommon::ble_err_t BLEManagerCommon::blekw_start_advertising(gapAdverti CHIP_BLE_KW_EVNT_TIMEOUT); if (!(eventBits & CHIP_BLE_KW_EVNT_ADV_CHANGED)) { -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_AllowDeviceToSleep(); #endif return BLE_E_START_ADV_FAILED; } -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_AllowDeviceToSleep(); #endif @@ -927,7 +927,7 @@ void BLEManagerCommon::HandleConnectEvent(blekw_msg_t * msg) uint8_t deviceId = msg->data.u8; ChipLogProgress(DeviceLayer, "BLE is connected with device: %d.\n", deviceId); -#if gClkUseFro32K && defined(chip_with_low_power) && (chip_with_low_power == 1) +#if gClkUseFro32K && defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_DisallowDeviceToSleep(); #endif @@ -950,7 +950,7 @@ void BLEManagerCommon::HandleConnectionCloseEvent(blekw_msg_t * msg) uint8_t deviceId = msg->data.u8; ChipLogProgress(DeviceLayer, "BLE is disconnected with device: %d.\n", deviceId); -#if gClkUseFro32K && defined(chip_with_low_power) && (chip_with_low_power == 1) +#if gClkUseFro32K && defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_AllowDeviceToSleep(); #endif @@ -1088,7 +1088,7 @@ void BLEManagerCommon::HandleForceDisconnect() } } -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_AllowDeviceToSleep(); #endif } @@ -1191,7 +1191,7 @@ void BLEManagerCommon::blekw_gap_connection_cb(deviceId_t deviceId, gapConnectio if (pConnectionEvent->eventType == gConnEvtConnected_c) { #if CHIP_DEVICE_K32W1 -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) /* Disallow must be called here for K32W1, otherwise an assert will be reached. * Disclaimer: this is a workaround until a better cross platform solution is found. */ PWR_DisallowDeviceToSleep(); @@ -1207,7 +1207,7 @@ void BLEManagerCommon::blekw_gap_connection_cb(deviceId_t deviceId, gapConnectio /* Notify App Task that the BLE is connected now */ (void) blekw_msg_add_u8(BLE_KW_MSG_CONNECTED, (uint8_t) deviceId); -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) PWR_AllowDeviceToSleep(); #endif } @@ -1218,7 +1218,7 @@ void BLEManagerCommon::blekw_gap_connection_cb(deviceId_t deviceId, gapConnectio /* Notify App Task that the BLE is disconnected now */ (void) blekw_msg_add_u8(BLE_KW_MSG_DISCONNECTED, (uint8_t) deviceId); -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) if (bleAppStopInProgress == TRUE) { bleAppStopInProgress = FALSE; @@ -1454,7 +1454,7 @@ CHIP_ERROR BLEManagerCommon::blekw_stop_connection_internal(BLE_CONNECTION_OBJEC ChipLogProgress(DeviceLayer, "Gap_Disconnect() failed."); return CHIP_ERROR_INTERNAL; } -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) else { bleAppStopInProgress = TRUE; diff --git a/src/platform/nxp/k32w0/BLEManagerImpl.cpp b/src/platform/nxp/k32w0/BLEManagerImpl.cpp index aa56e06a8d5598..8dc8c45bc2cd4d 100644 --- a/src/platform/nxp/k32w0/BLEManagerImpl.cpp +++ b/src/platform/nxp/k32w0/BLEManagerImpl.cpp @@ -19,7 +19,7 @@ /* this file behaves like a config.h, comes first */ #include -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) #include "PWR_Configuration.h" #include "PWR_Interface.h" #endif @@ -79,7 +79,7 @@ CHIP_ERROR BLEManagerImpl::InitHostController(BLECallbackDelegate::GapGenericCal /* Called by BLE when a connect is received */ void BLEManagerImpl::BLE_SignalFromISRCallback(void) { -#if defined(chip_with_low_power) +#if defined(nxp_use_low_power) PWR_DisallowDeviceToSleep(); #endif } diff --git a/src/platform/nxp/k32w0/BUILD.gn b/src/platform/nxp/k32w0/BUILD.gn index 6693acc213e4a1..c7a1c94ddba441 100644 --- a/src/platform/nxp/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w0/BUILD.gn @@ -67,7 +67,7 @@ static_library("nxp_platform") { "${chip_root}/src/platform/nxp/k32w0/BLEManagerImpl.h", ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { sources += [ "FactoryDataProvider.cpp", "FactoryDataProviderImpl.cpp", @@ -78,7 +78,7 @@ static_library("nxp_platform") { ] } - if (chip_with_low_power != 0) { + if (nxp_use_low_power) { sources += [ "LowPowerHooks.cpp" ] } @@ -92,15 +92,14 @@ static_library("nxp_platform") { "../common/ota/OTATlvProcessor.h", ] - if (chip_enable_ota_firmware_processor == 1) { + if (nxp_enable_ota_firmware_processor) { sources += [ "OTAFirmwareProcessor.cpp", "OTAFirmwareProcessor.h", "OTAHooks.cpp", ] - if (chip_with_factory_data == 1 && - chip_enable_ota_factory_data_processor == 1) { + if (nxp_use_factory_data && nxp_enable_ota_factory_data_processor) { sources += [ "OTAFactoryDataProcessor.cpp", "OTAFactoryDataProcessor.h", diff --git a/src/platform/nxp/k32w0/LowPowerHooks.cpp b/src/platform/nxp/k32w0/LowPowerHooks.cpp index b01854c964296d..55c05733d2ef29 100644 --- a/src/platform/nxp/k32w0/LowPowerHooks.cpp +++ b/src/platform/nxp/k32w0/LowPowerHooks.cpp @@ -20,7 +20,7 @@ * Provides a glue layer between Matter and NXP-SDK Low Power */ -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) #include #include diff --git a/src/platform/nxp/k32w0/PlatformManagerImpl.cpp b/src/platform/nxp/k32w0/PlatformManagerImpl.cpp index 1a98552cb7e0d9..b79de9635abd01 100644 --- a/src/platform/nxp/k32w0/PlatformManagerImpl.cpp +++ b/src/platform/nxp/k32w0/PlatformManagerImpl.cpp @@ -56,7 +56,7 @@ namespace DeviceLayer { PlatformManagerImpl PlatformManagerImpl::sInstance; -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) extern "C" void InitLowPower(); #endif @@ -97,7 +97,7 @@ CHIP_ERROR PlatformManagerImpl::InitBoardFwk(void) BOARD_ADCWakeupInit(); #endif -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) /* Low Power Init */ InitLowPower(); #endif diff --git a/src/platform/nxp/k32w0/ThreadStackManagerImpl.cpp b/src/platform/nxp/k32w0/ThreadStackManagerImpl.cpp index c74c2a9af4d907..36c27a15160617 100644 --- a/src/platform/nxp/k32w0/ThreadStackManagerImpl.cpp +++ b/src/platform/nxp/k32w0/ThreadStackManagerImpl.cpp @@ -36,7 +36,7 @@ #include -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) extern "C" bool isThreadInitialized(); #endif @@ -75,7 +75,7 @@ void ThreadStackManagerImpl::ProcessThreadActivity() auto * bleManager = &chip::DeviceLayer::Internal::BLEMgrImpl(); bleManager->DoBleProcessing(); -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) if (isThreadInitialized()) #endif { diff --git a/src/platform/nxp/mcxw71_k32w1/BUILD.gn b/src/platform/nxp/mcxw71_k32w1/BUILD.gn index 6b399a1c1dbf27..9de3c0e5b3c7e0 100644 --- a/src/platform/nxp/mcxw71_k32w1/BUILD.gn +++ b/src/platform/nxp/mcxw71_k32w1/BUILD.gn @@ -26,8 +26,7 @@ import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") assert(chip_device_platform == "nxp") assert(nxp_platform == "mcxw71_k32w1") -assert(chip_with_low_power == 0 || - (chip_with_low_power == 1 && chip_with_ot_cli == 0), +assert(!nxp_use_low_power || (nxp_use_low_power && !nxp_enable_ot_cli), "Please disable low power if openthread CLI is needed!") source_set("nxp_factory_data") { @@ -64,8 +63,7 @@ source_set("nxp_ota") { "../common/ota/OTATlvProcessor.h", ] - if (chip_with_factory_data == 1 && - chip_enable_ota_factory_data_processor == 1) { + if (nxp_use_factory_data && nxp_enable_ota_factory_data_processor) { sources += [ "../common/ota/OTAFactoryDataProcessor.cpp", "../common/ota/OTAFactoryDataProcessor.h", @@ -114,7 +112,7 @@ static_library("nxp_platform") { "SystemTimeSupport.cpp", ] - if (chip_key_storage == "fwk_nvm") { + if (nxp_nvm_component == "fwk_nvm") { defines += [ "CHIP_PLAT_NVM_SUPPORT=1" ] sources += [ @@ -125,7 +123,7 @@ static_library("nxp_platform") { "ram_storage.c", "ram_storage.h", ] - } else if (chip_key_storage == "littlefs") { + } else if (nxp_nvm_component == "littlefs") { defines += [ "CHIP_PLAT_NVM_SUPPORT=3", "EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER=\"platform/nxp/common/KeyValueStoreManagerImpl.h\"", @@ -137,7 +135,7 @@ static_library("nxp_platform") { "../common/NXPConfig.h", "../common/NXPConfigKS.cpp", ] - } else if (chip_key_storage == "nvs") { + } else if (nxp_nvm_component == "nvs") { defines += [ "gAppNvsExternalFlash_c=0", "gAppNvsInternalFlash_c=1", @@ -152,7 +150,7 @@ static_library("nxp_platform") { ] } - if (chip_use_plain_dac_key) { + if (nxp_use_plain_dac_key) { defines += [ "CHIP_USE_PLAIN_DAC_KEY=1" ] } else { defines += [ "CHIP_USE_PLAIN_DAC_KEY=0" ] @@ -170,7 +168,7 @@ static_library("nxp_platform") { public_deps = [ "${chip_root}/src/platform:platform_base" ] - if (chip_with_low_power != 0) { + if (nxp_use_low_power) { sources += [ "LowPowerHooks.cpp" ] } @@ -181,7 +179,7 @@ static_library("nxp_platform") { "../common/crypto/PersistentStorageOpKeystoreS200.h", ] - if (chip_with_ot_cli == 1) { + if (nxp_enable_ot_cli) { defines += [ "CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI=1" ] } } @@ -205,7 +203,7 @@ static_library("nxp_platform") { deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } - if (use_smu2_dynamic) { + if (nxp_use_smu2_dynamic) { sources += [ "SMU2Manager.cpp", "SMU2Manager.h", diff --git a/src/platform/nxp/mcxw71_k32w1/LowPowerHooks.cpp b/src/platform/nxp/mcxw71_k32w1/LowPowerHooks.cpp index bc849b476e57af..acec00b4adf52e 100644 --- a/src/platform/nxp/mcxw71_k32w1/LowPowerHooks.cpp +++ b/src/platform/nxp/mcxw71_k32w1/LowPowerHooks.cpp @@ -20,7 +20,7 @@ * Provides a glue layer between Matter and NXP-SDK Low Power */ -#if defined(chip_with_low_power) && (chip_with_low_power == 1) +#if defined(nxp_use_low_power) && (nxp_use_low_power == 1) #include #include diff --git a/src/platform/nxp/mcxw71_k32w1/args.gni b/src/platform/nxp/mcxw71_k32w1/args.gni index 68e1cdeeec672e..7ec8fdf3d56e57 100644 --- a/src/platform/nxp/mcxw71_k32w1/args.gni +++ b/src/platform/nxp/mcxw71_k32w1/args.gni @@ -16,22 +16,12 @@ import("//build_overrides/chip.gni") import("//build_overrides/nxp_sdk.gni") import("//build_overrides/openthread.gni") -declare_args() { - chip_with_ot_cli = 0 - chip_with_low_power = 0 - - # The key storage solution. Developers can select between "littlefs", "nvs" - # and the older "fwk_nvm". - chip_key_storage = "nvs" - - chip_use_plain_dac_key = false -} - openthread_root = "//third_party/connectedhomeip/third_party/openthread/ot-nxp/openthread" nxp_platform = "mcxw71_k32w1" nxp_sdk_name = "mcxw71_k32w1_sdk" nxp_device_layer = "nxp/${nxp_platform}" +nxp_nvm_component = "nvs" nxp_use_lwip = false # ARM architecture flags will be set based on NXP board. diff --git a/src/platform/nxp/rt/rt1060/BUILD.gn b/src/platform/nxp/rt/rt1060/BUILD.gn index 1e3d8f1e1e6ba9..36db65910322f7 100644 --- a/src/platform/nxp/rt/rt1060/BUILD.gn +++ b/src/platform/nxp/rt/rt1060/BUILD.gn @@ -38,7 +38,7 @@ config("nxp_platform_config") { ".", "../../common", ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ ".", "../../common/factory_data", @@ -165,7 +165,7 @@ static_library("nxp_platform") { } } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { sources += [ "../../common/factory_data/FactoryDataProvider.cpp", "../../common/factory_data/FactoryDataProvider.h", diff --git a/src/platform/nxp/rt/rt1170/BUILD.gn b/src/platform/nxp/rt/rt1170/BUILD.gn index 4bfd1034a78f21..0017fc44eb32de 100644 --- a/src/platform/nxp/rt/rt1170/BUILD.gn +++ b/src/platform/nxp/rt/rt1170/BUILD.gn @@ -38,7 +38,7 @@ config("nxp_platform_config") { ".", "../../common", ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ ".", "../../common/factory_data", @@ -168,7 +168,7 @@ static_library("nxp_platform") { } } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { sources += [ "../../common/factory_data/FactoryDataProvider.cpp", "../../common/factory_data/FactoryDataProvider.h", diff --git a/src/platform/nxp/rt/rw61x/BUILD.gn b/src/platform/nxp/rt/rw61x/BUILD.gn index 7ac204e92c55e9..13c2b3c2ffc591 100644 --- a/src/platform/nxp/rt/rw61x/BUILD.gn +++ b/src/platform/nxp/rt/rw61x/BUILD.gn @@ -42,7 +42,7 @@ config("nxp_platform_config") { ".", "../../common", ] - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { include_dirs += [ ".", "../../common/factory_data", @@ -52,14 +52,14 @@ config("nxp_platform_config") { "CONFIG_CHIP_ENCRYPTED_FACTORY_DATA=1", ] - if (chip_enable_secure_dac_private_key_storage) { - assert(chip_enable_secure_dac_private_key_storage && - !chip_enable_secure_whole_factory_data, + if (nxp_enable_secure_dac_private_key_storage) { + assert(nxp_enable_secure_dac_private_key_storage && + !nxp_enable_secure_whole_factory_data, "please select only one protection solution") defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/rt/rw61x/FactoryDataProviderImpl.h\"" ] - } else if (chip_enable_secure_whole_factory_data) { - assert(chip_enable_secure_whole_factory_data && - !chip_enable_secure_dac_private_key_storage, + } else if (nxp_enable_secure_whole_factory_data) { + assert(nxp_enable_secure_whole_factory_data && + !nxp_enable_secure_dac_private_key_storage, "please select only one protection solution") defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.h\"" ] } else { @@ -196,17 +196,17 @@ static_library("nxp_platform") { } } - if (chip_with_factory_data == 1) { + if (nxp_use_factory_data) { sources += [ "../../common/factory_data/FactoryDataProvider.cpp", "../../common/factory_data/FactoryDataProvider.h", ] - if (chip_enable_secure_dac_private_key_storage) { + if (nxp_enable_secure_dac_private_key_storage) { sources += [ "FactoryDataProviderImpl.cpp", "FactoryDataProviderImpl.h", ] - } else if (chip_enable_secure_whole_factory_data) { + } else if (nxp_enable_secure_whole_factory_data) { sources += [ "FactoryDataProviderEncImpl.cpp", "FactoryDataProviderEncImpl.h", diff --git a/third_party/nxp/nxp_matter_support b/third_party/nxp/nxp_matter_support index 41e38b6593b687..69f40517ca5f27 160000 --- a/third_party/nxp/nxp_matter_support +++ b/third_party/nxp/nxp_matter_support @@ -1 +1 @@ -Subproject commit 41e38b6593b68741f2c107d3c5296bfea5b3c1c7 +Subproject commit 69f40517ca5f27fdf3026f695c0d0607b604dc0e diff --git a/third_party/openthread/platforms/nxp/k32w0/BUILD.gn b/third_party/openthread/platforms/nxp/k32w0/BUILD.gn index bf9ed42e894965..9725e59acff800 100644 --- a/third_party/openthread/platforms/nxp/k32w0/BUILD.gn +++ b/third_party/openthread/platforms/nxp/k32w0/BUILD.gn @@ -86,7 +86,7 @@ source_set("libopenthread-k32w0") { ] } - if (chip_with_ot_cli == 1) { + if (nxp_enable_ot_cli) { sources += [ "${openthread_root}/examples/apps/cli/cli_uart.cpp" ] } diff --git a/third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn b/third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn index b7dc6d35983c40..5d583fdd898bef 100644 --- a/third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn +++ b/third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn @@ -16,9 +16,10 @@ import("//build_overrides/chip.gni") import("//build_overrides/nxp_sdk.gni") import("//build_overrides/openthread.gni") -import("${nxp_sdk_build_root}/nxp_sdk.gni") +import("${chip_root}/src/crypto/crypto.gni") +import("${chip_root}/src/platform/device.gni") -import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") +import("${nxp_sdk_build_root}/nxp_sdk.gni") openthread_nxp_root = "${chip_root}/third_party/openthread/ot-nxp" @@ -42,16 +43,16 @@ config("openthread_k32w1_config") { ] } - if (use_smu2_dynamic) { + if (nxp_use_smu2_dynamic) { defines += [ "OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1", "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0", ] } - if (chip_key_storage == "littlefs") { + if (nxp_nvm_component == "littlefs") { defines += [ "OT_PLAT_SAVE_NVM_DATA_ON_IDLE=0" ] - } else if (chip_key_storage == "nvs") { + } else if (nxp_nvm_component == "nvs") { defines += [ "CONFIG_SETTINGS_RUNTIME=1" ] } } @@ -63,7 +64,9 @@ source_set("openthread_core_config_k32w1") { ] public_configs = [ ":openthread_k32w1_config" ] - public_deps = [ nxp_sdk_target ] + if (!nxp_external_sdk) { + public_deps = [ nxp_sdk_target ] + } } source_set("libopenthread-k32w1") { @@ -82,31 +85,36 @@ source_set("libopenthread-k32w1") { if (chip_crypto == "platform") { sources += [ "${openthread_nxp_root}/src/common/crypto/ecdsa_sss.cpp" ] - if (use_hw_sha256) { + if (nxp_use_hw_sha256) { sources += [ "${openthread_nxp_root}/src/common/crypto/sha256_sss.cpp" ] } - if (use_hw_aes) { + if (nxp_use_hw_aes) { sources += [ "${openthread_nxp_root}/src/common/crypto/aes_sss.cpp" ] } - if (chip_key_storage == "fwk_nvm") { + if (nxp_nvm_component == "fwk_nvm") { sources += [ "${openthread_nxp_root}/src/common/flash_nvm.c" ] - } else if (chip_key_storage == "littlefs") { + } else if (nxp_nvm_component == "littlefs") { sources += [ "${openthread_nxp_root}/src/common/flash_fsa.c" ] - } else if (chip_key_storage == "nvs") { + } else if (nxp_nvm_component == "nvs") { sources += [ "${openthread_nxp_root}/src/common/flash_nvs.c" ] } } - if (chip_with_ot_cli == 1) { + if (nxp_enable_ot_cli) { sources += [ "${openthread_root}/examples/apps/cli/cli_uart.cpp" ] } public_deps = [ - "${nxp_sdk_build_root}:nxp_mbedtls", "../..:libopenthread-platform", "../..:libopenthread-platform-utils", - nxp_sdk_target, ] + + if (!nxp_external_sdk) { + public_deps += [ + "${nxp_sdk_build_root}:nxp_mbedtls", + nxp_sdk_target, + ] + } } diff --git a/third_party/openthread/platforms/nxp/rt/rt1060/BUILD.gn b/third_party/openthread/platforms/nxp/rt/rt1060/BUILD.gn index ef44f9048e2d25..66640702f6d709 100644 --- a/third_party/openthread/platforms/nxp/rt/rt1060/BUILD.gn +++ b/third_party/openthread/platforms/nxp/rt/rt1060/BUILD.gn @@ -57,7 +57,7 @@ config("openthread_rt1060_config") { "OT_APP_BR_LWIP_HOOKS_EN=1", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE=1", "OT_APP_CLI_EPHEMERAL_KEY_ADDON=1", @@ -103,7 +103,7 @@ source_set("libopenthread-rt1060") { "${openthread_nxp_root}/src/common/br/utils.c", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { sources += [ "${openthread_nxp_root}/examples/utils/cli_addons/addons_cli.c", "${openthread_nxp_root}/examples/utils/cli_addons/ephemeral_key/ephemeral_key_cli.c", diff --git a/third_party/openthread/platforms/nxp/rt/rt1170/BUILD.gn b/third_party/openthread/platforms/nxp/rt/rt1170/BUILD.gn index 039c911e51fa60..228f9e0814ec96 100644 --- a/third_party/openthread/platforms/nxp/rt/rt1170/BUILD.gn +++ b/third_party/openthread/platforms/nxp/rt/rt1170/BUILD.gn @@ -56,7 +56,7 @@ config("openthread_rt1170_config") { "OT_APP_BR_LWIP_HOOKS_EN=1", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE=1", "OT_APP_CLI_EPHEMERAL_KEY_ADDON=1", @@ -101,7 +101,7 @@ source_set("libopenthread-rt1170") { "${openthread_nxp_root}/src/common/br/utils.c", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { sources += [ "${openthread_nxp_root}/examples/utils/cli_addons/addons_cli.c", "${openthread_nxp_root}/examples/utils/cli_addons/ephemeral_key/ephemeral_key_cli.c", diff --git a/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn b/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn index 6c00f94b3a077e..1dbfe5e5a5f2c6 100644 --- a/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn +++ b/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn @@ -59,7 +59,7 @@ config("openthread_rw61x_config") { "OT_APP_BR_LWIP_HOOKS_EN=1", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { defines += [ "OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE=1", "OT_APP_CLI_EPHEMERAL_KEY_ADDON=1", @@ -99,7 +99,7 @@ source_set("libopenthread-rw61x") { "${openthread_nxp_root}/src/common/br/utils.c", ] - if (chip_enable_matter_cli) { + if (nxp_enable_matter_cli) { sources += [ "${openthread_nxp_root}/examples/utils/cli_addons/addons_cli.c", "${openthread_nxp_root}/examples/utils/cli_addons/ephemeral_key/ephemeral_key_cli.c",