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

Single bank Bootloader is over 16k when generating zip file for OTA

Hi there,

I have a nrf51422CEAA chip with 16k variant with single bank bootloader code. I compile it using (03) optimazation and the final result is :

"Program Size: Code=12000 RO-data=332 RW-data=1248 ZI-data=3976"

My Keil setting is what this support group suggested. And these are: IROM1: 0x3C000 - 0x3C00 IRAM1: 0x20002C00 - 0x1380 IRAM2: 0x20003F80 - 0x80 (noint, checked)

I deleted all the button and LED component code save ROM and RAM. This bootloader is using s310_nrf51422_3.0.0_softdevice and working good with my app code and softdevice and but manually flashing it using Keil.

But when I make a zip for bootloader OTA, the size is more than 16k.

Will you help me solve this problem. I wanted to OTA the bootloader.

Thanks, MC With_BANK_VALID_APP_bt.map nrf51422_xxac.map With_BANK_VALID_APP_bt.hex nrf51422_xxac.hex

Parents
  • Hi,

    Are you using nrfutil to generate the distribution file as explained here?

    e.g., nrfutil dfu genpkg ../application.zip --bootloader .hex --application-version 0xFFFFFFFF --dev-revision 0xFFFF --dev-type 0xFFFF --sd-req 0xFFFE

    Note that this tool strips the UICR section from the .hex file before converting to a binary image. Otherwise you'd gotten a lot of byte padding in the image since UICR register are memory mapped to 0x10001000 (0x3c000 -> 0x10001000 = ~250MB).

    Attachment:

    application.zip

  • The .bin file is just exceeding 15K. Note that it's only the binary image that will be loaded to flash and potentially cause the "data Size Exceeds". The content of .dat will be transferred in the init packet, and loaded to RAM, and the json is used by the smart phone app determine the content of the distribution packet.

    Could you share the .map file from your build output so I can see if there might be anything linked outside of the default address range?

Reply
  • The .bin file is just exceeding 15K. Note that it's only the binary image that will be loaded to flash and potentially cause the "data Size Exceeds". The content of .dat will be transferred in the init packet, and loaded to RAM, and the json is used by the smart phone app determine the content of the distribution packet.

    Could you share the .map file from your build output so I can see if there might be anything linked outside of the default address range?

Children
No Data
Related