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

How to set up custom board file in nRF9160?

I'm trying to make a custom board file, but it doesn't work yet. Any help?

Loading solution custom_board_file_test.emProject
Executing load commands
/usr/local/bin/cmake -GNinja -DBOARD=nrf9160_newboard_ns -DBOARD_DIR=/Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb -B/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/build_nrf9160_newboard_ns -H/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -DDTC=/usr/local/bin/dtc -D WEST=~/.local/bin/west -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/Applications/arm_segger_embedded_studio_v416_macos_x64_nordic/html/configure_nordic_project_menuconfig.py
-- Using application from '/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test'
Zephyr version: 1.14.99
-- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.7.3", minimum required is "3.4") 
-- Selected BOARD nrf9160_newboard_ns
-- Found west: /Users/fukuharayuusuke/.local/bin/west (found suitable version "0.6.0", minimum required is "0.5.6")
-- Cache files will be written to: /Users/fukuharayuusuke/Library/Caches/zephyr
-- Loading /Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/nrf9160_newboard_ns.dts as base
-- Overlaying /Users/fukuharayuusuke/nRF9160/ncs/zephyr/dts/common/common.dts
nrf9160_newboard_ns.dts.pre.tmp:269.19-275.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
Parsing Kconfig tree in /Users/fukuharayuusuke/nRF9160/ncs/zephyr/Kconfig
Loading /Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/nrf9160_newboard_ns_defconfig as base
Merging /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/prj.conf
Configuration written to '/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/build_nrf9160_newboard_ns/zephyr/.config'
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
Including module: nrf in path: /Users/fukuharayuusuke/nRF9160/ncs/nrf
-- Using application from '/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/spm'
-- Loading /Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/nrf9160_newboard_ns.dts as base
-- Overlaying /Users/fukuharayuusuke/nRF9160/ncs/zephyr/dts/common/common.dts
Zephyr version: 1.14.99
nrf9160_newboard_ns.dts.pre.tmp:269.19-275.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)

warning: TRUSTED_EXECUTION_NONSECURE (defined at arch/Kconfig:138) was assigned the value 'y' but
got the value 'n'. You can check symbol information (including dependencies) in the 'menuconfig'
interface (see the Application Development Primer section of the manual), or in the Kconfig
reference at
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TRUSTED_EXECUTION_NONSECURE.html
(which is updated regularly from the master branch). See the 'Setting configuration values' section
of the Board Porting Guide as well.

warning: UART_INTERRUPT_DRIVEN (defined at drivers/serial/Kconfig:36) was assigned the value 'y' but
got the value 'n'. You can check symbol information (including dependencies) in the 'menuconfig'
interface (see the Application Development Primer section of the manual), or in the Kconfig
reference at
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_INTERRUPT_DRIVEN.html (which is
Parsing Kconfig tree in /Users/fukuharayuusuke/nRF9160/ncs/zephyr/Kconfig
Loading /Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/nrf9160_newboard_ns_defconfig as base
Merging /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/spm/prj.conf
Configuration written to '/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/build_nrf9160_newboard_ns/spm/zephyr/.config'
updated regularly from the master branch). See the 'Setting configuration values' section of the
Board Porting Guide as well.

warning: UART_3_NRF_UARTE (defined at drivers/serial/Kconfig.nrfx:224) was assigned the value 'y'
but got the value 'n'. You can check symbol information (including dependencies) in the 'menuconfig'
interface (see the Application Development Primer section of the manual), or in the Kconfig
reference at http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_3_NRF_UARTE.html
(which is updated regularly from the master branch). See the 'Setting configuration values' section
of the Board Porting Guide as well.

warning: the choice symbol BOARD_NRF9160_NEWBOARD_NS (defined at
/Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/Kconfig.board:13) was selected
(set =y), but BOARD_NRF9160_NEWBOARD (defined at
/Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/Kconfig.board:9) ended up as
the choice selection.  You can check symbol information (including dependencies) in the 'menuconfig'
interface (see the Application Development Primer section of the manual), or in the Kconfig
reference at
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BOARD_NRF9160_NEWBOARD_NS.html (which
is updated regularly from the master branch). See the 'Setting configuration values' section of the
Board Porting Guide as well.
Including module: nrf in path: /Users/fukuharayuusuke/nRF9160/ncs/nrf
Including module: nffs in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/fs/nffs
Including module: segger in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/debug/segger
Including module: mcuboot in path: /Users/fukuharayuusuke/nRF9160/ncs/mcuboot/zephyr
Including module: mcumgr in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/lib/mcumgr
Including module: tinycbor in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /Users/fukuharayuusuke/nRF9160/ncs/nrfxlib
Including module: nffs in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/fs/nffs
Including module: segger in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/debug/segger
Including module: mcuboot in path: /Users/fukuharayuusuke/nRF9160/ncs/mcuboot/zephyr
Including module: mcumgr in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/lib/mcumgr
Including module: tinycbor in path: /Users/fukuharayuusuke/nRF9160/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /Users/fukuharayuusuke/nRF9160/ncs/nrfxlib
Running Partition Manager...
-- Configuring done
CMake Error at /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/extensions.cmake:418 (add_library):
  No SOURCES given to target: boards__arm__nrf9160_newboard
Call Stack (most recent call first):
  /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/extensions.cmake:395 (zephyr_library_named)
  /Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/CMakeLists.txt:4 (zephyr_library)


-- Build files have been written to: /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/build_nrf9160_newboard_ns
CMake Error at /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/extensions.cmake:418 (add_library):
  No SOURCES given to target: spm_boards__arm__nrf9160_newboard
Call Stack (most recent call first):
  /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/extensions.cmake:395 (zephyr_library_named)
  /Users/fukuharayuusuke/nRF9160/ncs/zephyr/boards/arm/nrf9160_newboard/CMakeLists.txt:4 (zephyr_library)


Project load failed
Reported error: solution load command failed (1)

nrf9160_newboard.zip

Parents
  • Hi, Simon. Thank you for a reply.

    I overlooked the post. I followed the instruction that you suggested and got this error. How can I solve this?

    $ west build -b nrf9160_pca20190ns
    source directory: /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test
    build directory: /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/build (created)
    BOARD: nrf9160_pca20190ns (origin: command line)
    -- Using application from '/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nRF9160/custom_board_file_test'
    Zephyr version: 1.14.99
    -- Found PythonInterp: /Users/fukuharayuusuke/.pyenv/shims/python (found suitable version "3.7.2", minimum required is "3.4") 
    -- Selected BOARD nrf9160_pca20190ns
    -- Found west: /Users/fukuharayuusuke/.local/bin/west (found suitable version "0.6.0", minimum required is "0.5.6")
    -- Cache files will be written to: /Users/fukuharayuusuke/Library/Caches/zephyr
    CMake Error at /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/extensions.cmake:1320 (message):
      Assertion failed: Zephyr toolchain variant invalid: please set the
      ZEPHYR_TOOLCHAIN_VARIANT-variable
    Call Stack (most recent call first):
      /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/generic_toolchain.cmake:54 (assert)
      /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/app/boilerplate.cmake:495 (include)
      CMakeLists.txt:9 (include)

Reply
  • Hi, Simon. Thank you for a reply.

    I overlooked the post. I followed the instruction that you suggested and got this error. How can I solve this?

    $ west build -b nrf9160_pca20190ns
    source directory: /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test
    build directory: /Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nrf9160/custom_board_file_test/build (created)
    BOARD: nrf9160_pca20190ns (origin: command line)
    -- Using application from '/Users/fukuharayuusuke/nRF9160/ncs/nrf/samples/nRF9160/custom_board_file_test'
    Zephyr version: 1.14.99
    -- Found PythonInterp: /Users/fukuharayuusuke/.pyenv/shims/python (found suitable version "3.7.2", minimum required is "3.4") 
    -- Selected BOARD nrf9160_pca20190ns
    -- Found west: /Users/fukuharayuusuke/.local/bin/west (found suitable version "0.6.0", minimum required is "0.5.6")
    -- Cache files will be written to: /Users/fukuharayuusuke/Library/Caches/zephyr
    CMake Error at /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/extensions.cmake:1320 (message):
      Assertion failed: Zephyr toolchain variant invalid: please set the
      ZEPHYR_TOOLCHAIN_VARIANT-variable
    Call Stack (most recent call first):
      /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/generic_toolchain.cmake:54 (assert)
      /Users/fukuharayuusuke/nRF9160/ncs/zephyr/cmake/app/boilerplate.cmake:495 (include)
      CMakeLists.txt:9 (include)

Children
  • OK. I set the ZEPHYR_TOOLCHAIN_VARIANT-variable by this

    <under th hello_world project directory>
    $ set ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    $ set GNUARMEMB_TOOLCHAIN_PATH=c:\gnuarmemb

    reference: https://wiki.makerdiary.com/nrf52832-mdk/zephyr/

    However, I still get some errors. Reading the post, it seems that you need to fix device tree in spm project. How should I fix that? Any advice?

    C:\Users\user1\nRF9160\ncs\nrf\samples\nrf9160\hello_world>west build -b nrf9160_pca20190ns
    source directory: C:\Users\user1\nRF9160\ncs\nrf\samples\nrf9160\hello_world
    build directory: C:\Users\user1\nRF9160\ncs\nrf\samples\nrf9160\hello_world\build (created)
    BOARD: nrf9160_pca20190ns (origin: command line)
    -- Using application from 'C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/hello_world'
    Zephyr version: 1.14.99
    -- Found PythonInterp: C:/Python37/python.exe (found suitable version "3.7.4", minimum required is "3.4")
    -- Selected BOARD nrf9160_pca20190ns
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.6.0", minimum required is "0.5.6")
    -- Cache files will be written to: C:\Users\user1\AppData\Local/.cache/zephyr
    -- Loading C:/Users/user1/nRF9160/ncs/zephyr/boards/arm/nrf9160_pca20190/nrf9160_pca20190ns.dts as base
    -- Overlaying C:/Users/user1/nRF9160/ncs/zephyr/dts/common/common.dts
    Parsing Kconfig tree in C:/Users/user1/nRF9160/ncs/zephyr/Kconfig
    Loaded configuration 'C:/Users/user1/nRF9160/ncs/zephyr/boards/arm/nrf9160_pca20190/nrf9160_pca20190ns_defconfig'
    Merged configuration 'C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/hello_world/prj.conf'
    Configuration saved to 'C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/hello_world/build/zephyr/.config'
    -- The C compiler identification is GNU 7.3.1
    -- The CXX compiler identification is GNU 7.3.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    -- Performing Test toolchain_is_ok
    -- Performing Test toolchain_is_ok - Success
    Including module: nrf in path: C:\Users\user1\nRF9160\ncs\nrf
    -- Using application from 'C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/spm'
    Zephyr version: 1.14.99
    Changed board to secure nrf9160_pca20035 (NOT NS)
    -- Loading C:/Users/user1/nRF9160/ncs/zephyr/boards/arm/nrf9160_pca20190/nrf9160_pca20190.dts as base
    -- Overlaying C:/Users/user1/nRF9160/ncs/zephyr/dts/common/common.dts
    Parsing Kconfig tree in C:/Users/user1/nRF9160/ncs/zephyr/Kconfig
    Loaded configuration 'C:/Users/user1/nRF9160/ncs/zephyr/boards/arm/nrf9160_pca20190/nrf9160_pca20190_defconfig'
    Merged configuration 'C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/spm/prj.conf'
    Configuration saved to 'C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/hello_world/build/spm/zephyr/.config'
    Including module: nrf in path: C:\Users\user1\nRF9160\ncs\nrf
    Including module: nffs in path: C:\Users\user1\nRF9160\ncs\modules\fs\nffs
    Including module: segger in path: C:\Users\user1\nRF9160\ncs\modules\debug\segger
    Including module: mbedtls in path: C:\Users\user1\nRF9160\ncs\modules\crypto\mbedtls
    Including module: mcuboot in path: C:\Users\user1\nRF9160\ncs\mcuboot\zephyr
    Including module: mcumgr in path: C:\Users\user1\nRF9160\ncs\modules\lib\mcumgr
    Including module: tinycbor in path: C:\Users\user1\nRF9160\ncs\modules\lib\tinycbor
    Including module: nrfxlib in path: C:\Users\user1\nRF9160\ncs\nrfxlib
    Including module: nffs in path: C:\Users\user1\nRF9160\ncs\modules\fs\nffs
    Including module: segger in path: C:\Users\user1\nRF9160\ncs\modules\debug\segger
    Including module: mbedtls in path: C:\Users\user1\nRF9160\ncs\modules\crypto\mbedtls
    Including module: mcuboot in path: C:\Users\user1\nRF9160\ncs\mcuboot\zephyr
    Including module: mcumgr in path: C:\Users\user1\nRF9160\ncs\modules\lib\mcumgr
    Including module: tinycbor in path: C:\Users\user1\nRF9160\ncs\modules\lib\tinycbor
    Including module: nrfxlib in path: C:\Users\user1\nRF9160\ncs\nrfxlib
    Running Partition Manager...
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/hello_world/build
    [38/283] Building C object spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c.obj
    FAILED: spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v1.14.99-ncs2-495-ga8933a2ead01 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DNRF9160_XXAA -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -IC:/Users/user1/nRF9160/ncs/zephyr/kernel/include -IC:/Users/user1/nRF9160/ncs/zephyr/arch/arm/include -IC:/Users/user1/nRF9160/ncs/zephyr/include -IC:/Users/user1/nRF9160/ncs/zephyr/include/drivers -Ispm/zephyr/include/generated -IC:/Users/user1/nRF9160/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/Users/user1/nRF9160/ncs/zephyr/soc/arm/nordic_nrf/include -IC:/Users/user1/nRF9160/ncs/zephyr/lib/libc/minimal/include -IC:/Users/user1/nRF9160/ncs/zephyr/ext/hal/cmsis/Include -IC:/Users/user1/nRF9160/ncs/zephyr/ext/hal/nordic/nrfx -IC:/Users/user1/nRF9160/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -IC:/Users/user1/nRF9160/ncs/zephyr/ext/hal/nordic/nrfx/hal -IC:/Users/user1/nRF9160/ncs/zephyr/ext/hal/nordic/nrfx/mdk -IC:/Users/user1/nRF9160/ncs/zephyr/ext/hal/nordic/. -IC:/Users/user1/nRF9160/ncs/nrf/include -IC:/Users/user1/nRF9160/ncs/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -Ispm/zephyr/modules/nrfxlib/nrf_security/include -IC:/Users/user1/nRF9160/ncs/mbedtls/include -IC:/Users/user1/nRF9160/ncs/mbedtls/include/mbedtls -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed -Os -nostdinc -imacros C:/Users/user1/nRF9160/ncs/nrf/samples/nrf9160/hello_world/build/spm/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -mcmse -std=c99 -MD -MT spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c.obj -MF spm\zephyr\CMakeFiles\spm_zephyr.dir\C_\Users\user1\nRF9160\ncs\nrf\subsys\spm\spm.c.obj.d -o spm/zephyr/CMakeFiles/spm_zephyr.dir/C_/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c.obj   -c C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c: In function 'spm_config_peripherals':
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:293:24: error: 'NRF_UARTE2' undeclared (first use in this function); did you mean 'NRF_UARTE0'?
       PERIPH("NRF_UARTE2", NRF_UARTE2, CONFIG_SPM_NRF_UARTE2_NS),
                            ^
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
      (uint8_t)((uint32_t)(base_addr) >> 12)
                           ^~~~~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:293:3: note: in expansion of macro 'PERIPH'
       PERIPH("NRF_UARTE2", NRF_UARTE2, CONFIG_SPM_NRF_UARTE2_NS),
       ^~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:293:24: note: each undeclared identifier is reported only once for each function it appears in
       PERIPH("NRF_UARTE2", NRF_UARTE2, CONFIG_SPM_NRF_UARTE2_NS),
                            ^
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
      (uint8_t)((uint32_t)(base_addr) >> 12)
                           ^~~~~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:293:3: note: in expansion of macro 'PERIPH'
       PERIPH("NRF_UARTE2", NRF_UARTE2, CONFIG_SPM_NRF_UARTE2_NS),
       ^~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:301:22: error: 'NRF_PWM1' undeclared (first use in this function); did you mean 'NRF_PWM0'?
       PERIPH("NRF_PWM1", NRF_PWM1, CONFIG_SPM_NRF_PWM1_NS),
                          ^
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
      (uint8_t)((uint32_t)(base_addr) >> 12)
                           ^~~~~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:301:3: note: in expansion of macro 'PERIPH'
       PERIPH("NRF_PWM1", NRF_PWM1, CONFIG_SPM_NRF_PWM1_NS),
       ^~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:302:22: error: 'NRF_PWM2' undeclared (first use in this function); did you mean 'NRF_PWM1'?
       PERIPH("NRF_PWM2", NRF_PWM2, CONFIG_SPM_NRF_PWM2_NS),
                          ^
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
      (uint8_t)((uint32_t)(base_addr) >> 12)
                           ^~~~~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:302:3: note: in expansion of macro 'PERIPH'
       PERIPH("NRF_PWM2", NRF_PWM2, CONFIG_SPM_NRF_PWM2_NS),
       ^~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:303:22: error: 'NRF_PWM3' undeclared (first use in this function); did you mean 'NRF_PWM2'?
       PERIPH("NRF_PWM3", NRF_PWM3, CONFIG_SPM_NRF_PWM3_NS),
                          ^
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
      (uint8_t)((uint32_t)(base_addr) >> 12)
                           ^~~~~~~~~
    C:/Users/user1/nRF9160/ncs/nrf/subsys/spm/spm.c:303:3: note: in expansion of macro 'PERIPH'
       PERIPH("NRF_PWM3", NRF_PWM3, CONFIG_SPM_NRF_PWM3_NS),
       ^~~~~~
    [43/283] Building C object spm/zephyr/CMakeFiles/spm_zephyr.dir/drivers/clock_control/nrf_power_clock.c.obj
    ninja: build stopped: subcommand failed.
    ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Users\user1\nRF9160\ncs\nrf\samples\nrf9160\hello_world\build'

  • I did not modify the device tree in any way, if I remember correctly. Try using the board-folder in the zipped file as Jeff Seaman provided in this thread, and then follow the steps I explained in the same thread.

    When you have that working, you can modify the config and dts files of the board, according to your own needs.

    Best regards,

    Simon

Related