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.

Reply
  • @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.

Children
  • @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.
    
  • SO I tried loading with nRFgo, it was successful but the device was not advertising at all (as DFUTarg). What did I do wrong? I just compiled and loaded the example program. As I Stated earlier, I use

    • SDK 9.0.0
    • SD 8.0.0
    • nrf51822 CEAAE00 (0x0079) which has 256 kB FLASH, 16 kB RAM
  • @maritial: please download and install latest nRFTools from us. Or you can remove -family in the command box in Project Setting -> Utilities.

  • Receiving an error during compile time as below for changing the value as given above

    compiling SEGGER_RTT.c...
    compiling system_nrf51.c...
    linking...
    .\_build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching segger_rtt.o(.data).
    .\_build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching dfu_transport_ble.o(.data).
    .\_build\nrf51422_xxac.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_conn_params.o(.bss).
    Not enough information to list image symbols.
    Not enough information to list the image map.
    Finished: 2 information, 0 warning and 16 error messages.
    ".\_build\nrf51422_xxac.axf" - 16 Error(s), 0 Warning(s).
    *** Completed Cross-Module-Optimization after 2 iteration(s).
    Target not created.
    Build Time Elapsed:  00:00:18
    
  • @Martial: Please remove RTT, there won't be enough RAM for RTT in the DFU.

    In addition, you may need to change the Stack_size to a little bit smaller, it works for me to change the stack size to 2016.

Related