Skip to content

Commit

Permalink
[nrf noup] Align factory data guide to sysbuild
Browse files Browse the repository at this point in the history
- Aligned all kconfigs to the new provided by sysbuild.
  • Loading branch information
ArekBalysNordic committed Jun 7, 2024
1 parent 5a2937c commit 2048e70
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions docs/guides/nrfconnect_factory_data_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ For example, the build command for the nRF52840 DK could look like this:
```
$ west build -b nrf52840dk_nrf52840 -- \
-DCONFIG_CHIP_FACTORY_DATA=y \
-DCONFIG_CHIP_FACTORY_DATA_BUILD=y \
-DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y \
-DCONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES=y
```
Expand Down Expand Up @@ -778,15 +778,17 @@ is to use the nRF Connect platform build system that creates factory data
content automatically using Kconfig options and includes the content in the
final firmware binary.
Warning, from NCS 2.7.0 release if you modify any of the factory data-related Kconfig option you need to build a Matter sample with the pristine option to clear the CMake cache or clear the cache manually.
To enable generating the factory data set automatically, go to the example's
directory and build the example with the following option (replace
`nrf52840dk_nrf52840` with your board name):
```
$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y -DCONFIG_CHIP_FACTORY_DATA_BUILD=y
$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y -DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y
```
Alternatively, you can also add `CONFIG_CHIP_FACTORY_DATA_BUILD=y` Kconfig
Alternatively, you can also add `SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y` Kconfig
setting to the example's `prj.conf` file.
Each factory data parameter has a default value. These are described in the
Expand All @@ -802,7 +804,7 @@ them as an additional option for the west command. For example (replace
`nrf52840dk_nrf52840` with own board name):
```
$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y --DCONFIG_CHIP_FACTORY_DATA_BUILD=y --DCONFIG_CHIP_DEVICE_DISCRIMINATOR=0xF11
$ west build -b nrf52840dk_nrf52840 -- -DCONFIG_CHIP_FACTORY_DATA=y --DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y --DCONFIG_CHIP_DEVICE_DISCRIMINATOR=0xF11
```
Alternatively, you can add the relevant Kconfig option lines to the example's
Expand Down Expand Up @@ -922,26 +924,26 @@ Another way to program the factory data to a device is to use the nRF Connect
platform build system described in
[Building an example with factory data](#building-an-example-with-factory-data),
and build an example with the additional option
`-DCONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y`:
`-DSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y`:
```
$ west build -b nrf52840dk_nrf52840 -- \
-DCONFIG_CHIP_FACTORY_DATA=y \
-DCONFIG_CHIP_FACTORY_DATA_BUILD=y \
-DCONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y
-DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y \
-DSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y
```
You can also build an example with auto-generation of new CD, DAC and PAI
certificates. The newly generated certificates will be added to factory data set
automatically. To generate new certificates disable using default certificates
by building an example with the additional option
`-DCHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n`:
`-DCONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n`:
```
$ west build -b nrf52840dk_nrf52840 -- \
-DCONFIG_CHIP_FACTORY_DATA=y \
-DCONFIG_CHIP_FACTORY_DATA_BUILD=y \
-DCONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y \
-DSB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y \
-DSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWARE=y \
-DCONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n
```
Expand Down

0 comments on commit 2048e70

Please sign in to comment.