This blog is to show to use your own custom board instead of original developer board from zephyr. You don’t need to use any overlay on the zephyr configuration. For example, if you use the zephyr or Nordic nRF Connect SDK (NCS), you need to check which boards are available by west boards.

Basically you can also refer to the URL (Board Porting Guide).

https://docs.zephyrproject.org/latest/guides/porting/board_porting.html

west boards

Or you can browse two directories to store the boards information.

  1. ncs\v1.5.1\nrf\boards\arm
  2. ncs\v1.5.1\zephyr\boards\arm
nrf\boards\arm
zephyr\boards\arm

In this blog, nrf9160dk_nrf9160 would be used as the example and modify for the customer board (place at the local folder).

For example, there is all the board configuration for nrf9160dk_nrf9160 Development Board.

You can find the CONFIG_BOARD_NRF9160DK_NRF9160 on the configuration file.

How to use the local custom board instead of using original DK board at the NCS / Zephyr

For all the DK boards, they would have some defaults HW configuration which is specified at the *.dts file.

If nRF9160, all the default HW configuration are defined at nrf9160dk_nrf9160_common.dts.

If you use the overlay approach, you need to provide the HW configuration of .overlay. But if you use the local board, you just need to modify *.dts.

Step 1:

Create the local board directory under the working project such as mqtt_simple\boards\arm (copy the nrf9160dk_nrf9160 from ncs\v1.5.1\zephyr\boards\arm)

Step 2:

Duplicate the folder (nrf9160dk_nrf9160) to create the nf9160dk_nrf9160_customer

Step 3:

Rename all the filenames to add *_customer_*.

Step 4:

Rename all the BOARD_NRF9160DK_NRF9160 to BOARD_NRF9160DK_NRF9160_CUSTOMER.

Step 5:

Modify the CMakeLists.txt to add the local board information.

list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR})

Or When using “-DBOARD_ROOT=<board-root> both absolute and relative paths can be used.

Compilation / Build the custom board

Segger Embedded Studio IDE

Select the local board folder of the nRF9160dk_nrf9160_customer

2. West / Ninja Command line

west build -d build_nrf9160dk_nrf9160_customerns -b nrf9160dk_nrf9160_customerns -p
  • -d build directory folder
  • -b build option of board
  • -p pristine (clear up the previous build folder)

Here are the example folder code of MQTT_sample (download)

Welcome to give any comment.