Skip to content

Commit 2442519

Browse files
committed
doc: custom board programming guide
Added a new section to the Application Development that covers development with custom boards. The section includes a new page about how to connect custom board hardware for programming. NCSDK-28526. Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
1 parent 8b79d37 commit 2442519

File tree

9 files changed

+160
-4
lines changed

9 files changed

+160
-4
lines changed

doc/_utils/redirects.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
("config_and_build/board_support/index", "app_dev/board_support/index"),
5959
("config_and_build/board_support/board_names", "app_dev/board_support/board_names"), # Board names
6060
("config_and_build/board_support/processing_environments", "app_dev/board_support/processing_environments"), # Processing environments
61-
("config_and_build/board_support/defining_custom_board", "app_dev/board_support/defining_custom_board"), # Defining custom board
6261
("gs_modifying", "app_dev/config_and_build/index"), # Configuring and building (landing)
6362
("getting_started/modifying", "app_dev/config_and_build/index"),
6463
("config_and_build/modifying", "app_dev/config_and_build/index"),
@@ -262,6 +261,7 @@
262261
("device_guides/fem/fem_incomplete_connections", "app_dev/device_guides/fem/fem_incomplete_connections"), # Use case of incomplete physical connections to the FEM module
263262
("device_guides/fem/fem_power_models", "app_dev/device_guides/fem/fem_power_models"), # Using FEM power models
264263
("device_guides/fem/21540ek_dev_guide", "app_dev/device_guides/fem/21540ek_dev_guide"), # Developing with the nRF21540 EK
264+
("config_and_build/board_support/defining_custom_board", "app_dev/device_guides/custom/defining_custom_board"), # Defining custom board
265265
("ug_radio_coex", "app_dev/device_guides/wifi_coex"), # Coexistence of short-range radio and other radios
266266
("app_dev/wifi_coex/index", "app_dev/device_guides/wifi_coex"),
267267
("device_guides/wifi_coex", "app_dev/device_guides/wifi_coex"),

doc/_zoomin/ncs.tags.yml

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ mapping_topics:
233233
- nrf/app_dev/device_guides/fem/*.html: ["fem", "nrf21540", "evaluation-kits", "development-kits"]
234234
- nrf/app_dev/device_guides/wifi_coex.html: ["kconfig", "ble", "nrf70-series", "nrf7002",
235235
"nrf7001", "nrf7000", "wifi"]
236+
- nrf/app_dev/device_guides/custom/*.html: ["development-kits"]
236237
- nrf/test_and_optimize.html: ["nrf91-series", "nrf70-series", "nrf54-series", "nrf53-series",
237238
"nrf52-series", "nrf7002", "nrf7001", "nrf7000", "nrf9160",
238239
"thingy91", "thingy91x", "nrf9161", "nrf9151", "nrf9131",

doc/nrf/app_dev.rst

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ For detailed integration instructions of specific technologies and components, c
3535
app_dev/device_guides/thingy53/index
3636
app_dev/device_guides/pmic/index
3737
app_dev/device_guides/fem/index
38+
app_dev/device_guides/custom/index
3839
app_dev/device_guides/wifi_coex

doc/nrf/app_dev/board_support/defining_custom_board.rst doc/nrf/app_dev/device_guides/custom/defining_custom_board.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ Defining custom board
77
:local:
88
:depth: 2
99

10-
Defining your own board is a very common step in application development, because applications are typically designed to run on boards that are not directly supported by the |NCS|, and are often custom designs not available publicly.
10+
Defining your own board is a very common step in application development, because applications are typically designed to run on boards that are not directly supported by the |NCS| and these boards are often custom designs not available publicly.
11+
12+
This page lists resources about defining custom board files in the |NCS|.
13+
To read about how to program a custom board, see :ref:`programming_custom_board`.
14+
15+
.. note::
16+
If you want to go through a dedicated training related to some of the topics covered here, enroll in the `nRF Connect SDK Intermediate course`_ in the `Nordic Developer Academy`_. The `Lesson 3 – Adding custom board support` shows how to add custom board support using the |nRFVSC|.
1117

1218
Guidelines for custom boards
1319
****************************
@@ -20,7 +26,7 @@ To define your own board, you can use the following Zephyr guides as reference,
2026
Adding a custom board in the |nRFVSC|
2127
*************************************
2228

23-
The |nRFVSC| lets you add your own boards to your |NCS| project.
29+
|nRFVSC| lets you add your own boards to your |NCS| project.
2430
Read the `How to work with boards and devices`_ page in the extension documentation for detailed steps.
2531

2632
Application porting guides
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _ug_custom_board:
2+
3+
Developing with custom boards
4+
#############################
5+
6+
.. |nrf_series| replace:: custom boards
7+
8+
.. include:: /includes/guides_complementary_to_app_dev.txt
9+
10+
Custom boards are hardware designs that are not directly provided or supported by Nordic Semiconductor.
11+
These are typically third-party boards that use Nordic Semiconductor Systems on Chip (SoCs) for custom project needs.
12+
13+
The following sections provide information on how to work with custom boards in the |NCS|.
14+
15+
.. toctree::
16+
:maxdepth: 2
17+
:caption: Subpages:
18+
19+
defining_custom_board
20+
programming_custom_board
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
To program a custom board using Nordic Semiconductor chips, you'll need to follow these general steps:
2+
3+
1. Create a custom board definition in the nRF Connect SDK. This involves creating the necessary board files and configurations.
4+
5+
2. Set up the hardware connections for programming. You'll need to connect the custom board to a debug probe that supports SWD (Serial Wire Debug) interface.
6+
7+
3. Use the nRF Connect Programmer app or other compatible programming tools to flash your application to the custom board.
8+
9+
Here's a more detailed breakdown:
10+
11+
1. Creating a custom board definition:
12+
- Create a new directory for your custom board files
13+
- Define the board in the necessary files (devicetree, Kconfig, etc.)
14+
- Point the build system to your custom board root directory
15+
16+
You can find detailed instructions on creating custom board files in the [nRF Connect SDK Intermediate course](https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/).
17+
18+
2. Hardware connections:
19+
Connect your custom board to a debug probe (like a Development Kit or a dedicated debug adapter) using the SWD interface. The typical connections needed are:
20+
- SWDCLK
21+
- SWDIO
22+
- GND
23+
- VDD (optional, for powering the board)
24+
- RESET (optional)
25+
26+
Programming and debugging the nRF5x on our Developments kits is straight forward. Doing the same when you are using other boards might not be so easy. In this blog post we will explain which components are needed in order to program and debug a nRF5x chip.
27+
28+
The nRF chip is connected to a Debug unit through an interface called "Serial Wire Debug", or "SWD" for short. The debug unit acts as a bridge between the chip and your PC. It communicates with the programming and debugging software on your PC through a “Debug interface”. Your PC must have a driver for the debug unit and debug interface you are using. The driver allows your PC to recognize the debug unit, and allows communication between them over USB.
29+
30+
When developing applications on a nRF5x Development Kit, you can program it by simply connecting it to your PC with a USB cable. This is possible because the Development Kit has an on-board debug unit supporting the JLINK debug interface.
31+
32+
Since the on-board debug unit is able to program and debug the on-board chip, it is also able to program any other nRF5x chip. The Development Kit has headers where you can access the Serial Wire Debug pins. The video below describes how connect these headers to a custom board. You can also see section 5.1 of the nRF51 User Guide for more information about the debug out headers.
33+
34+
If you do not have a nRF5x Development Kit, you can always use a dedicated debug adapter. There exist several manufacturers and debug interfaces. With the nRF5x series, it is common to use JLINK debug adapters from Segger. You can also use debug units using other debug interfaces like the CMSIS-DAP interface, as long as you have the proper drivers and software on your PC. If you are having any problems, stop by our Developer Zone forum or support portal, where my colleagues and I will do our best to help you out.
35+
36+
3. Programming:
37+
Use the nRF Connect Programmer app to flash your application. The general steps are:
38+
- Open nRF Connect for Desktop and launch the Programmer app
39+
- Connect your board and select it from the device list
40+
- Add your application's HEX file
41+
- Click "Write" to program the board
42+
43+
Detailed instructions can be found in the [Programming devices documentation](https://docs.nordicsemi.com/bundle/nrf-connect-programmer/page/programming_dk.html#programming-devices).
44+
45+
Remember to ensure that your custom board is properly powered and that all connections are secure before attempting to program it.
46+
47+
If you encounter any issues during programming, try restarting the Programmer app (Ctrl+R or Command+R on macOS) and attempt the programming process again.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.. _programming_custom_board:
2+
3+
Connecting custom boards for programming
4+
########################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
After you :ref:`created custom board files <defining_custom_board>`, you need to connect your custom board to a debug probe for programming.
11+
12+
Hardware requirements
13+
*********************
14+
15+
To connect a custom board for programming, you need the following hardware:
16+
17+
* A debug probe supporting Serial Wire Debug (SWD), such as:
18+
19+
* A Development Kit (DK) from Nordic Semiconductor (all include an onboard debug probe)
20+
* Dedicated debug adapter (like SEGGER J-Link)
21+
22+
* Connecting wires
23+
* USB cable
24+
25+
Required connections
26+
********************
27+
28+
You will have to connect the following pins between your custom board and the debug probe:
29+
30+
* Essential connections:
31+
32+
* SWDCLK (Clock)
33+
* SWDIO (Data)
34+
* GND (Ground)
35+
36+
* Optional connections:
37+
38+
* VDD (for powering the board from debug probe)
39+
* RESET
40+
41+
Connecting the debug probe
42+
**************************
43+
44+
The following steps describe how to connect your custom board to a debug probe.
45+
46+
.. tabs::
47+
48+
.. group-tab:: Using a DK as debug probe
49+
50+
Development Kits from Nordic Semiconductor include an onboard debug probe that supports the J-Link interface.
51+
52+
To connect your custom board to this onboard debug probe, complete the following steps:
53+
54+
1. Locate the SWD debug output header pins on your DK.
55+
Check the DK user guide on `Nordic Semiconductor TechDocs`_ for the exact location of these pins.
56+
For example, for the nRF52840 DK, read the `Debug output <nRF52840 DK Debug output_>`_ page.
57+
#. Connect the required pins to your custom board.
58+
#. Connect the DK to your PC using the USB cable.
59+
#. Install required J-Link drivers if not already present.
60+
61+
.. group-tab:: Using a dedicated debug adapter
62+
63+
If you don't have a Development Kit, use a dedicated debug adapter:
64+
65+
1. Connect a compatible debug probe (like SEGGER J-Link) to your custom board.
66+
2. Install the appropriate debug interface drivers.
67+
3. Connect the debug probe to your PC using the USB cable.
68+
69+
.. note::
70+
The |NCS| supports various debug interfaces like J-Link and CMSIS-DAP, provided you have the proper drivers installed.
71+
72+
Programming custom boards
73+
*************************
74+
75+
After you connected the custom board, you can program your application to the board using either the :ref:`standard programming instructions <programming>` or the `Programmer app`_ from `nRF Connect for Desktop`_.

doc/nrf/links.txt

+2
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@
738738
.. _`System OFF mode`: https://docs.nordicsemi.com/bundle/ps_nrf52840/page/power.html#ariaid-title10
739739
.. _`nRF52840 DK User Guide`: https://docs.nordicsemi.com/bundle/ug_nrf52840_dk/page/UG/dk/intro.html
740740
.. _`nRF52840 Dongle User Guide`: https://docs.nordicsemi.com/bundle/ug_nrf52840_dongle/page/UG/nrf52840_Dongle/intro.html
741+
.. _`nRF52840 DK Debug output`: https://docs.nordicsemi.com/bundle/ug_nrf52840_dk/page/UG/dk/hw_debug_out.html
741742
.. _`nRF52840 DK Compatibility Matrix`: https://docs.nordicsemi.com/bundle/comp_matrix_nrf52840/page/COMP/nrf52840/nrf52840_comp_matrix.html
742743

743744
.. _`nRF52833 Product Specification`: https://docs.nordicsemi.com/bundle?labelkey=nrf52833&labelkey=product-specification
@@ -921,6 +922,7 @@
921922

922923
.. _`nRF Connect SDK Intermediate course`: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/
923924
.. _`Lesson 2 - Debugging and troubleshooting`: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/
925+
.. _`Lesson 3 – Adding custom board support`: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/
924926
.. _`Lesson 5 – Serial Peripheral Interface (SPI)`: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-5-serial-peripheral-interface-spi/
925927
.. _`Lesson 7 - Device driver model`: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-7-device-driver-model/
926928

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -608,4 +608,8 @@ cJSON
608608
Documentation
609609
=============
610610

611-
|no_changes_yet_note|
611+
* Added new section :ref:`ug_custom_board`.
612+
This section includes the following pages:
613+
614+
* :ref:`defining_custom_board` - previously located under :ref:`app_boards`.
615+
* :ref:`programming_custom_board` - new page.

0 commit comments

Comments
 (0)