Skip to content

Commit fe5ddda

Browse files
[NXP] Update gn args naming (#36294)
* [nxp][common] Update gn args after name change Signed-off-by: marius-alex-tache <marius.tache@nxp.com> * [nxp] Bump nxp_matter_support Signed-off-by: marius-alex-tache <marius.tache@nxp.com> * Restyled by gn * Restyled by prettier-markdown * [nxp] Fix rt1060 arg Signed-off-by: marius-alex-tache <marius.tache@nxp.com> * [nxp] Fix rt1170 arg Signed-off-by: marius-alex-tache <marius.tache@nxp.com> --------- Signed-off-by: marius-alex-tache <marius.tache@nxp.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 7df7676 commit fe5ddda

File tree

67 files changed

+263
-269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+263
-269
lines changed

config/nxp/chip-cmake-freertos/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ endif()
4444
# ==============================================================================
4545
matter_add_gn_arg_string("nxp_nvm_component" ${CONFIG_CHIP_NVM_COMPONENT})
4646
matter_add_gn_arg_string("nxp_platform" ${CONFIG_CHIP_NXP_PLATFORM})
47-
matter_add_gn_arg("chip_with_factory_data" ${CONFIG_CHIP_FACTORY_DATA})
48-
matter_add_gn_arg("chip_enable_secure_dac_private_key_storage" ${CONFIG_CHIP_SECURE_DAC_PRIVATE_KEY_STORAGE})
49-
matter_add_gn_arg("chip_enable_secure_whole_factory_data" ${CONFIG_CHIP_ENABLE_SECURE_WHOLE_FACTORY_DATA})
50-
matter_add_gn_arg_bool("chip_enable_matter_cli" CONFIG_CHIP_LIB_SHELL)
47+
matter_add_gn_arg_bool("nxp_use_factory_data" ${CONFIG_CHIP_FACTORY_DATA})
48+
matter_add_gn_arg_bool("nxp_enable_secure_dac_private_key_storage" ${CONFIG_CHIP_SECURE_DAC_PRIVATE_KEY_STORAGE})
49+
matter_add_gn_arg_bool("nxp_enable_secure_whole_factory_data" ${CONFIG_CHIP_ENABLE_SECURE_WHOLE_FACTORY_DATA})
50+
matter_add_gn_arg_bool("nxp_enable_matter_cli" CONFIG_CHIP_LIB_SHELL)
5151
matter_add_gn_arg_bool("chip_enable_pairing_autostart" CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART)
5252

5353
if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE)

docs/platforms/nxp/nxp_manufacturing_flow.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Here is the interpretation of the **optional** parameters:
148148

149149
## 4. Build app and usage
150150

151-
Use `chip_with_factory_data=1` when compiling to enable factory data usage.
151+
Use `nxp_use_factory_data=true` when compiling to enable factory data usage.
152152

153153
Run chip-tool with a new PAA:
154154

@@ -177,7 +177,7 @@ Implementation of manufacturing data provisioning has been validated using test
177177
certificates generated by `OpenSSL 1.1.1l`.
178178

179179
Also, demo **DAC**, **PAI** and **PAA** certificates needed in case
180-
`chip_with_factory_data=1` is used can be found in
180+
`nxp_use_factory_data=true` is used can be found in
181181
`./scripts/tools/nxp/demo_generated_certs`.
182182

183183
## 6. Increased security for DAC private key
@@ -207,7 +207,7 @@ python3 ./scripts/tools/nxp/factory_data_generator/generate.py -i 10000 -s UXKLz
207207
There is no need for an extra binary.
208208

209209
- Write factory data binary.
210-
- Build the application with `chip_with_factory_data=1` set.
210+
- Build the application with `nxp_use_factory_data=true` set.
211211
- Write the application to the board and use it as usual.
212212

213213
Factory data should now contain a corresponding encrypted blob instead of the
@@ -236,19 +236,19 @@ Supported platforms:
236236

237237
there are three implementations for factory data protection
238238

239-
- whole factory data protection with AES encryption ( chip_with_factory_data=1
240-
chip_enable_secure_whole_factory_data=true )
239+
- whole factory data protection with AES encryption (
240+
nxp_use_factory_data=true nxp_enable_secure_whole_factory_data=true )
241241
`examples/platform/nxp/rt/rw61x/factory_data/source/AppFactoryDataExample.cpp`\
242242
`src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.cpp`
243243

244-
- only dac private key protection ( chip_with_factory_data=1
245-
chip_enable_secure_dac_private_key_storage=true )
244+
- only dac private key protection ( nxp_use_factory_data=true
245+
nxp_enable_secure_dac_private_key_storage=true )
246246
`examples/platform/nxp/rt/rw61x/factory_data/source/AppFactoryDataExample.cpp`
247247
\
248248
`src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp`
249249

250250
- whole factory data protection with hard-coded AES key (
251-
chip_with_factory_data=1 )
251+
nxp_use_factory_data=true )
252252
`examples/platform/nxp/common/factory_data/source/AppFactoryDataDefaultImpl.cpp`
253253
\
254254
`src/platform/nxp/common/factory_data/FactoryDataProviderFwkImpl.cpp`

docs/platforms/nxp/nxp_mcxw71_ota_guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ version.
6161
A user can update the factory data through OTA, at the same time the application
6262
firmware is updated by enabling the following processor in the `gn args`:
6363

64-
- `chip_enable_ota_factory_data_processor=1` to enable default factory data
64+
- `nxp_enable_ota_factory_data_processor=true` to enable default factory data
6565
update processor (disabled by default).
6666

6767
The OTA image used must be updated to include the new factory data.

examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ rt_executable("all_cluster_app") {
167167
"${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp",
168168
]
169169

170-
if (chip_enable_matter_cli) {
170+
if (nxp_enable_matter_cli) {
171171
defines += [ "ENABLE_CHIP_SHELL" ]
172172
deps += [
173173
"${chip_root}/examples/shell/shell_common:shell_common",

examples/all-clusters-app/nxp/rt/rt1060/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,14 @@ thermostat application for now.
393393
- Build Matter with Border Router configuration with ble-wifi commissioning:
394394

395395
```
396-
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
396+
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
397397
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug
398398
```
399399

400400
- Build Matter with Border Router configuration with onnetwork commissioning:
401401

402402
```
403-
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
403+
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
404404
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug
405405
```
406406

@@ -419,15 +419,15 @@ Optional GN options that can be added when building an application:
419419
Wifi + OpenThread Border Router configuration. Note that is only supported
420420
on the on the thermostat application for now.
421421
- To enable the [matter CLI](README.md#matter-shell), the argument
422-
`chip_enable_matter_cli=true` must be added to the _gn gen_ command.
422+
`nxp_enable_matter_cli=true` must be added to the _gn gen_ command.
423423
- To build the application in debug mode, the argument
424424
`is_debug=true optimize_debug=false` must be added to the _gn gen_ command.
425425
- By default, the MIMXRT1060-EVK-B will be chosen. To switch to an
426426
MIMXRT1060-EVK, the argument `evkname=\"evkmimxrt1060\"` must be added to
427427
the _gn gen_ command.
428428
- To build with the option to have Matter certificates/keys pre-loaded in a
429-
specific flash area the argument `chip_with_factory_data=1` must be added to
430-
the _gn gen_ command. For more information, see
429+
specific flash area the argument `nxp_use_factory_data=true` must be added
430+
to the _gn gen_ command. For more information, see
431431
[Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md)
432432

433433
<a name="manufacturing"></a>

examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ rt_executable("all_cluster_app") {
153153
"${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp",
154154
]
155155

156-
if (chip_enable_matter_cli) {
156+
if (nxp_enable_matter_cli) {
157157
defines += [ "ENABLE_CHIP_SHELL" ]
158158
deps += [
159159
"${chip_root}/examples/shell/shell_common:shell_common",

examples/all-clusters-app/nxp/rt/rt1170/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ thermostat application for now.
218218
(ble-wifi) :
219219

220220
```
221-
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
221+
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
222222
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1170$ ninja -C out/debug
223223
```
224224

@@ -238,13 +238,13 @@ Optional GN options that can be added when building an application:
238238
on the on the thermostat application for now.
239239
- To enable the
240240
[matter CLI](#testing-the-all-clusters-application-with-matter-cli-enabled),
241-
the argument `chip_enable_matter_cli=true` must be added to the _gn gen_
241+
the argument `nxp_enable_matter_cli=true` must be added to the _gn gen_
242242
command.
243243
- To build the application in debug mode, the argument
244244
`is_debug=true optimize_debug=false` must be added to the _gn gen_ command.
245245
- To build with the option to have Matter certificates/keys pre-loaded in a
246-
specific flash area the argument `chip_with_factory_data=1` must be added to
247-
the _gn gen_ command. For more information, see
246+
specific flash area the argument `nxp_use_factory_data=true` must be added
247+
to the _gn gen_ command. For more information, see
248248
[Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md)
249249
- To build the application with the OTA Requestor enabled, the arguments
250250
`chip_enable_ota_requestor=true no_mcuboot=false` must be added to the _gn

examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn

+6-6
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ rt_sdk("sdk") {
5656
defines = []
5757

5858
# To be moved, temporary mbedtls config fix to build app with factory data
59-
if (chip_enable_secure_dac_private_key_storage ||
60-
chip_enable_secure_whole_factory_data) {
59+
if (nxp_enable_secure_dac_private_key_storage ||
60+
nxp_enable_secure_whole_factory_data) {
6161
defines += [
6262
"MBEDTLS_NIST_KW_C",
6363
"MBEDTLS_PSA_CRYPTO_CLIENT",
@@ -141,10 +141,10 @@ rt_executable("all_cluster_app") {
141141
"../../common/main/main.cpp",
142142
]
143143

144-
if (chip_enable_secure_dac_private_key_storage ||
145-
chip_enable_secure_whole_factory_data) {
144+
if (nxp_enable_secure_dac_private_key_storage ||
145+
nxp_enable_secure_whole_factory_data) {
146146
sources += [ "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp" ]
147-
if (chip_enable_secure_whole_factory_data) {
147+
if (nxp_enable_secure_whole_factory_data) {
148148
defines += [ "ENABLE_SECURE_WHOLE_FACTORY_DATA" ]
149149
}
150150
} else {
@@ -184,7 +184,7 @@ rt_executable("all_cluster_app") {
184184
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
185185
]
186186

187-
if (chip_enable_matter_cli) {
187+
if (nxp_enable_matter_cli) {
188188
defines += [ "ENABLE_CHIP_SHELL" ]
189189
deps += [
190190
"${chip_root}/examples/shell/shell_common:shell_common",

examples/all-clusters-app/nxp/rt/rw61x/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ thermostat application for now.
137137
(ble-wifi) :
138138

139139
```
140-
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
140+
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
141141
user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ ninja -C out/debug
142142
```
143143

@@ -157,16 +157,16 @@ Optional GN options that can be added when building an application:
157157
on the on the thermostat application for now.
158158
- To enable the
159159
[matter CLI](README.md#testing-the-all-clusters-application-with-matter-cli-enabled),
160-
the argument `chip_enable_matter_cli=true` must be added to the _gn gen_
160+
the argument `nxp_enable_matter_cli=true` must be added to the _gn gen_
161161
command.
162162
- By default, the `NXP RD-RW612-BGA` board revision will be chosen. To switch
163163
to `NXP FRDM-RW612` board revision, the argument `board_version=\"frdm\"`
164164
must be added to the _gn gen_ command.
165165
- To build the application in debug mode, the argument
166166
`is_debug=true optimize_debug=false` must be added to the _gn gen_ command.
167167
- To build with the option to have Matter certificates/keys pre-loaded in a
168-
specific flash area the argument `chip_with_factory_data=1` must be added to
169-
the _gn gen_ command. (for more information see
168+
specific flash area the argument `nxp_use_factory_data=true` must be added
169+
to the _gn gen_ command. (for more information see
170170
[Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md).
171171
- To build the application with the OTA Requestor enabled, the arguments
172172
`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.
187187
Using DAC private key secure usage: Experimental feature, contain some
188188
limitation: potential concurrent access issue during sign with dac key operation
189189
due to the lack of protection between multiple access to `ELS` crypto module.
190-
The argument `chip_enable_secure_dac_private_key_storage=1` must be added to the
191-
_gn gen_ command to enable secure private DAC key usage with S50.
192-
`chip_with_factory_data=1` must have been added to the _gn gen_ command
190+
The argument `nxp_enable_secure_dac_private_key_storage=true` must be added to
191+
the _gn gen_ command to enable secure private DAC key usage with S50.
192+
`nxp_use_factory_data=true` must have been added to the _gn gen_ command
193193

194194
DAC private key generation: The argument `chip_convert_dac_private_key=1` must
195195
be added to the _gn gen_ command to enable DAC private plain key conversion to
196-
blob with S50. `chip_enable_secure_dac_private_key_storage=1` must have been
196+
blob with S50. `nxp_enable_secure_dac_private_key_storage=1` must have been
197197
added to the _gn gen_ command
198198

199199
`ELS` contain concurrent access risks. They must be fixed before enabling it by

examples/contact-sensor-app/nxp/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ corresponding to data model target.
133133
134134
### Manufacturing data
135135
136-
Use `chip_with_factory_data=1` in the gn build command to enable factory data.
136+
Use `nxp_use_factory_data=true` in the gn build command to enable factory data.
137137
138138
For a full guide on manufacturing flow, please see
139139
[Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md).
@@ -181,9 +181,9 @@ will be very low.
181181
In order to build with low power support, the following gn args must be used:
182182
183183
```
184-
chip_with_low_power = 1
184+
nxp_use_low_power = true
185185
chip_openthread_ftd = false
186-
chip_with_ot_cli = 0
186+
nxp_enable_ot_cli = false
187187
chip_logging = false
188188
```
189189

examples/contact-sensor-app/nxp/k32w0/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ k32w0_executable("contact_sensor_app") {
100100
"main/main.cpp",
101101
]
102102

103-
if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) {
103+
if (nxp_use_factory_data && use_custom_factory_provider == 1) {
104104
sources += [
105105
"${k32w0_platform_dir}/common/CustomFactoryDataProvider.cpp",
106106
"${k32w0_platform_dir}/common/CustomFactoryDataProvider.h",

examples/contact-sensor-app/nxp/k32w0/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ Also, in case the OM15082 Expansion Board is not attached to the DK6 board, the
243243
build argument (chip_with_OM15082) inside the gn build instruction should be set
244244
to zero. The argument chip_with_OM15082 is set to zero by default.
245245

246-
In case that Openthread CLI is needed, chip_with_ot_cli build argument must be
247-
set to 1.
246+
In case that Openthread CLI is needed, `nxp_enable_ot_cli` build argument must
247+
be set to `true`.
248248

249249
In case the board doesn't have 32KHz crystal fitted, one can use the 32KHz free
250250
running oscillator as a clock source. In this case one must set the use_fro_32k
@@ -371,10 +371,10 @@ CHIPProjectConfig.h.
371371
Regarding factory data provider, there are two options:
372372

373373
- use the default factory data provider: `FactoryDataProviderImpl` by setting
374-
`chip_with_factory_data=1` in the gn build command.
374+
`nxp_use_factory_data=true` in the gn build command.
375375
- use a custom factory data provider: please see
376376
[Guide for implementing a custom factory data provider](../../../platform/nxp/k32w0/doc/CustomFactoryDataProvider.md).
377-
This can be enabled when `chip_with_factory_data=1` by setting
377+
This can be enabled when `nxp_use_factory_data=true` by setting
378378
`use_custom_factory_provider=1` in the gn build command.
379379

380380
## Flashing and debugging
@@ -697,9 +697,9 @@ factory data TLV value.
697697

698698
A user can select which default processors to enable:
699699

700-
- `chip_enable_ota_firmware_processor=1` to enable default firmware (app/SSBL)
701-
update processor (enabled by default).
702-
- `chip_enable_ota_factory_data_processor=1` to enable default factory data
700+
- `nxp_enable_ota_firmware_processor=true` to enable default firmware
701+
(app/SSBL) update processor (enabled by default).
702+
- `nxp_enable_ota_factory_data_processor=true` to enable default factory data
703703
update processor (disabled by default).
704704

705705
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
799799
that the board will go in a deep power down mode most of the time and the power
800800
consumption will be very low.
801801

802-
In order to build with low power support, the _chip_with_low_power=1_ must be
802+
In order to build with low power support, the _nxp_use_low_power=true_ must be
803803
provided to the build system. In this case, please note that the GN build
804-
arguments _chip_with_OM15082_ and _chip_with_ot_cli_ must be set to 0 and
804+
arguments _chip_with_OM15082_ and _nxp_enable_ot_cli_ must be set to false and
805805
_chip_logging_ must be set to false to disable logging.
806806

807807
In order to maintain a low power consumption, the LEDs showing the state of the

examples/contact-sensor-app/nxp/k32w0/args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ is_debug = false
3535

3636
chip_crypto = "platform"
3737
chip_crypto_flavor = "NXP-Ultrafast-P256"
38-
chip_with_ot_cli = 0
38+
nxp_enable_ot_cli = false
3939
chip_with_OM15082 = 1
4040
chip_pw_tokenizer_logging = true

examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
#define configUSE_PREEMPTION 1
4343

44-
#if defined(chip_with_low_power) && (chip_with_low_power == 1)
44+
#if defined(nxp_use_low_power) && (nxp_use_low_power == 1)
4545
#define configUSE_TICKLESS_IDLE 1
4646
#else
4747
#define configUSE_TICKLESS_IDLE 0

0 commit comments

Comments
 (0)