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

soc_flash_nrf example not building with Zephyr SDK V1.3.0-rc1

On reviewing Zephyr SDK V1.3.0-rc1

I am able to build and run the soc_flash_nrf example as a nrf9160dk_nrf1960 board all works as expected.

when I try with nrf916dk_nrf9160ns for the board I get the following compiler error.

1> Compiling ‘main.c’
1> In file included from C:/NCS/v1.3.0-rc1/zephyr/include/sched_priq.h:9,
1> from C:/NCS/v1.3.0-rc1/zephyr/include/kernel_includes.h:23,
1> from C:/NCS/v1.3.0-rc1/zephyr/include/kernel.h:17,
1> from C:/NCS/v1.3.0-rc1/zephyr/include/zephyr.h:18,
1> from ../src/main.c:8:
1> C:/NCS/v1.3.0-rc1/zephyr/include/storage/flash_map.h:235:11: error: 'PM_PM_PM_image_1_nonsecure_ID_LABEL_OFFSET' undeclared (first use in this function)
1> C:/NCS/v1.3.0-rc1/zephyr/include/sys/util.h:510:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
1> C:/NCS/v1.3.0-rc1/zephyr/include/storage/flash_map.h:235:2: note: in expansion of macro 'UTIL_CAT'
1> ../src/main.c:16:27: note: in expansion of macro 'FLASH_AREA_OFFSET'
1> ../src/main.c:55:49: note: in expansion of macro 'FLASH_TEST_OFFSET'
1> C:/NCS/v1.3.0-rc1/zephyr/include/storage/flash_map.h:235:11: note: each undeclared identifier is reported only once for each function it appears in
1> C:/NCS/v1.3.0-rc1/zephyr/include/sys/util.h:510:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
1> C:/NCS/v1.3.0-rc1/zephyr/include/storage/flash_map.h:235:2: note: in expansion of macro 'UTIL_CAT'
1> ../src/main.c:16:27: note: in expansion of macro 'FLASH_AREA_OFFSET'
1> ../src/main.c:55:49: note: in expansion of macro 'FLASH_TEST_OFFSET'
Build failed

I am building using Segger Studio V4.52 on Windows 10

  • Hi Jeff,

    I strongly recommend you to not use the "release candidate" but instead the full NCS v1.3.0 release.

    cd ncs/nrf
    git checkout master
    git pull
    git checkout v1.3.0
    west update


    When it comes to this sample being build in non-secure space I need to come back to you after I have consulted with some R&D developers.

  • As per Martin's advice I am trying SDK V.1.3.0

    I am still getting the same compile error

    1> Compiling ‘main.c’
    1> In file included from C:/NCS/v1.3.0/zephyr/include/sched_priq.h:9,
    1> from C:/NCS/v1.3.0/zephyr/include/kernel_includes.h:23,
    1> from C:/NCS/v1.3.0/zephyr/include/kernel.h:17,
    1> from C:/NCS/v1.3.0/zephyr/include/zephyr.h:18,
    1> from ../src/main.c:8:
    1> C:/NCS/v1.3.0/nrf/include/flash_map_pm.h:34:11: error: 'PM_PM_PM_image_1_nonsecure_ID_LABEL_ADDRESS' undeclared (first use in this function)
    1> C:/NCS/v1.3.0/zephyr/include/sys/util.h:510:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
    1> C:/NCS/v1.3.0/nrf/include/flash_map_pm.h:34:2: note: in expansion of macro 'UTIL_CAT'
    1> ../src/main.c:16:27: note: in expansion of macro 'FLASH_AREA_OFFSET'
    1> ../src/main.c:55:49: note: in expansion of macro 'FLASH_TEST_OFFSET'
    1> C:/NCS/v1.3.0/nrf/include/flash_map_pm.h:34:11: note: each undeclared identifier is reported only once for each function it appears in
    1> C:/NCS/v1.3.0/zephyr/include/sys/util.h:510:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
    1> C:/NCS/v1.3.0/nrf/include/flash_map_pm.h:34:2: note: in expansion of macro 'UTIL_CAT'
    1> ../src/main.c:16:27: note: in expansion of macro 'FLASH_AREA_OFFSET'
    1> ../src/main.c:55:49: note: in expansion of macro 'FLASH_TEST_OFFSET'
    Build failed

  • Hi Jeff,

    The sample does build in upstream Zephyr. 
    We are looking at a fix in the NCS Zephyr, thank you for the feedback.

    BR,
    martin l.

Related