This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Out of source tree development (nRF9160 & Zephyr)

I would like to create a repo to house all our vendor-specific board support, applications, etc. outside the Nordic nrfConnect repositories as per the Zephyr workflow. However, I'm currently stuck trying to specify the BOARD_ROOT as an out of tree path.

Is there support for out of tree development with the Nordic platform or is there any information available on the preferred work flow or project/directory structure to use without forking the nrfConnect repository and just modifying it directly? I would like to be able to switch between versions of nrfConnect firmware without needing to merge with our code.

  • Hi,

    You can refer to the Out Of Tree Board sample.

    The example has the board directory in the project folder, and has added the following to the samples CMakeLists.txt:

    cmake_minimum_required(VERSION 3.13.1)
    # Re-direct the directory where the 'boards' directory is found from
    # $ZEPHYR_BASE to this directory.
    set(BOARD_ROOT ${CMAKE_CURRENT_LIST_DIR})
    
    # This sample is only compatible with nrf52840_pca10065 because it has
    # re-directed the 'boards' directory to a directory that only contains
    # this board.
    set(BOARD nrf52840_pca10056)

Related