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 Bei Now instead of using GCC, I used Keil to build the DFU example under the below location in SDK

    .\nRF51_SDK_9.0.0_2e23562\examples\dfu\bootloader\pca10028\dual_bank_ble_s110\arm5_no_packs
    

    Didn't make any changes to it , just compiled it and tried loading. I got the following error

    Program Size: Code=12712 RO-data=380 RW-data=352 ZI-data=6108  
    FromELF: creating hex file...
    ".\_build\nrf51422_xxac.axf" - 0 Error(s), 0 Warning(s).
    *** Completed Cross-Module-Optimization after 3 iteration(s).
    Build Time Elapsed:  00:00:28
    nrfjprog.exe --family NRF51 --program "D:\Projects\Forkbeard\nRF51_SDK_9.0.0_2e23562\examples\dfu\bootloader\pca10028\dual_bank_ble_s110\arm5_no_packs\_build\nrf51422_xxac.HEX"
    ERROR: Option "--family" provided is incompatible with any of the erase, program, and reset arguments.
    
Reply
  • @Hung Bei Now instead of using GCC, I used Keil to build the DFU example under the below location in SDK

    .\nRF51_SDK_9.0.0_2e23562\examples\dfu\bootloader\pca10028\dual_bank_ble_s110\arm5_no_packs
    

    Didn't make any changes to it , just compiled it and tried loading. I got the following error

    Program Size: Code=12712 RO-data=380 RW-data=352 ZI-data=6108  
    FromELF: creating hex file...
    ".\_build\nrf51422_xxac.axf" - 0 Error(s), 0 Warning(s).
    *** Completed Cross-Module-Optimization after 3 iteration(s).
    Build Time Elapsed:  00:00:28
    nrfjprog.exe --family NRF51 --program "D:\Projects\Forkbeard\nRF51_SDK_9.0.0_2e23562\examples\dfu\bootloader\pca10028\dual_bank_ble_s110\arm5_no_packs\_build\nrf51422_xxac.HEX"
    ERROR: Option "--family" provided is incompatible with any of the erase, program, and reset arguments.
    
Children
No Data
Related