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 Reply
  • 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

Children
No Data
Related