This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Custom Board with nRF Connect for VS Code - secure and non-secure application on nRF9160 SiP

Hi DevZone,

1. Description:

I am going to use the nRF9160 SiP in a project on a custom PCB which will house the (LN60G840F, which has an nRF9160 on it). The application will include LTE-M and GPS. I think this means that I must:

  • Create a new custom board for the project build configuration to avoid relying on the nrf9160DK board files, and only the SoC/SiP specific files.
  • Create a partition of the application running as Secure, and another running as Non Secure to allow communication with the LTE-M.

I found this guide, which I have read:

https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0

The image below is from the guide, and it explains how the device tree is made for the nRF9160DK. I need to create my own files corresponding to what is in the blue part of the image. However, I am having a hard time figuring out what I am doing wrong.

2. My three Build configurations with build logs

I have created a project with 3 different build configurations. The custom boards are created with the "Create a new board" wizard:

  1. nRf9160dk_nrf9160ns
  2. Custom board depending on nRF9160 secure
  3. Custom board depending on nRF9160 non-secure

 - Configuration 1, builds just fine, but is relying on the development kit files.

 - Configuration 2, can only build if I do not use any functions that handle memory such as k_malloc(), and I believe that I will not be able to use the LTE-M with that configuration.

 - Configuration 3, which is the one I need, will not build.

I have included the build logs here:
build_logs_conf_1_2_3.zip

I am especially noticing Line 37: “Changed board to secure nrf9160dk_nrf9160 (NOT NS)” which is written only when building based on the nRF9160DK in the non-secure configuration (Configuration 1). Somehow the development kit build can access both secure and not secure boards, but this does not happen with the custom board. 

Also, when when building Configuration 3, it fails mainly in the validate_base_addresses.c file with the macros BUILD_ASSERT and CHECK_DT_REG

3. Custom Board dependent on the nRF9160 non-secure:

I am thinking this has to do with missing memory partition management from my side which I am assuming is part of the Device Tree. The settings for this could be in the board specific files in the generated “boards” folder which are dts, .yaml, Kconfig files, defconfig, and board.cmake. These are included here:

Fanstel_ln60g840f_ns_id.zip

Thank you in advance for your help,

Br. Casper

Related