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

OTA DFU Bootloader SDK9.0.0

Hi all,

I am trying to put the NRF51822 XXAA chip into DFU mode (the board used is a custom one and not the one in DK/EK).

SoftDevice V8.0.0 Bootloader Source from SDK9.0.0

I was able to build the bootloader successfully using GCC but when both the SD(loaded 1st) and Bootloader.hex(downloaded 2nd) are downloaded I am unable to see the peripheral advertising as DFUTarg. I tried to debug with a breakpoint on the main function but the breakpoint was not hit. So I guess the problem to be either on the startup file or on the linker file.

Attached below is the bootloader source code that I have made use.

Bootloader.zip

Kindly help me in fixing the issue so that I am able to proceed with OTA DFU of App firmware

Thanks

Parents
  • @martial: In your makefile, you use this linker script:

    nrf51822_xxaa_s110: LINKER_SCRIPT=gcc_s110_nrf51822_xxaa.ld
    

    This is wrong, please use dfu_gcc_nrf51.ld. Without the correct linker script, the setting in UICR area is not set and the MBR will not be able to find your bootloader start address. If you change to:

    nrf51822_xxaa_s110: LINKER_SCRIPT=dfu_gcc_nrf51.ld
    

    It should work.

  • @Hung Bui Once I removed RTT, it worked. Thank you very much. But one more question; How did you convert the RAM settings. Can you help me on that please?

    You are using the 16kB RAM, the example made for 32kB Ram variant. Please modify the Project Setting ->Target -> IRAM1 and IRAM2 setting to match with your chip :
    IRAM1:
    Start: 0x20002C00 , Size: 0x5380  --> 0x1380
    IRAM2:
    Start: 20003F80, Size 0x80
    

    Should I change to these settings for any program that I would compile here after for the board (including the application examples I mean)? It worked for me with the stack size 2048 and why must it be reduced to 2016? what are reasons for you reducing stack from 2048 --> 2016??

Reply
  • @Hung Bui Once I removed RTT, it worked. Thank you very much. But one more question; How did you convert the RAM settings. Can you help me on that please?

    You are using the 16kB RAM, the example made for 32kB Ram variant. Please modify the Project Setting ->Target -> IRAM1 and IRAM2 setting to match with your chip :
    IRAM1:
    Start: 0x20002C00 , Size: 0x5380  --> 0x1380
    IRAM2:
    Start: 20003F80, Size 0x80
    

    Should I change to these settings for any program that I would compile here after for the board (including the application examples I mean)? It worked for me with the stack size 2048 and why must it be reduced to 2016? what are reasons for you reducing stack from 2048 --> 2016??

Children
No Data
Related