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

Upgrade to Zephyr OS 2.1 breaks build

A project built using the nRF9160 and Zephyr OS v1.14.99 previously built and ran just fine, but since upgrading to the latest versions of the zephyr and nrf repos (using west update) the build doesn't work. It looks like there is an error somewhere in the code generation.

This project uses a custom board and I essentially copied the nrf9160_pca10090 board folder and renamed things to match the project name and renumbered the pins. I also made an overlay file for the spm library in the nrf repo. As I said, before updating my copies of the repos this project built and ran just fine.

Here is a snippet showing the type of error I'm seeing:

In file included from C://Repos/ncs/zephyr/include/toolchain.h:39:0,
                 from C://Repos/ncs/zephyr/include/kernel_includes.h:19,
                 from C://Repos/ncs/zephyr/include/kernel.h:17,
                 from C://Repos/ncs/zephyr/soc/arm/nordic_nrf/validate_base_addresses.c:7:
C://Repos/ncs/zephyr/include/toolchain/gcc.h:62:28: error: static assertion failed: ""
 #define BUILD_ASSERT(EXPR) _Static_assert(EXPR, "")
                            ^
C://Repos/ncs/zephyr/soc/arm/nordic_nrf/validate_base_addresses.c:19:34: note: in expansion of macro 'BUILD_ASSERT'
 #define CHECK_ADDRESS(dts, mdk)  BUILD_ASSERT((u32_t)(dts) == (u32_t)(mdk))
                                  ^~~~~~~~~~~~
C://Repos/ncs/zephyr/soc/arm/nordic_nrf/validate_base_addresses.c:30:1: note: in expansion of macro 'CHECK_ADDRESS'
 CHECK_ADDRESS(DT_INST_0_NORDIC_NRF_CLOCK_BASE_ADDRESS, NRF_CLOCK);
 ^~~~~~~~~~~~~

Parents Reply
  • Actually this wasn't the issue. It was actually that the cmake boilerplate needed to be updated to support my custom board. It was copy-pasting these lines and changing "nrf9160_pca10090ns" and "nrf9160_pca10090" with the board identifiers of my custom board:

      if(${BOARD} STREQUAL nrf9160_pca10090ns)
        set(BOARD nrf9160_pca10090)
        message("Changed board to secure nrf9160_pca10090 (NOT NS)")
      endif()

Children
No Data
Related