Anyway to separate nrf connect sdk util from user application to decrease image size when performing DFU, like SoftDevice strategy ?

Hi,

We are using nRF Connect SDK to develop Mesh application on nRF52832. We want to add DFU function to our application.

When analyzing the memory report, we find that exceed 90% of the ROM is nRF Connnect SDK Util. Our self-developed code takes up less than 10%.

Is there anyway that we can seperate nrRF Connect SDK Util from user application, like SoftDevice in nRF SDK?
Thereby, we can put the nRF Connect SDK Util in one partition and our user application in another partition. After that, we just need to upgrade the user application when performing DFU.

  • Hi,

    In nRF5 SDK the SoftDevice was a separate entity that was called into from the application using supervisor calls. In nRF Connect SDK, on the other hand, the stack is linked into the application itself. Therefore, in nRF Connect SDK there is no such separation between stack and application, and they have to be updated together as one entity. This means there will also be one common image for the DFU.

    You may still be able to reduce the size of the application (including stack), see memory footprint optimization. For a Bluetooth mesh application, the sections general recommendations, Bluetooth and Bluetooth mesh are relevant. You can also look for the microbit configuration files, as those are made specifically for small memory footprints. The following files may be of interest for reference:

    ./zephyr/samples/bluetooth/hci_uart/boards/bbc_microbit.conf
    ./zephyr/samples/bluetooth/mesh/microbit_gatt.conf
    ./zephyr/samples/bluetooth/mesh/prj_bbc_microbit.conf
    ./zephyr/samples/bluetooth/mesh_demo/prj_bbc_microbit.conf
    ./zephyr/tests/bluetooth/mesh/microbit.conf
    ./zephyr/tests/bluetooth/mesh/microbit_gatt.conf

    Regards,
    Terje

  •  

    Out of curiosity, you've mentioned that you plan to do DFU in a mesh application using the nrf-connect-sdk. it is my understanding that nrf-connect-sdk doesn't have a mesh DFU example, the MESH sdk however does.

    Do you plan to do ble DFU on a BLE MESH application rather than updating the whole mesh network?

  • We also find the MESH DFU example in nRF SDK, but we are developing with nRF Connect SDK.

    Actually, we want to implement a similar DFU functionality on nRF Connect SDK as what nRF SDK does.

  • Interesting, I've been doing some research and the nRF SDK uses the  Nordics bootloader for this whereas the nRF Connect SDK uses MCUBOOT through Zephyr for DFU. Would be interesting to see this implemented in Zephyr.

  • Hi,

    If you plan on doing anything involving the transfer of large amounts of data, the Bluetooth SIG has made publicly available a draft for the Mesh Binary Large Object Transfer Model, which is being developed for this purpose.

    The information page on bluetooth.com for the latest version (d1.0r04_PRr00) of the draft even mentions "Mesh Firmware Update" as a related document, providing a link which requires SIG membership for access, not sure what level. It may be worth looking into for your DFU needs.

    I cannot share any future plans for nRF Connect SDK here, but our sales representative for your area may be able to share more information regarding what we plan from our side in this domain. If you do not know who this is, then please ask for contact details in a private ticket or direct message.

    Regards,
    Terje

Related