nrf54L15, mx24r64 and FOTA

I have searched all responses here and whatever sources I can find, but not have any success.  
The main problem is that existing materials appear incompatible with the 54L range of parts, so following guides and dev academy materials proved somewhat frustrating.
The other observation is, I am starting out with Nordic and Zephyr as a beginner, and my entry device is a 54L15. That's probably part of the problem. No history with older parts.

So firstly, the elephant in the room … why is there no example for FOTA using the external flash memory and the 54L part?
Hopefully, if answers are posted here, maybe that elephant can be removed.

Board used is a Ezerio 54L15 Kit. (basically the same as a Nordic version - same pinout for MX25r64)
Project I am using as a base example is the "peripheral_lbs".
The board file used is nrf54l15dK/nrf54l15/cpuapp.
The overlay file is as below.
Build selected is sysbuild
Tool Chain is V3.0.2

Now regards adding FOTA, existing materials do appear somewhat applicable. The issue I believe I am facing is not knowing if the external flash is being addressed correctly.
This is where there is so much conflicting information on how to configure the flash for a 54L device and how to partition. Is the partition manager instruction applicable the 54 device?
To add, my current status is that I am able to do a sysbuild, load board with firmware and get the DFU symbol on the Nordic Phone app to appear. Downloading a new zip file with updated revision status does not write to external flash, but rather to address 0x000C4800 of the 54l memory space. Hence I believe there is an issue with how the flash is configured.

My prj.conf

CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Nordic_LBS"
CONFIG_NORDIC_QSPI_NOR=y

# Enable the LBS service
CONFIG_BT_LBS=y
CONFIG_BT_LBS_POLL_BUTTON=y
CONFIG_DK_LIBRARY=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

I manually created sysbuild.conf which has

SB_CONFIG_PARTITION_MANAGER=y
SB_CONFIG_BOOTLOADER_MCUBOOT=y


My overlay file...

/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
};

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;

/delete-node/ &slot0_ns_partition;
/delete-node/ &slot1_ns_partition;

/delete-node/ &storage_partition;

&cpuapp_rram {
reg = < 0x0 DT_SIZE_K(1524) >;
partitions {
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x000000000 0x00014000>;
};
slot0_partition: partition@14000 {
label = "image-0";
reg = <0x000014000 0x0015A000>;
};
storage_partition: partition@16E000 {
label = "storage";
reg = < 0x16E000 0x9000 >;
};
};
};

&mx25r64 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

slot1_partition: partition@0 {
label = "image-1";
reg = <0x000000000 0x0015A000>;
};
};
};


&pinctrl {
spi00_default: spi00_default {
group1 {
psels = <NRF_PSEL(SPIM_MISO, 2, 4)>,
<NRF_PSEL(SPIM_MOSI, 2, 2)>,
<NRF_PSEL(SPIM_SCK, 2, 1)>;
};
};

/omit-if-no-ref/ spi00_sleep: spi00_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 2, 1)>,
<NRF_PSEL(SPIM_MOSI, 2, 2)>,
<NRF_PSEL(SPIM_MISO, 2, 4)>;
low-power-enable;
};
};
};

&spi00 {
status = "okay";
cs-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi00_default>;
pinctrl-1 = <&spi00_sleep>;
pinctrl-names = "default", "sleep";

mx25r64: mx25r6435f@0 {
compatible = "jedec,spi-nor";
status = "okay";
reg = <0>;
spi-max-frequency = <2000000>;
jedec-id = [c2 28 17];
sfdp-bfp = [
e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb
ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 48 44
30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff
];
size = <67108864>;
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
};
};


Lastly, I did go into the nRF Kconfig GUI and "tick" NVS, but did not see any change.
Thank You.

  • Hi Andreas.   

    The Ezerio point is of no concern  ... board selected is a standard Nordic board as per pic sent.    The compile fails, so not even able to program the board.   

    The zip file is a basic project downloaded via the new project/copy a sample.   Then changes added as per the tutorials found.   Chances are that I have missed something.

    Thank you

    Brian

     1200.peripheral_lbs_1.zip

  • Noted, thank you for clarifying

    I will look into the zip tomorrow (10th of July) and get back to you with (hopefully) something more constructive then

    Kind regards,
    Andreas

  • Hi again,

    I've had a brief look through your zip and I've created a sample for you that compiles, builds and flashes (tested on nrf54l15dk/nrf54l15/cpuapp)

    Sample goes through the booting process and starts advertising as expected

    And the partition manager sets up the secondary mcuboot partition for the update image on the SPI connected external flash device: 

    Please compare this sample to your solution and let me know if you're able to spot any differences between this zip and your project

    7_54l15_fota_ext.zip

    Kind regards,
    Andreas

  • Hello Andreas

    " let me know if you're able to spot any differences"

    You kidding right (LOL)... cheezzz .. a lot different.   So my first thought is .. is this kind of detail referenced anywhere?  Clearly the examples I have been working through has not covered this level of detail.   I will work through it to gain understanding and if all good, translate it to the main project I am working on.  Thank you for taking the time and energy to provide the zip.

    Will provide feedback on the results a little later.

    Brian

  • Hello again Andreas.

    I had high hopes ....  Opened your file and tried to build.   

    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Work/7_54l15_fota_ext/build/7_54l15_fota_ext
    [1/329] Generating include/generated/zephyr/app_version.h
    -- git describe failed: fatal: not a git repository (or any of the parent directories): .git
    [5/329] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.1/zephyr), build: v4.0.99-ncs1-1
    [324/329] Linking C executable zephyr\zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/Work/7_54l15_fota_ext/build/7_54l15_fota_ext/zephyr/zephyr_pre0.map 
    cmd.exe /C "cd . && C:\ncs\toolchains\0b393f9e1b\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf -L"c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m/nofp" -lc -lgcc && cmd.exe /C "cd /D C:\Work\7_54l15_fota_ext\build\7_54l15_fota_ext\zephyr && C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/libzephyr.a(flash_map_partition_manager.c.obj):(.rodata.default_flash_map+0x1c): undefined reference to `__device_dts_ord_131'
    c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/libzephyr.a(flash_map_partition_manager.c.obj):(.rodata.default_flash_map+0x6c): undefined reference to `__device_dts_ord_131'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    [10/20] No configure step for 'mcuboot'
    FAILED: _sysbuild/sysbuild/images/7_54l15_fota_ext-prefix/src/7_54l15_fota_ext-stamp/7_54l15_fota_ext-build C:/Work/7_54l15_fota_ext/build/_sysbuild/sysbuild/images/7_54l15_fota_ext-prefix/src/7_54l15_fota_ext-stamp/7_54l15_fota_ext-build 
    cmd.exe /C "cd /D C:\Work\7_54l15_fota_ext\build\7_54l15_fota_ext && C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.exe --build ."
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' --build C:/Work/7_54l15_fota_ext/build
    

    The missing node issue in this case is ..

    /* Node's dependency ordinal: */
    #define DT_N_S_soc_S_qspi_40029000_S_mx25r6435f_0_ORD 131
    #define DT_N_S_soc_S_qspi_40029000_S_mx25r6435f_0_ORD_STR_SORTABLE 00131

    Not sure if I am now not defining something in the build table.  

    Thank You

    Brian


     

Related