nRF5340, nRF7002, XIP, MCUboot, filesystem -> Any examples?

Hello,

I am attempting to configure the following setup to support (with an nRF5340 + nRF7002-EK)...

1. nRF7002 on SPI w/ TLS, STA, and FW patches offloaded to QSPI XIP

2. nRF5340 without any BLE support, empty netcore

3. LittleFS also on external QSPI flash

4. Storing particularly heavy libraries in QSPI XIP.

Is there a simple way to ensure that XIP application code can operate concurrently with the file system? Is partition manager helping things here or can I use the static partitions in Zephyr?

Here is my current project: github.com/.../nRF7002-XIP-Filesystem. When SB_CONFIG_WIFI_NRF70=y is enabled, I get the following error: 
ninja: error: '_sysbuild/nrf70_wifi_fw_patch_target', needed by 'dfu_application.zip', missing and no known rule to make it

If this is disabled, I am able to at least boot but, of course, cannot communicate with the nRF7002.

Thanks,

Helmut Lord

Parents
  • Hi Helmut,

    I got a colleague who I maaaaybe think has an example that can help here, but he is out of the office today.

    I will get back to you next week when I have talked to him.

    Regards,
    Sigurd Hellesvik

  • How about this one:

     Failing to build using sysbuild/NCS2.9.0 with MCUboot for DFU enabled for app/CPU-NET/Wifi fw

    I think that it is Wi-Fi + XIP + Application DFU. Is this helpful?

    And then I should probably try and answer your questions as well:

    Is there a simple way to ensure that XIP application code can operate concurrently with the file system?

    From memory, I think I heard the XIP driver should be able to handle this. When you say "ensure", do you mean "should it work?" or "It does mostly work, but I had some issues with it"?

    Is partition manager helping things here or can I use the static partitions in Zephyr?

    See Here:

    config NRF_WIFI_FW_PATCH_DFU
    	bool "Direct Firmware Update of nRF70 FW patch"
    	depends on PARTITION_MANAGER_ENABLED
    	depends on BOOTLOADER_MCUBOOT

    So you need the Partition Manager if you want Wi-Fi Patch DFU at least.

    Regards,
    Sigurd Hellesvik

  • I guess what I'm worried about w/ filesystem + XIP is the following situation (besides not knowing exactly how to tell the build system "hey this area is for nRF7002 firmware patch loading, this area is for XIP code, this is for littlefs"):

    - LittleFS requests an erase and yields

    - Another thread, something Wi-Fi related (if we have the libraries in XIP) at a higher priority tries to run XIP code while this erase is occurring 

    - Crash!

    I have seen some tickets w/ recommendations about what can/cannot be put into XIP but still feel uncertain about what is permitted, too.

  • khelmutlord said:

    I guess what I'm worried about w/ filesystem + XIP is the following situation (besides not knowing exactly how to tell the build system "hey this area is for nRF7002 firmware patch loading, this area is for XIP code, this is for littlefs"):

    - LittleFS requests an erase and yields

    - Another thread, something Wi-Fi related (if we have the libraries in XIP) at a higher priority tries to run XIP code while this erase is occurring 

    - Crash!

    I see what you mean yea.

    From what I have heard, this can maybe be the case. The best is probably to do some testing and see what happens.

    khelmutlord said:
    I have seen some tickets w/ recommendations about what can/cannot be put into XIP but still feel uncertain about what is permitted, too.

    One thing I have heard about here is current consumption: If you want to put the external flash into sleep while not running XIP code, you cannot run interrupt code from XIP. If you are alright by drawing a lot of current, you can keep XIP on always and this should not be an issue as I understand.

    This was maybe not the best answers, but are they enough for you?

Reply
  • khelmutlord said:

    I guess what I'm worried about w/ filesystem + XIP is the following situation (besides not knowing exactly how to tell the build system "hey this area is for nRF7002 firmware patch loading, this area is for XIP code, this is for littlefs"):

    - LittleFS requests an erase and yields

    - Another thread, something Wi-Fi related (if we have the libraries in XIP) at a higher priority tries to run XIP code while this erase is occurring 

    - Crash!

    I see what you mean yea.

    From what I have heard, this can maybe be the case. The best is probably to do some testing and see what happens.

    khelmutlord said:
    I have seen some tickets w/ recommendations about what can/cannot be put into XIP but still feel uncertain about what is permitted, too.

    One thing I have heard about here is current consumption: If you want to put the external flash into sleep while not running XIP code, you cannot run interrupt code from XIP. If you are alright by drawing a lot of current, you can keep XIP on always and this should not be an issue as I understand.

    This was maybe not the best answers, but are they enough for you?

Children
No Data
Related