|
5 | 5 | You can add support for the nRF21540 front-end module to the sample. |
6 | 6 | See :ref:`ug_radio_fem` for more information. |
7 | 7 |
|
8 | | -To add support for the nRF21540 FEM, add the provided :file:`dts-nrf21540-fem.overlay` devicetree overlay file when building. |
9 | | -The file is located in the |fem_file_path| folder. |
10 | | -Make sure that the GPIOs in the file correspond to those in which your front-end module is connected. |
11 | | - |
12 | | -.. note:: |
13 | | - You must add the provided overlay file if you use the nRF21540 EK. |
14 | | - If you use the nRF21540 DK, build your application for the :ref:`nrf21540dk_nrf52840 <zephyr:nrf21540dk_nrf52840>` board. |
15 | | - The devicetree for the nRF21540 DK already contains the required FEM configuration, so you do not need to add the overlay file. |
| 8 | +To add support for the nRF21540 FEM, build the sample for a board containing nRF21540 FEM like nrf21540dk_nrf52840 or create a devicetree overlay file describing how FEM is connected to nRF5 SoC in your device. |
16 | 9 |
|
17 | 10 | See :ref:`zephyr:set-devicetree-overlays` for different ways of adding the overlay file. |
18 | 11 |
|
19 | | -The easiest way to add the file when building is to set it in the ``DTC_OVERLAY_FILE`` variable. |
20 | | -However, doing so will override the default settings. |
21 | | -For some boards, this sample requires additional overlay files, which are automatically included when building with the default settings. |
22 | | -When you set the ``DTC_OVERLAY_FILE`` variable, you must specify all overlay files that are needed for building. |
23 | | -Check the :file:`boards` folder to see the additional overlay files. |
| 12 | +.. note:: |
| 13 | + If you use the nRF21540 EK, append ``nrf21540_ek`` shield to your build command instructing build system to append the appropriate devicetree overlay file. |
24 | 14 |
|
25 | | -Follow the instructions in :ref:`cmake_options` to specify the ``DTC_OVERLAY_FILE`` variable. |
26 | 15 | For example, to build the sample from the command line for an nRF52833 DK with an attached nRF21540 EK, invoke the following command within the sample directory: |
27 | 16 |
|
28 | 17 | .. code-block:: console |
29 | 18 |
|
30 | | - west build -b nrf52833dk_nrf52833 -- -DDTC_OVERLAY_FILE="boards/nrf52833dk_nrf52833.overlay;../common/dts-nrf21540-fem.overlay" |
31 | | - |
32 | | -Alternatively, you can copy the contents of :file:`dts-nrf21540-fem.overlay` to the board's overlay file. |
| 19 | + west build -b nrf52833dk_nrf52833 -- -DSHIELD=nrf21540_ek |
33 | 20 |
|
34 | | -To add support for other front-end modules, add the respective overlay files in the same way. |
| 21 | +To add support for other front-end modules, add the respective devicetree file entries to the board devicetree file or a devicetree overlay file. |
0 commit comments