Building mesh dfu sample for nRF52840 dongle

Hello

I am trying to build  the Zephyr mesh distributor sample on the nRF 52840 dongle

It builds and runs just find on the nRF52840 DK

But when I try to build for the dongle I get a link error the image is too big to fit in the flash and a lot of other warnings

Tried to disable logging to make the image smaller  - no luck

Log below

Please help

Thank you

---------nrf5284dongle-build.zip-----------------------------------

Parents
  • Hi,

    Is this the full build log?

    What is the build configuration, and which of the three options do you intend to use for programming the Dongle?

    Please note that the nRF52 Dongle is a bit special compared to DKs, as it doesn't contain any interface MCU (on-board programmer). When you choose the nrf52840dongle/nrf52840 board target, the board configuration will assume that you want to keep the existing bootloader which the Dongle was shipped with. This in turn will reduce the remaining available flash.

    If you have a debugger and want a full 100 % nRF Connect SDK solution on the Dongle (i.e. no nRF5 based bootloader,) then option 3 (using an external debug probe) is the alternative which will let you use the nRF52840 SoC on the Dongle the corresponding way it is used on a DK. Please note that in addition to the option of soldering an SWD header onto the Dongle, there is also the possibility to connect using a TagConnect cable. For programmer, most J-Link programmers should do, including using the on-board programmer (interface MCU) on a DK from the Debug Out port on the DK.

    While written for nRF5 SDK (and not nRF Connect SDK), the nRF52840 Dongle Programming Tutorial also provides some useful information regarding the nRF52840 Dongle. In particular the section Using an external debugger has some useful information regarding how the nRF52840 Dongle works. Please note that the code-related specifics are for nRF5 SDK, but the overall concepts still apply. In nRF Connect SDK, the board specific configurations (such as REGOUT0, the existence of a preprogrammed bootloader, etc.) are handled by the board configuration and/or Kconfig configurations.

    Regards,
    Terje

  • Yes, this is the full build log

    I just need to make it easy for end users to program the dongle with the nRF Connect for Desktop programmer app or nrfutil command line tool. So soldering a debug header is not a good option for me. My guess is that my flash space problem is due to the large size of the bootloader that the dongle comes with (about 100K) 

    Questions about option 2 (using mcuboot)

    1. The docs don't say if mcuboot will be replacing the bootloader or it will be just added 

    2. The mesh distributor sample already builds the mcuboot application. Can you elaborate how that would work? Will I have  versions of the mcuboot  if I first load mcuboot on the board as described in option 2?

    Thanks

  • Hi,

    Have you looked at our Memory footprint optimization guide? This gives recommendations for how to reduce the memory footprint of your application.

    Best regards,
    Marte

  • Yes. Most of them apply to RAM although some do apply to flash
    Tried several, no luck

    Question

    The distributor sample has the mcuboot bootloader. 
    What happens if I overwrite the Open DFU bootloader that is present on the dongle and just use  the mcuboot to start my app ?
    Any side effects I should be aware of?

  • Hi,

    Using MCUboot only is basically the option "3. Using an External Debug Probe" mentioned earlier in this thread. It does require you to connect with a programmer for the initial programming. After that, further DFU can be done over USB using MCUboot. Please note that any application must then be built for use with MCUboot only, which has implications for memory layout.

    If at some point you want to "factory reset" the dongle into the state it was shipped with from us, then you need to use a programmer in order to get back to the nRF5 based DFU bootloader. Apart from that, if you are happy with using MCUboot, then the Dongle will now work just as any other custom product out in the field.

    Regards,
    Terje

  • My main hurdle now is that the image does not fit - about 7000 bytes short. Suppose I solve that problem and now I have the image that contains mcuboot and my application. If I load it on a dongle using nRF programmer, will my app run? I need mcuboot  because I plan to use the dongle to distribute firmware updates via mesh

Reply
  • My main hurdle now is that the image does not fit - about 7000 bytes short. Suppose I solve that problem and now I have the image that contains mcuboot and my application. If I load it on a dongle using nRF programmer, will my app run? I need mcuboot  because I plan to use the dongle to distribute firmware updates via mesh

Children
No Data
Related