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,

    This is my command in generating the bootloader package:

    nrfutil dfu genpkg --bootloader MyBT16kFile.hex --application-version 0xFFFFFFFF --dev-type 0x0### --dev-revision 0x0### --sd-req 0x## MyBT16kOTA.zip

    This much the same in you suggestion. ### is handled in the bootloader code.

    I tried the example dual bank of S310 but there is an error when converting to 16k but get struck with the error:

    ._build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching arm_startup_nrf51.o(STACK). ._build\nrf51422_xxac.axf: Error: L6407E: Sections of aggregate size 0x800 bytes could not fit into .ANY selector(s).

    I tried to search for the fix of this but no luck...I tried hacking the stack size to 255 and it compiled okay but I do not wan't to have a problem in the future of hacking stack.

    I am back to solving the puzzle of nrfutil why it exceeds 16k. Some note, I used the no pack of SDK9.0 for my code.

    -MC

Reply
  • Hi Vidar,

    This is my command in generating the bootloader package:

    nrfutil dfu genpkg --bootloader MyBT16kFile.hex --application-version 0xFFFFFFFF --dev-type 0x0### --dev-revision 0x0### --sd-req 0x## MyBT16kOTA.zip

    This much the same in you suggestion. ### is handled in the bootloader code.

    I tried the example dual bank of S310 but there is an error when converting to 16k but get struck with the error:

    ._build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching arm_startup_nrf51.o(STACK). ._build\nrf51422_xxac.axf: Error: L6407E: Sections of aggregate size 0x800 bytes could not fit into .ANY selector(s).

    I tried to search for the fix of this but no luck...I tried hacking the stack size to 255 and it compiled okay but I do not wan't to have a problem in the future of hacking stack.

    I am back to solving the puzzle of nrfutil why it exceeds 16k. Some note, I used the no pack of SDK9.0 for my code.

    -MC

Children
No Data
Related