Migrating nRF53 Zigbee project to nRF54 results in ZBOSS errors

Hi,

I try to migrate a working nRF53 Zigbee project from SDK 2.7 to the latest SDK and an nRF54. As described here, I also switched to Zigbee R23. The project structure is shown below.

But the build exit with the error message

C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:16:32: error: 'PM_ZBOSS_NVRAM_SIZE' undeclared here (not in a function); did you mean 'PM_SRAM_SIZE'?
   16 | #define ZBOSS_NVRAM_PAGE_SIZE (PM_ZBOSS_NVRAM_SIZE / CONFIG_ZIGBEE_NVRAM_PAGE_COUNT)
      |                                ^~~~~~~~~~~~~~~~~~~
C:/Users/konta/Desktop/BeeLight/firmware/zephyr/include/zephyr/toolchain/gcc.h:87:52: note: in definition of macro 'BUILD_ASSERT'
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
      |                                                    ^~~~
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:18:15: note: in expansion of macro 'ZBOSS_NVRAM_PAGE_SIZE'
   18 | BUILD_ASSERT((ZBOSS_NVRAM_PAGE_SIZE % PHYSICAL_PAGE_SIZE) == 0,
      |               ^~~~~~~~~~~~~~~~~~~~~
C:/Users/konta/Desktop/BeeLight/firmware/zephyr/include/zephyr/toolchain/gcc.h:87:51: error: expression in static assertion is not an integer
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
      |                                                   ^
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:18:1: note: in expansion of macro 'BUILD_ASSERT'
   18 | BUILD_ASSERT((ZBOSS_NVRAM_PAGE_SIZE % PHYSICAL_PAGE_SIZE) == 0,
      | ^~~~~~~~~~~~
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c: In function 'zb_osif_nvram_init':
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:39:31: error: 'PM_ZBOSS_NVRAM_ID' undeclared (first use in this function)
   39 |         ret = flash_area_open(PM_ZBOSS_NVRAM_ID, &fa);
      |                               ^~~~~~~~~~~~~~~~~
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:39:31: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:45:31: error: 'PM_ZBOSS_PRODUCT_CONFIG_ID' undeclared (first use in this function)
   45 |         ret = flash_area_open(PM_ZBOSS_PRODUCT_CONFIG_ID, &fa_pc);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c: In function 'zb_get_nvram_page_length':
C:/Users/konta/Desktop/BeeLight/firmware/ncs-zigbee/subsys/osif/zb_nrf_nvram.c:55:1: warning: control reaches end of non-void function [-Wreturn-type]
   55 | }
      | ^
[449/492] Building C object modules/nrfxlib/nrf_802154/nrf_802154/driver/CMakeFiles/nrf-802154-driver.dir/src/nrf_802154_trx_dppi.c.obj

What causes this issue and how can I fix it?

Parents
  • Hi,

    Did you also follow the steps in the migration guides from 2.7.0 and incrementally up to 3.0.1 i.e https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration_guides.html with emphasis on https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html if you're coming from child/parent images?

    If you're unsure about the sysbuild migration, what does your project folder look like? Are you using child images or sysbuild? https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/topic/sysbuild-explained/ 

    Kind regards,
    Andreas

  • Hi,

    thanks to the answer. The project is built with Sysbuild and when removing Zigbee from the project, the build runs smoothly.

    I´ve pushed the latest version of the project to my GitHub so you can see the structure:

    github.com/.../firmware

  • Hi Andreas,

    okay than I will wait a bit longer. I´ve tested it with previous SDKs and I run into the same issue. SDK 2.8.0 doesn´t work because nRF54 is missing here.

  • Hi,

    I also see that I've not yet asked you what hardware you're working with. What version is the 54L15 SoC you're using? See https://docs.nordicsemi.com/bundle/comp_matrix_nrf54l15/page/COMP/nrf54l15/nrf54l15_ic_revision_overview.html and https://docs.nordicsemi.com/bundle/comp_matrix_nrf54l15/page/COMP/nrf54l15/nrf54l15_nrf_connect_sdk.html for a compatibility overview

    Kind regards,
    Andreas

  • Hi Andreas,

    I use a pre built module from Ezurio and not the blank chip. So I'm pretty sure that the chip is not an engineering sample. 

  • Noted,

    Unfortunately I don't think there's more I can do here other than suggesting things for you to look closer into. Debugging this requires getting your hands dirty and porting from a SDK version using HWm1 and child/parent images to a SDK version using hwm and sysbuild as well as migrating from a 5340 to the 54l15.

    But, the errors seems to be related to this:

    • Since your project comes from a 5340 project, the flash page configurations are different than for your 54l15 project
    • 54L15 uses RRAM and not Flash, might be an error related to settings
    • The 5340 might have custom configurations specific to that board
      • The partitioning layout might be tailored to the 5340

    The best suggestion I can give you is

    1. Get a sample working for the nRF54L15DK
    2. Get your sample working for the nRF54L15DK
      1. Isolate if the issues are wr.t SDK versions, custom drivers, the board files or other
      2. Verify that the partitoning
    Kampino said:
    I haven´t tested it with a DK because I don´t have one. But the board I´ve created is based on the nRF54DK (I basically changed the name and add the Zigbee stuff to it) so I think the result should be the same. But I can test it later if you want.

    W.r.t migrating a template sample from 2.7.0 to R23 and NCS v3.0.0 you can do this:

    1. Create a nrf54l15dk_nrf54l15_cpuapp.overlay (copy it directly from the template sample in R23)
    2. Remove this from prj.conf:
      # Enable nRF ECB driver
      CONFIG_CRYPTO=y
      CONFIG_CRYPTO_NRF_ECB=y
      CONFIG_CRYPTO_INIT_PRIORITY=80
    3. Change CONFIG_ZIGBEE=y to CONFIG_ZIGBEE_ADD_ON=y

    Again, apologies for not being able to point to anything specific.

    Kind regards,
    Andreas

  • Hi Andreas,

    It was a bit painful and caused me a lot of gray hairs, but I´ve tested different things.

    1. I run "west init -m "">github.com/.../ncs-zigbee" --mr main" to get the Zigbee stuff
    2. I´ve put my project into the "samples" directory and changed the layout to match the light bulb example
    3. I´ve compiled the light bulb example for the nrf54l15 (successfully)

    rm -rf build && west build -b nrf54l15dk/nrf54l15/cpuapp --force -p

    4. I´ve compiled my code for my board (the custom board makes issues -> will fix it later)

    rm -rf build && west build -b beelight@1/nrf54l15/cpuapp -- -DBOARD_ROOT="."

    I´ve figured out that the APDS9306 driver is not available in this Zephyr version (v2.9.0). An upgrade to v3.0.1 causes the light bulb example not to build -> will fix it later. I disabled BSEC and the light sensor for now

    5. Compiling my application is successful now

    Questions:
    1. How can I use this ncs-zigbee in my project (I. e. checking it out with west)? I want to have my app ("beelight") with the right ncs and ncs-zigbee structure with BSEC according to the Nordic guide. Maybe by forking "ncs-zigbee" and adding everything to the west.yml?

    2. Is it possible to upgrade to NCS 3.0.1? I get this error at the moment when switching to NCS 3.0.1

    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Users/konta/Downloads/zigbee/ncs-zigbee/samples/beelight
    -- CMake version: 3.27.6
    -- Found Python3: C:/Users/konta/.platformio/penv/Scripts/python.exe (found suitable version "3.11.7", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/Users/konta/Downloads/zigbee/zephyr/.cache
    -- Zephyr version: 4.0.99 (C:/Users/konta/Downloads/zigbee/zephyr)
    -- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
    -- Board: beelight, Revision: 1, qualifiers: nrf54l15/cpuapp
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    CMake Error at C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/FindZephyr-sdk.cmake:159 (find_package):
      Could not find a package configuration file provided by "Zephyr-sdk"
      (requested version 0.16) with any of the following names:
    
        Zephyr-sdkConfig.cmake
        zephyr-sdk-config.cmake
    
      Add the installation prefix of "Zephyr-sdk" to CMAKE_PREFIX_PATH or set
      "Zephyr-sdk_DIR" to a directory containing one of the above files.  If
      "Zephyr-sdk" provides a separate development package or SDK, be sure it has
      been installed.
    Call Stack (most recent call first):
      C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package)
      C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/dts.cmake:9 (find_package)
      C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:3 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: beelight
    
      Location: C:/Users/konta/Downloads/zigbee/ncs-zigbee/samples/beelight
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:21 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/Users/konta/Downloads/zigbee/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=C:/Users/konta/.platformio/penv/Scripts/python.exe '-BC:\Users\konta\Downloads\zigbee\ncs-zigbee\samples\beelight\build' -GNinja -DBOARD=beelight@1/nrf54l15/cpuapp -DBOARD_ROOT=. '-SC:\Users\konta\Downloads\zigbee\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\Users\konta\Downloads\zigbee\ncs-zigbee\samples\beelight'
    

    -> Solved. For some reason, the build after an upgrade to NCS 3.0.1 is working in VS Code. I changed the version in the west.yml of ncs-zigbee to v3.0.1, ran west update, restarted code, and built everything

Reply
  • Hi Andreas,

    It was a bit painful and caused me a lot of gray hairs, but I´ve tested different things.

    1. I run "west init -m "">github.com/.../ncs-zigbee" --mr main" to get the Zigbee stuff
    2. I´ve put my project into the "samples" directory and changed the layout to match the light bulb example
    3. I´ve compiled the light bulb example for the nrf54l15 (successfully)

    rm -rf build && west build -b nrf54l15dk/nrf54l15/cpuapp --force -p

    4. I´ve compiled my code for my board (the custom board makes issues -> will fix it later)

    rm -rf build && west build -b beelight@1/nrf54l15/cpuapp -- -DBOARD_ROOT="."

    I´ve figured out that the APDS9306 driver is not available in this Zephyr version (v2.9.0). An upgrade to v3.0.1 causes the light bulb example not to build -> will fix it later. I disabled BSEC and the light sensor for now

    5. Compiling my application is successful now

    Questions:
    1. How can I use this ncs-zigbee in my project (I. e. checking it out with west)? I want to have my app ("beelight") with the right ncs and ncs-zigbee structure with BSEC according to the Nordic guide. Maybe by forking "ncs-zigbee" and adding everything to the west.yml?

    2. Is it possible to upgrade to NCS 3.0.1? I get this error at the moment when switching to NCS 3.0.1

    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Users/konta/Downloads/zigbee/ncs-zigbee/samples/beelight
    -- CMake version: 3.27.6
    -- Found Python3: C:/Users/konta/.platformio/penv/Scripts/python.exe (found suitable version "3.11.7", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/Users/konta/Downloads/zigbee/zephyr/.cache
    -- Zephyr version: 4.0.99 (C:/Users/konta/Downloads/zigbee/zephyr)
    -- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
    -- Board: beelight, Revision: 1, qualifiers: nrf54l15/cpuapp
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    CMake Error at C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/FindZephyr-sdk.cmake:159 (find_package):
      Could not find a package configuration file provided by "Zephyr-sdk"
      (requested version 0.16) with any of the following names:
    
        Zephyr-sdkConfig.cmake
        zephyr-sdk-config.cmake
    
      Add the installation prefix of "Zephyr-sdk" to CMAKE_PREFIX_PATH or set
      "Zephyr-sdk_DIR" to a directory containing one of the above files.  If
      "Zephyr-sdk" provides a separate development package or SDK, be sure it has
      been installed.
    Call Stack (most recent call first):
      C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package)
      C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/dts.cmake:9 (find_package)
      C:/Users/konta/Downloads/zigbee/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:3 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: beelight
    
      Location: C:/Users/konta/Downloads/zigbee/ncs-zigbee/samples/beelight
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:21 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/Users/konta/Downloads/zigbee/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/Users/konta/Downloads/zigbee/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=C:/Users/konta/.platformio/penv/Scripts/python.exe '-BC:\Users\konta\Downloads\zigbee\ncs-zigbee\samples\beelight\build' -GNinja -DBOARD=beelight@1/nrf54l15/cpuapp -DBOARD_ROOT=. '-SC:\Users\konta\Downloads\zigbee\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\Users\konta\Downloads\zigbee\ncs-zigbee\samples\beelight'
    

    -> Solved. For some reason, the build after an upgrade to NCS 3.0.1 is working in VS Code. I changed the version in the west.yml of ncs-zigbee to v3.0.1, ran west update, restarted code, and built everything

Children
No Data
Related