This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Response for 'Start DFU' received - Status: Data Size Exceeds Limit

Hi, Guys,

I am integrating the proximity app with dfu, everything else goes well. However, when I try to update bootloader through dfu, it failed. I check the MCP log, found that the issue is when MCP initial the update by sending a "Start DFU" to slave, it got response said "Data Size Exceeds Limit". What does that mean? Does it means the new bootloader is bigger than the old one? But the old bootloader is exactly the same as new one. It's all goes fine when I update application and softdevice. Thanks.

I am using nrf51 dk board pca10028, with nrf51422 on it. softdevice version is s130 2.0.0. SDK is v11.0.0. dev environment is gcc_arm + eclipse. I am using MCP as a dfu master.

  • Hi,

    The size of the bootlaoder image must not exceed 0x3FC00 - BOOTLOADER_REGION_START as the last flash page is reserved by the bootloader and used to keep the bootloader states ( bootloader_settings_t) So with the defualt start address of 0x3C000 the .bin file must be within 15KB. If it is 16K in this case it typically means that you have initialized the bootloader settings page in your code which you only can do with "production" images. Please check whether this is the case.

    Boot settings should be declared like this without assigning any value to it:

    uint8_t m_boot_settings[CODE_PAGE_SIZE] __attribute__ ((section(".bootloaderSettings")));   
    

    and ensure that the "NOLOAD" directive is used on .bootloaderSettings in you linker script:

    .bootloaderSettings(NOLOAD) :
    {
    
    } > BOOTLOADER_SETTINGS
    

    If the binary image is around 250MB+ it means that UICR section (only set when programing through debug interface) wasn't stripped away from the .hex before converting it to a binary. But that is handled automatically if you use the nrf utility:

    nrfutil dfu genpkg ../bl.zip --bootloader BOOTLOADER.HEX --application-version 0xFFFFFFFF 
    --dev-revision 0xFFFF --dev-type 0xFFFF --sd-req 0xFFFE
    

    Note that the PC version of MCP runs the above command internally if you provide the bootloader .hex file.

Related