Build error on Bootloader example

Hi,

   SDK: 14.2   Software device:332(5.0.0)

     I want to use a bootloader to update my APP image. So I use DFU example and change some setting as below

  • /components/softdevice/s132/headers/nrf52
  • /components/softdevice/s132/headers
  • Defined symbols is S132

has been changed to:

  • /components/softdevice/s332/headers/nrf52
  • /components/softdevice/s332/headers
  • Defined symbols is S332

in the IAR

When I build All. I got a error as below

Error[Lp011]: section placement failed

unable to allocate space for sections/blocks with a total estimated minimum size of 0x9ac3 bytes (max align 0x10) in <[0x7'8000-0x7'dfff]> (total uncommitted space 0x5e00).

I think that it is a flash area setting error. But I think this should not need to change

please give me a suggestion. 

=========================  Update ==================================

If I change flash setting as below, I can build successfully.

But I have another issue. if I burn this bootloader image to PCA14000 board with softdevice by nRFgo. (no application image)

I can't saw dfu advertising on my nrf connect.

But I run debug mode by IAR as below. after press run button, I can saw dfu adverting on my nrf connect.

 

Why?????

Thank you 

John.

  • Hi John,

    What's the flash size of your bootloader ? By default the bootloader when built with release mode (optimization for size, no debugging information) should be less than 24kB . Please make sure you have configured the code optimization correctly. 

    It's the reason why you move the start address down and it can compile. 

    I would suggest you to test with unmodified example (S132) first before moving to modify it and flash S332. Please make sure you eraes the chip before you test because the start address of the bootloader is written into UICR and it won't automatically update when you flash new firmware with different start address. 

  • Hi Hung,

      I try to use s132 example and don't change anything. But I meet same issue about flash address.

    Error[Lp011]: section placement failed

    unable to allocate space for sections/blocks with a total estimated minimum size of 0x9a87 bytes (max align 0x10) in <[0x7'8000-0x7'dfff]> (total uncommitted space 0x5e00).

    Also, I think ram address is very important. 

    Which flash/RAM start and end address I should use??

    Thank you.

    John.

        

      

  • Hi John,

    I suspect that the IAR compiler was not configured to use optimization, please double check. 


    You can test the pca10040_debug project to check. In this project we don't use optimization and the size of the bootloader is bigger. 

    If you test with Segger Embedded Studio or gcc, you will see that the compiled size of the bootloader (not the debug version) is only about 24kB

Related