nRF54L15dk working with external flash and partition managed

Hi, 

I am having trouble setting up the partition manager in external flash with nRF54L15dk in NCS 3.0.0. I did not find any examples of this working. Interesting thing is that for machine_learning example application in NCS you can see nRF54H20 utilize this, but not nRF54L15dk, not sure why is that the case. 

Best regards,
Vojislav

Parents
  • I found this in your example code, stating that dtc overlay files does not work for nRF54L15dk. 
    github.com/.../sample.yaml

  • also example you shared cannot be built for nRF54L15dk

    unctions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/vojislav/Documents/work/nordic/ncs-inter/l9/l9_e3_sol/spi=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v3.0.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v3.0.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -std=c99 -MD -MT zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj -MF zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj.d -o zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/CMakeFiles/subsys__mgmt__mcumgr__grp__img_mgmt.dir/src/img_mgmt.c.obj -c /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c
    In file included from /opt/nordic/ncs/v3.0.0/zephyr/include/zephyr/sys/util_macro.h:34,
                     from /opt/nordic/ncs/v3.0.0/zephyr/include/zephyr/sys/util.h:17,
                     from /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:8:
    /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c: In function 'img_mgmt_active_slot':
    /opt/nordic/ncs/v3.0.0/nrf/include/flash_map_pm.h:56:18: error: 'PM_PM_PM_mcuboot_secondary_ID_LABEL_OFFSET' undeclared (first use in this function)
       56 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
          |                  ^~~
    /opt/nordic/ncs/v3.0.0/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    /opt/nordic/ncs/v3.0.0/nrf/include/flash_map_pm.h:56:9: note: in expansion of macro 'UTIL_CAT'
       56 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
          |         ^~~~~~~~
    /opt/nordic/ncs/v3.0.0/nrf/include/flash_map_pm.h:59:39: note: in expansion of macro 'FIXED_PARTITION_DATA_FIELD'
       59 | #define FIXED_PARTITION_OFFSET(label) FIXED_PARTITION_DATA_FIELD(label, _OFFSET)
          |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:59:10: note: in expansion of macro 'FIXED_PARTITION_OFFSET'
       59 |         (FIXED_PARTITION_OFFSET(label) == (PM_ADDRESS - PM_ADDRESS_OFFSET))
          |          ^~~~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:255:13: note: in expansion of macro 'FIXED_PARTITION_IS_RUNNING_APP_PARTITION'
      255 |         if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) {
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v3.0.0/nrf/include/flash_map_pm.h:56:18: note: each undeclared identifier is reported only once for each function it appears in
       56 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
          |                  ^~~
    /opt/nordic/ncs/v3.0.0/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    /opt/nordic/ncs/v3.0.0/nrf/include/flash_map_pm.h:56:9: note: in expansion of macro 'UTIL_CAT'
       56 |         UTIL_CAT(PM_, UTIL_CAT(UTIL_CAT(PM_, UTIL_CAT(PM_ID(label), _LABEL)), x))
          |         ^~~~~~~~
    /opt/nordic/ncs/v3.0.0/nrf/include/flash_map_pm.h:59:39: note: in expansion of macro 'FIXED_PARTITION_DATA_FIELD'
       59 | #define FIXED_PARTITION_OFFSET(label) FIXED_PARTITION_DATA_FIELD(label, _OFFSET)
          |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:59:10: note: in expansion of macro 'FIXED_PARTITION_OFFSET'
       59 |         (FIXED_PARTITION_OFFSET(label) == (PM_ADDRESS - PM_ADDRESS_OFFSET))
          |          ^~~~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v3.0.0/zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c:255:13: note: in expansion of macro 'FIXED_PARTITION_IS_RUNNING_APP_PARTITION'
      255 |         if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) {
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [227/313] Building C object zephyr/subsys/dfu/boot/CMakeFiles/subsys__dfu__boot.dir/mcuboot.c.obj
    ninja: build stopped: subcommand failed.
    [10/20] No configure step for 'mcuboot'
    FAILED: _sysbuild/sysbuild/images/spi-prefix/src/spi-stamp/spi-build /Users/vojislav/Documents/work/nordic/ncs-inter/l9/l9_e3_sol/spi/build/_sysbuild/sysbuild/images/spi-prefix/src/spi-stamp/spi-build 
    cd /Users/vojislav/Documents/work/nordic/ncs-inter/l9/l9_e3_sol/spi/build/spi && /opt/homebrew/Cellar/cmake/3.24.1/bin/cmake --build .
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build /Users/vojislav/Documents/work/nordic/ncs-inter/l9/l9_e3_sol/spi/build
    ☁  spi [main]           

  • Hello,

    Sorry for the slight delay in responding ,  it's summer vacation period here, which caused some delays.

    Could you please share a few more details? For example, which external flash module are you using? How is the partition file being configured? If you're unsure about configuring the pm_static.yml file, I recommend building without a static partition first. This will generate a dynamic partition layout, which you can then use as a reference to configure the static partition.

    Are the logs you shared from the sample I pointed out? I'm not sure if this is a known issue, but I will look into it as well.

    -Priyanka

  • Hi  

    Here are the detailes:
    which external flash module are you using? -> the one that is on PCA10156 (v0.9.1 - 2024.44) I assume that one is MX25R6435F
    * How is the partition file being configured? -> 

    app:
      address: 0x10200
      region: flash_primary
      size: 0xdfe00
    mcuboot:
      address: 0x0
      region: flash_primary
      size: 0x10000
    mcuboot_pad:
      address: 0x10000
      region: flash_primary
      size: 0x200
    mcuboot_primary:
      address: 0x10000
      orig_span: &id001
      - mcuboot_pad
      - app
      region: flash_primary
      size: 0xe0000
      span: *id001
    mcuboot_primary_app:
      address: 0x10200
      orig_span: &id002
      - app
      region: flash_primary
      size: 0xdfe00
      span: *id002
    settings_storage:
      address: 0xf0000
      region: flash_primary
      size: 0x10000
    mcuboot_primary_1:
      address: 0x0
      size: 0x40000
      device: flash_ctrl
      region: ram_flash
    mcuboot_secondary:
      address: 0x00000
      size: 0xe0000
      device: MX25R64
      region: external_flash
    mcuboot_secondary_1:
      address: 0xe0000
      size: 0x40000
      device: MX25R64
      region: external_flash
    external_flash:
      address: 0x120000
      size: 0x6e0000
      device: MX25R64
      region: external_flash
    pcd_sram:
      address: 0x20000000
      size: 0x2000
      region: sram_primary
    

    Yes, logs from the previous post are from your sample, you can find the link to the application I build with NCS 3.3.0 there as well, and a comment that for nRF54L15DK this is nor working. 

    Let me know if I can give any more details. 

    Cheers,
    Vojislav

Reply
  • Hi  

    Here are the detailes:
    which external flash module are you using? -> the one that is on PCA10156 (v0.9.1 - 2024.44) I assume that one is MX25R6435F
    * How is the partition file being configured? -> 

    app:
      address: 0x10200
      region: flash_primary
      size: 0xdfe00
    mcuboot:
      address: 0x0
      region: flash_primary
      size: 0x10000
    mcuboot_pad:
      address: 0x10000
      region: flash_primary
      size: 0x200
    mcuboot_primary:
      address: 0x10000
      orig_span: &id001
      - mcuboot_pad
      - app
      region: flash_primary
      size: 0xe0000
      span: *id001
    mcuboot_primary_app:
      address: 0x10200
      orig_span: &id002
      - app
      region: flash_primary
      size: 0xdfe00
      span: *id002
    settings_storage:
      address: 0xf0000
      region: flash_primary
      size: 0x10000
    mcuboot_primary_1:
      address: 0x0
      size: 0x40000
      device: flash_ctrl
      region: ram_flash
    mcuboot_secondary:
      address: 0x00000
      size: 0xe0000
      device: MX25R64
      region: external_flash
    mcuboot_secondary_1:
      address: 0xe0000
      size: 0x40000
      device: MX25R64
      region: external_flash
    external_flash:
      address: 0x120000
      size: 0x6e0000
      device: MX25R64
      region: external_flash
    pcd_sram:
      address: 0x20000000
      size: 0x2000
      region: sram_primary
    

    Yes, logs from the previous post are from your sample, you can find the link to the application I build with NCS 3.3.0 there as well, and a comment that for nRF54L15DK this is nor working. 

    Let me know if I can give any more details. 

    Cheers,
    Vojislav

Children
No Data
Related