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

  • Hi Vidar,

    The link help me solve why there is an extra bytes in my bootloader code when enabling the:

    uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used)) = {BANK_VALID_APP} ;

    The work around was suggested that merging the bootloader_setting.hex with the code of

    uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used));

    But then is still when generating the package size its still above 16k. *.bin = 15368, *.dat = 14, *.json = 492. A total of 16,226 bytes. The nRF_toolbox always says "data Size Exceeds".

    Do you have any idea on how to lower it below 16k.

    Thanks.

Reply
  • Hi Vidar,

    The link help me solve why there is an extra bytes in my bootloader code when enabling the:

    uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used)) = {BANK_VALID_APP} ;

    The work around was suggested that merging the bootloader_setting.hex with the code of

    uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used));

    But then is still when generating the package size its still above 16k. *.bin = 15368, *.dat = 14, *.json = 492. A total of 16,226 bytes. The nRF_toolbox always says "data Size Exceeds".

    Do you have any idea on how to lower it below 16k.

    Thanks.

Children
No Data
Related