Sample smp_svr on NRF52840 dongle: .text does not fit in FLASH

Hi,

I am trying to evaluate the provided smp_svr sample with the BLE DFU on the NRF52840 dongle after I have already tested it on the DK.

I get the following error message during the build: zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'. Region `FLASH' overflowed by 10876 bytes. I assume the reason for it is the bootloader that is required for flashing the dongle. What do I have to do to get it work on the dongle?

Thank you!

Elias

Parents
  • Spector said:
    * For cmake add  DMCUBOOT_OVERLAY_CONFIG="mcuboot.conf"

    I don't know where you got this from. What file are you trying to point to?

    To build the sample for nRF52840dongle, use the sampe found in zephyr\samples\subsys\mgmt\mcumgr\smp_svr (the one you are already using), and I usually just copy that folder to any location, and then I add it as an existing application in VS Code (from the new location). After that, add a build configuration where you take the overlay-bt.conf file as an extra KConfig fragment, and build.

    I see that if I build this for the nRF52840 dongle, it fails because it overflows the Flash. The dongle, unlike the nRF52840 DK doesn't have external flash. 

    It doesn't overflow by much, though. You could try to strip out the nRF5 bootloader from the dongle (using an overlay file). So that will give you one more page (4kb) from the beginning, and about 32+128kb more flash at the top of the ram:

    Perhaps it is easier to start with the nRF52840DK board and strip out the external flash. But if you remove the original bootloader from the dongle, then please note that you need to add something to your own bootloader setting the correct regulator settings. Please read about this in this blog post:

     nRF52840 Dongle Programming Tutorial 

    Particularly the section: "Adapting firmware to set REGOUT0 properly"

    Best regards,

    Edvin

Reply
  • Spector said:
    * For cmake add  DMCUBOOT_OVERLAY_CONFIG="mcuboot.conf"

    I don't know where you got this from. What file are you trying to point to?

    To build the sample for nRF52840dongle, use the sampe found in zephyr\samples\subsys\mgmt\mcumgr\smp_svr (the one you are already using), and I usually just copy that folder to any location, and then I add it as an existing application in VS Code (from the new location). After that, add a build configuration where you take the overlay-bt.conf file as an extra KConfig fragment, and build.

    I see that if I build this for the nRF52840 dongle, it fails because it overflows the Flash. The dongle, unlike the nRF52840 DK doesn't have external flash. 

    It doesn't overflow by much, though. You could try to strip out the nRF5 bootloader from the dongle (using an overlay file). So that will give you one more page (4kb) from the beginning, and about 32+128kb more flash at the top of the ram:

    Perhaps it is easier to start with the nRF52840DK board and strip out the external flash. But if you remove the original bootloader from the dongle, then please note that you need to add something to your own bootloader setting the correct regulator settings. Please read about this in this blog post:

     nRF52840 Dongle Programming Tutorial 

    Particularly the section: "Adapting firmware to set REGOUT0 properly"

    Best regards,

    Edvin

Children
No Data
Related