Skip to content

Commit

Permalink
doc: nrf: replace option role with kconfig
Browse files Browse the repository at this point in the history
Kconfig options are now referenced using :kconfig: instead of :option:.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
  • Loading branch information
gmarull authored and mbolivar-nordic committed Aug 20, 2021
1 parent 0c5b11d commit fbceba8
Show file tree
Hide file tree
Showing 152 changed files with 809 additions and 816 deletions.
2 changes: 1 addition & 1 deletion applications/asset_tracker/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Alternatively, use the command line tool ``menuconfig`` or configure the options
.. external_antenna_note_start
.. note::
For nRF9160 DK v0.15.0 and later, set the :option:`CONFIG_NRF9160_GPS_ANTENNA_EXTERNAL` option to ``y`` when building the application to achieve the best external antenna performance.
For nRF9160 DK v0.15.0 and later, set the :kconfig:`CONFIG_NRF9160_GPS_ANTENNA_EXTERNAL` option to ``y`` when building the application to achieve the best external antenna performance.

.. external_antenna_note_end
Expand Down
30 changes: 15 additions & 15 deletions applications/asset_tracker_v2/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,15 @@ Check and configure the following configuration options for the application:

.. option:: CONFIG_ASSET_TRACKER_V2_APP_VERSION - Configuration for providing the application version

The application publishes its version number as a part of the static device data. The default value for the application version is ``0.0.0-development``. To configure the application version, set :option:`CONFIG_ASSET_TRACKER_V2_APP_VERSION` to the desired version.
The application publishes its version number as a part of the static device data. The default value for the application version is ``0.0.0-development``. To configure the application version, set :kconfig:`CONFIG_ASSET_TRACKER_V2_APP_VERSION` to the desired version.

.. option:: CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM - Configuration for enabling the use of custom cloud client ID

This application configuration is used to enable the use of custom client ID for the respective cloud. By default, the application uses the IMEI of the nRF9160-based device as the client ID in the cloud connection.

.. option:: CLOUD_CLIENT_ID - Configuration for providing a custom cloud client ID

This application configuration sets a custom client ID for the respective cloud. For setting a custom client ID, you need to set :option:`CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM` to ``y``.
This application configuration sets a custom client ID for the respective cloud. For setting a custom client ID, you need to set :kconfig:`CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM` to ``y``.


.. _default_config_values:
Expand Down Expand Up @@ -335,17 +335,17 @@ You can set the mandatory library-specific Kconfig options in the :file:`prj.con
Configurations for AWS IoT library
----------------------------------

* :option:`CONFIG_AWS_IOT_BROKER_HOST_NAME`
* :option:`CONFIG_AWS_IOT_SEC_TAG`
* :kconfig:`CONFIG_AWS_IOT_BROKER_HOST_NAME`
* :kconfig:`CONFIG_AWS_IOT_SEC_TAG`


Configurations for Azure IoT Hub library
----------------------------------------

* :option:`CONFIG_AZURE_IOT_HUB_DPS_HOSTNAME`
* :option:`CONFIG_AZURE_IOT_HUB_DPS_ID_SCOPE`
* :option:`CONFIG_AZURE_IOT_HUB_SEC_TAG`
* :option:`CONFIG_AZURE_FOTA_SEC_TAG`
* :kconfig:`CONFIG_AZURE_IOT_HUB_DPS_HOSTNAME`
* :kconfig:`CONFIG_AZURE_IOT_HUB_DPS_ID_SCOPE`
* :kconfig:`CONFIG_AZURE_IOT_HUB_SEC_TAG`
* :kconfig:`CONFIG_AZURE_FOTA_SEC_TAG`

.. note:
The nRF Cloud library does not require any library-specific Kconfig options to be set.
Expand All @@ -355,15 +355,15 @@ Optional library configurations

You can add the following optional configurations to configure the heap or to provide additional information such as APN to the modem for registering with an LTE network:

* :option:`CONFIG_HEAP_MEM_POOL_SIZE` - Configures the size of the heap that is used by the application when encoding and sending data to the cloud. More information can be found in :ref:`memory_allocation`.
* :option:`CONFIG_PDN_DEFAULTS_OVERRIDE` - Used for manual configuration of the APN. Set the option to ``y`` to override the default PDP context configuration.
* :option:`CONFIG_PDN_DEFAULT_APN` - Used for manual configuration of the APN. An example is ``apn.example.com``.
* :kconfig:`CONFIG_HEAP_MEM_POOL_SIZE` - Configures the size of the heap that is used by the application when encoding and sending data to the cloud. More information can be found in :ref:`memory_allocation`.
* :kconfig:`CONFIG_PDN_DEFAULTS_OVERRIDE` - Used for manual configuration of the APN. Set the option to ``y`` to override the default PDP context configuration.
* :kconfig:`CONFIG_PDN_DEFAULT_APN` - Used for manual configuration of the APN. An example is ``apn.example.com``.

The application supports Assisted GPS.
To set the source of the A-GPS data, set the following options:

* :option:`CONFIG_AGPS_SRC_SUPL` - Sets the external SUPL Client library as A-GPS data source. See the documentation on :ref:`supl_client_lib`.
* :option:`CONFIG_AGPS_SRC_NRF_CLOUD` - Sets nRF Cloud as A-GPS data source. You must set nRF Cloud as the firmware cloud backend.
* :kconfig:`CONFIG_AGPS_SRC_SUPL` - Sets the external SUPL Client library as A-GPS data source. See the documentation on :ref:`supl_client_lib`.
* :kconfig:`CONFIG_AGPS_SRC_NRF_CLOUD` - Sets nRF Cloud as A-GPS data source. You must set nRF Cloud as the firmware cloud backend.

Configuration files
===================
Expand Down Expand Up @@ -406,7 +406,7 @@ Also, the device must be provisioned and configured with the certificates accord
.. external_antenna_note_start
.. note::
For nRF9160 DK v0.15.0 and later, set the :option:`CONFIG_NRF9160_GPS_ANTENNA_EXTERNAL` option to ``y`` when building the application to achieve the best external antenna performance.
For nRF9160 DK v0.15.0 and later, set the :kconfig:`CONFIG_NRF9160_GPS_ANTENNA_EXTERNAL` option to ``y`` when building the application to achieve the best external antenna performance.

.. external_antenna_note_end
Expand Down Expand Up @@ -624,7 +624,7 @@ Following are some features that rely on dynamically allocated memory, using the
* Event manager events
* Encoding of the data that will be sent to cloud

You can configure the heap memory by using the :option:`CONFIG_HEAP_MEM_POOL_SIZE`.
You can configure the heap memory by using the :kconfig:`CONFIG_HEAP_MEM_POOL_SIZE`.
The data management module that encodes data destined for cloud is the biggest consumer of heap memory.
Therefore, when adjusting buffer sizes in the data management module, you must also adjust the heap accordingly.
This avoids the problem of running out of heap memory in worst-case scenarios.
2 changes: 1 addition & 1 deletion applications/machine_learning/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ The nRF Machine Learning application also uses the following dedicated applicati

``ei_data_forwarder_bt_nus``
The module forwards the sensor readouts over NUS to the connected Bluetooth Central.
The sensor data is forwarded only if the connection is secured and connection interval is within the limit defined by :option:`CONFIG_BT_PERIPHERAL_PREF_MAX_INT` and :option:`CONFIG_BT_PERIPHERAL_PREF_MAX_INT`.
The sensor data is forwarded only if the connection is secured and connection interval is within the limit defined by :kconfig:`CONFIG_BT_PERIPHERAL_PREF_MAX_INT` and :kconfig:`CONFIG_BT_PERIPHERAL_PREF_MAX_INT`.

``ei_data_forwarder_uart``
The module forwards the sensor readouts over UART.
Expand Down
54 changes: 27 additions & 27 deletions applications/nrf_desktop/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ The application uses dynamic allocation to:

When configuring HEAP, make sure that the values for the following options match the typical event size and the system needs:

* :option:`CONFIG_HEAP_MEM_POOL_SIZE` - The size must be big enough to handle the worst possible use case for the given device.
* :kconfig:`CONFIG_HEAP_MEM_POOL_SIZE` - The size must be big enough to handle the worst possible use case for the given device.

.. important::
The nRF Desktop uses ``k_heap`` as the backend for dynamic allocation.
Expand Down Expand Up @@ -694,7 +694,7 @@ For example, LEDs are turned off and advertising is stopped.

Moving the mouse or pressing any button wakes up the device and turns on the disabled functionalities.

You can define the amount of time after which the peripherals are suspended or powered off in :option:`CONFIG_CAF_POWER_MANAGER_TIMEOUT`.
You can define the amount of time after which the peripherals are suspended or powered off in :kconfig:`CONFIG_CAF_POWER_MANAGER_TIMEOUT`.
By default, this period is set to 120 seconds.

.. important::
Expand Down Expand Up @@ -760,7 +760,7 @@ After building the application with or without :ref:`specifying the build type <
.. note::
You can manually start the scanning for new peripheral devices by pressing the **SW1** button on the dongle for a short time.
This might be needed if the dongle does not connect with all the peripherals before timeout.
The scanning is interrupted after the amount of time predefined in :option:`CONFIG_DESKTOP_BLE_SCAN_DURATION_S`, because it negatively affects the performance of already connected peripherals.
The scanning is interrupted after the amount of time predefined in :kconfig:`CONFIG_DESKTOP_BLE_SCAN_DURATION_S`, because it negatively affects the performance of already connected peripherals.

#. Move the mouse and press any key on the keyboard.
The input is reflected on the host.
Expand Down Expand Up @@ -953,7 +953,7 @@ To use the nRF Desktop application with your custom board:
a. Ensure that the Bluetooth role is properly configured.
For mouse, it should be configured as peripheral.
#. Update the configuration related to peer control.
You can also disable the peer control using the :option:`CONFIG_DESKTOP_BLE_PEER_CONTROL` option.
You can also disable the peer control using the :kconfig:`CONFIG_DESKTOP_BLE_PEER_CONTROL` option.
Peer control details are described in the :ref:`nrf_desktop_ble_bond` documentation.

Refer to the :ref:`nrf_desktop_bluetooth_guide` section and Zephyr's :ref:`zephyr:bluetooth` page for more detailed information about the Bluetooth configuration.
Expand Down Expand Up @@ -1158,8 +1158,8 @@ Since the nRF Desktop application uses the partition manager when the bootloader

.. important::
By default, Zephyr does not use the code partition defined in the DTS files.
It is only used if :option:`CONFIG_USE_DT_CODE_PARTITION` is enabled.
If this option is disabled, the code is loaded at the address defined by :option:`CONFIG_FLASH_LOAD_OFFSET` and can spawn for :option:`CONFIG_FLASH_LOAD_SIZE` (or for the whole flash if the load size is set to zero).
It is only used if :kconfig:`CONFIG_USE_DT_CODE_PARTITION` is enabled.
If this option is disabled, the code is loaded at the address defined by :kconfig:`CONFIG_FLASH_LOAD_OFFSET` and can spawn for :kconfig:`CONFIG_FLASH_LOAD_SIZE` (or for the whole flash if the load size is set to zero).

Because the nRF Desktop application depends on the DTS layout only for configurations without the bootloader, only the settings partition is relevant in such cases and other partitions are ignored.

Expand Down Expand Up @@ -1209,13 +1209,13 @@ The nRF Desktop devices come in the following types:

* Peripheral devices (mouse or keyboard)

* Support only the Bluetooth Peripheral role (:option:`CONFIG_BT_PERIPHERAL`).
* Support only the Bluetooth Peripheral role (:kconfig:`CONFIG_BT_PERIPHERAL`).
* Handle only one Bluetooth LE connection at a time.
* Use more than one Bluetooth local identity.

* Central devices (dongle)

* Support only the Bluetooth Central role (:option:`CONFIG_BT_CENTRAL`).
* Support only the Bluetooth Central role (:kconfig:`CONFIG_BT_CENTRAL`).
* Handle multiple Bluetooth LE connections simultaneously.
* Use only one Bluetooth local identity (the default one).

Expand All @@ -1237,12 +1237,12 @@ Configuration options
This section describes the most important Bluetooth Kconfig options common for all nRF Desktop devices.
For detailed information about every option, see the Kconfig help.

* :option:`CONFIG_BT_MAX_PAIRED`
* :kconfig:`CONFIG_BT_MAX_PAIRED`

* nRF Desktop central: The maximum number of paired devices is greater than or equal to the maximum number of simultaneously connected peers.
* nRF Desktop peripheral: The maximum number of paired devices is equal to the number of peers plus one, where the one additional paired device slot is used for erase advertising.

* :option:`CONFIG_BT_ID_MAX`
* :kconfig:`CONFIG_BT_ID_MAX`

* nRF Desktop central: The device uses only one Bluetooth local identity, that is the default one.
* nRF Desktop peripheral: The number of Bluetooth local identities must be equal to the number of peers plus two.
Expand All @@ -1251,7 +1251,7 @@ For detailed information about every option, see the Kconfig help.
* The other additional local identity is the default local identity, which is unused, because it cannot be reset after removing the bond.
Without the identity reset, the previously bonded central could still try to reconnect after being removed from Bluetooth bonds on the peripheral side.

* :option:`CONFIG_BT_MAX_CONN`
* :kconfig:`CONFIG_BT_MAX_CONN`

* nRF Desktop central: Set the option to the maximum number of simultaneously connected devices.
* nRF Desktop peripheral: The default value (one) is used.
Expand All @@ -1267,22 +1267,22 @@ Link Layer configuration options

The nRF Desktop devices use one of the following Link Layers:

* :option:`CONFIG_BT_LL_SW_SPLIT`
* :kconfig:`CONFIG_BT_LL_SW_SPLIT`
This Link Layer does not support the Low Latency Packet Mode (LLPM) and has a lower memory usage, so it can be used by memory-limited devices.

* :option:`CONFIG_BT_LL_SOFTDEVICE`
* :kconfig:`CONFIG_BT_LL_SOFTDEVICE`
This Link Layer does support the Low Latency Packet Mode (LLPM).
If you opt for this Link Layer and enable the :option:`CONFIG_BT_CTLR_LLPM`, the :option:`CONFIG_CAF_BLE_USE_LLPM` is also enabled by default and can be configured further:
If you opt for this Link Layer and enable the :kconfig:`CONFIG_BT_CTLR_LLPM`, the :kconfig:`CONFIG_CAF_BLE_USE_LLPM` is also enabled by default and can be configured further:

* When :option:`CONFIG_CAF_BLE_USE_LLPM` is enabled, set the value for :option:`CONFIG_SDC_MAX_CONN_EVENT_LEN_DEFAULT` to ``3000``.
* When :kconfig:`CONFIG_CAF_BLE_USE_LLPM` is enabled, set the value for :kconfig:`CONFIG_SDC_MAX_CONN_EVENT_LEN_DEFAULT` to ``3000``.

This is required by the nRF Desktop central and helps avoid scheduling conflicts with Bluetooth Link Layer.
Such conflicts could lead to a drop in HID input report rate or a disconnection.
Setting the value to ``3000`` also enables the nRF Desktop central to exchange data with up to 2 standard Bluetooth LE peripherals during every connection interval (every 7.5 ms).

* When :option:`CONFIG_CAF_BLE_USE_LLPM` is disabled, the device will use only standard Bluetooth LE connection parameters with the lowest available connection interval of 7.5 ms.
* When :kconfig:`CONFIG_CAF_BLE_USE_LLPM` is disabled, the device will use only standard Bluetooth LE connection parameters with the lowest available connection interval of 7.5 ms.

If the LLPM is disabled and more than 2 simultaneous Bluetooth connections are supported (:option:`CONFIG_BT_MAX_CONN`), you can set the value for :option:`CONFIG_SDC_MAX_CONN_EVENT_LEN_DEFAULT` to ``2500``.
If the LLPM is disabled and more than 2 simultaneous Bluetooth connections are supported (:kconfig:`CONFIG_BT_MAX_CONN`), you can set the value for :kconfig:`CONFIG_SDC_MAX_CONN_EVENT_LEN_DEFAULT` to ``2500``.
With this value, the nRF Desktop central is able to exchange the data with up to 3 Bluetooth LE peripherals during every 7.5-ms connection interval.
Using the value of ``3000`` for more than 2 simultaneous Bluetooth LE connections will result in a lower HID input report rate.

Expand All @@ -1306,7 +1306,7 @@ Optionally, you can also enable the following module:
The module can be used only with the SoftDevice Link Layer.

.. note::
The nRF Destkop devices enable :option:`CONFIG_BT_SETTINGS`.
The nRF Destkop devices enable :kconfig:`CONFIG_BT_SETTINGS`.
When this option is enabled, the application is responsible for calling the :c:func:`settings_load` function - this is handled by the :ref:`nrf_desktop_settings_loader`.

.. _nrf_desktop_bluetooth_guide_peripheral:
Expand All @@ -1320,7 +1320,7 @@ The HID over GATT profile specification requires Bluetooth Peripherals to define

* HID Service - Handled in the :ref:`nrf_desktop_hids`.
* Battery Service - Handled in the :ref:`nrf_desktop_bas`.
* Device Information Service - Implemented in Zephyr and enabled with :option:`CONFIG_BT_DIS`.
* Device Information Service - Implemented in Zephyr and enabled with :kconfig:`CONFIG_BT_DIS`.
It can be configured using Kconfig options with the ``CONFIG_BT_DIS`` prefix.

The nRF Desktop peripherals must also define a dedicated GATT Service, which is used to provide the following information:
Expand Down Expand Up @@ -1399,25 +1399,25 @@ The nRF Desktop application can use one of the following bootloaders:
Configuring the B0 bootloader
-----------------------------

To enable the B0 bootloader, select the :option:`CONFIG_SECURE_BOOT` Kconfig option.
To enable the B0 bootloader, select the :kconfig:`CONFIG_SECURE_BOOT` Kconfig option.

The B0 bootloader requires the following options enabled:

* :option:`CONFIG_SB_SIGNING_KEY_FILE` - Required for providing the signature used for image signing and verification.
* :option:`CONFIG_FW_INFO` - Required for the application versioning information.
* :option:`CONFIG_FW_INFO_FIRMWARE_VERSION` - Enable this option to set the version of the application after you enabled :option:`CONFIG_FW_INFO`.
* :option:`CONFIG_BUILD_S1_VARIANT` - Required for the build system to be able to construct the application binaries for both application's slots in flash memory.
* :kconfig:`CONFIG_SB_SIGNING_KEY_FILE` - Required for providing the signature used for image signing and verification.
* :kconfig:`CONFIG_FW_INFO` - Required for the application versioning information.
* :kconfig:`CONFIG_FW_INFO_FIRMWARE_VERSION` - Enable this option to set the version of the application after you enabled :kconfig:`CONFIG_FW_INFO`.
* :kconfig:`CONFIG_BUILD_S1_VARIANT` - Required for the build system to be able to construct the application binaries for both application's slots in flash memory.

Configuring the MCUboot bootloader
----------------------------------

To enable the MCUboot bootloader, select the :option:`CONFIG_BOOTLOADER_MCUBOOT` Kconfig option.
To enable the MCUboot bootloader, select the :kconfig:`CONFIG_BOOTLOADER_MCUBOOT` Kconfig option.

Configure the MCUboot bootloader with the following options:

* ``CONFIG_BOOT_SIGNATURE_KEY_FILE`` - This option defines the path to the private key that is used to sign the application and that is used by the bootloader to verify the application signature.
The key must be defined only in the MCUboot bootloader configuration file.
* :option:`CONFIG_IMG_MANAGER` and :option:`CONFIG_MCUBOOT_IMG_MANAGER` - These options allow the application to manage the DFU image.
* :kconfig:`CONFIG_IMG_MANAGER` and :kconfig:`CONFIG_MCUBOOT_IMG_MANAGER` - These options allow the application to manage the DFU image.
Enable both of them only for configurations that support :ref:`background DFU <nrf_desktop_bootloader_background_dfu>`.
For these configurations, the :ref:`nrf_desktop_dfu` uses the provided API to request firmware upgrade and confirm the running image.

Expand Down Expand Up @@ -1448,7 +1448,7 @@ The update image is generated in the build directory when building the firmware

.. note::
By default, the build process for the B0 bootloader will construct an image for the first slot (slot 0 or S0).
To ensure that application is built for both slots, select the :option:`CONFIG_BUILD_S1_VARIANT` Kconfig option.
To ensure that application is built for both slots, select the :kconfig:`CONFIG_BUILD_S1_VARIANT` Kconfig option.

When this option is selected, the :file:`zephyr/dfu_application.zip` contains both images.
The update tool checks if the currently running image runs from either slot 0 or slot 1.
Expand Down
4 changes: 2 additions & 2 deletions applications/nrf_desktop/doc/bas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Module events
Configuration
*************

The module is enabled with the :option:`CONFIG_DESKTOP_BAS_ENABLE` option.
The option is selected by :option:`CONFIG_DESKTOP_HID_PERIPHERAL` -- Battery Service is required for the HID peripheral device.
The module is enabled with the :kconfig:`CONFIG_DESKTOP_BAS_ENABLE` option.
The option is selected by :kconfig:`CONFIG_DESKTOP_HID_PERIPHERAL` -- Battery Service is required for the HID peripheral device.

Implementation details
**********************
Expand Down
Loading

0 comments on commit fbceba8

Please sign in to comment.