DFU Update . Cannot fit error Size (0xA69C)

Hi . We have been struggling for months now to achieve DFU updates for our firmware with no success. 
On our latest stage we get "Can't find room for update".
We are just trying to replace the existing firmware with the same version so there is no actuall difference to the size of the installed firmware versus the new one. 

The size is 42652 bytes and we select single_bank update so theoritically it should fit, or we miss something?

In general is the Nrf52810 able to perform a DFU update with a 42kbyte firmware?
We are using the s112 soft device. Here is the error log.

Parents
  • Hi Anestis Kyvranoglou,

    I just attempted what you did, not with a real nRF52810, but with a nRF52 DK emulated development environment. However, I successfully performed DFU with a 52552 bytes application.

    So, the nRF52810 should be able to perform a DFU update with a 42kB firmware, using the S112 SoftDevice and Single-bank DFU. Indeed, something could be missing here.

    If you wish for further support, may I ask how you have setup your project? What base example did you use? What option did you use to build?

    *Edited:

    For an example of something to note, a Secure Bootloader example built with the pca10040e_s112_ble_debug starts at address 0x00022000, while the same example built with the pca10040e_s112_ble starts at address 0x00025000. The debug bootloader therefore only allows 36kB application space, while the non-debug bootloader allows 48kB application space.

    For an example of something to note, a Secure Bootloader example built with the pca10040e_s112_ble_debug starts at address 0x00022000, while the same example built with the pca10040e_s112_ble starts at address 0x00028000. The debug bootloader therefore only allows 36kB application space, while the non-debug bootloader allows 60kB application space.

    Best regard,

    Hieu

  • Hello Hiew,

    I'm working with Anestis on this project.

    Thanks for your reply. 

    So, the project is based off the ble template project for the pca10040e, and we used the pca10040e ble secure bootloader (non debug version), and it has the same issue.

    The following is the project settings. The bootloader has the same settings as the secure ble pca10040e.

    Processor definitions

    APP_TIMER_V2
    APP_TIMER_V2_RTC1_ENABLED
    BOARD_CUSTOM
    CONFIG_GPIO_AS_PINRESET
    FLOAT_ABI_SOFT
    INITIALIZE_USER_SECTIONS
    NO_VTOR_CONFIG
    NRF52810_XXAA
    NRF52_PAN_74
    NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3
    NRF_SD_BLE_API_VERSION=7
    S112
    SOFTDEVICE_PRESENT

    Linker Placements Macros

    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x30000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x6000
    FLASH_START=0x19000
    FLASH_SIZE=0x17000
    RAM_START=0x20001ae0
    RAM_SIZE=0x4520

    Memory segments

    FLASH RX 0x0 0x30000;RAM1 RWX 0x20000000 0x6000

    Best regards,

    Abdelali

  • Hi Abdelali and Anestis,

    This stands out to me:

    FLASH_START=0x19000
    FLASH_SIZE=0x17000

    You are configuring your Flash Size to be 0x17000, so that is 92kB, not just 42kB.

    0x19000 + 0x17000 = 0x30000, which is well inside the address range of the bootloader.

    With the default nRF52810 bootloader setup, unfortunately your maximum flash size is 0xf000, 60kB.

    As you are sure that your application is only 42kB, you could just change FLASH_SIZE and that should fix it though.


    By the way, I had some incorrect numbers in my previous post so I will edit it now. The points still hold but it might throw off your calculations. Sorry about that.

    Best regard,

    Hieu

Reply Children
No Data
Related