Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[NXP] Update gn args naming #36294

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/nxp/chip-cmake-freertos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions docs/platforms/nxp/nxp_manufacturing_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion docs/platforms/nxp/nxp_mcxw71_ota_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions examples/all-clusters-app/nxp/rt/rt1060/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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)

<a name="manufacturing"></a>
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions examples/all-clusters-app/nxp/rt/rt1170/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions examples/all-clusters-app/nxp/rt/rw61x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -157,16 +157,16 @@ 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\"`
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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/contact-sensor-app/nxp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion examples/contact-sensor-app/nxp/k32w0/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions examples/contact-sensor-app/nxp/k32w0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/contact-sensor-app/nxp/k32w0/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading