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

examples DFU bootloader s110 SDK 9.0 fails JLink Flash download

Greetings, I've been using the ARM GCC tools for about 2 months with success for programming the NRF51 DK board. Now I would like to try out the example found in:

examples/dfu/bootloader

using the Makefile found in:

./nRF51_SDK_9.0.0_2e23562/examples/dfu/bootloader/pca10028/dual_bank_ble_s110/armgcc/Makefile

The example compiles/links fine for the target 'all':

$ make
rm -rf _build
echo  Makefile
Makefile
mkdir _build
Compiling file: app_error.c
Compiling file: app_scheduler.c
 ...
Linking target: nrf51422_xxac.out
Preparing: nrf51422_xxac.bin
Preparing: nrf51422_xxac.hex

   text	   data	    bss	    dec	    hex	filename
  14424	    108	   3250	  17782	   4576	_build/nrf51422_xxac.out

However, when attempting to flash the bootloader using JLinkExe (Mac OSX)

/Applications/SEGGER/JLink/JLinkExe -device nrf51822 -if swd -speed 1000
SEGGER J-Link Commander V5.02 ('?' for help)
Compiled Aug 28 2015 19:43:50
Info: Device "NRF51822_XXAA" selected.
...
J-Link>loadfile _build/nrf51422_xxac.hex
Downloading file [_build/nrf51422_xxac.hex]...Info: J-Link: Flash download: Flash programming performed for 3 ranges (14336 bytes)
Info: J-Link: Flash download: Total time needed: 0.643s (Prepare: 0.097s, Compare: 0.025s, Erase: 0.377s, Program: 0.133s, Verify: 0.000s, Restore: 0.009s)
    
****** Error: Programming failed @ address 0x10001000 (block verification error)
Verification failed @ address 0x0003C000
Error while programming flash: Verify failed.
J-Link>

Checking the linker script file: examples/dfu/bootloader/dfu_gcc_nrf51.ld

The size and location information seem correct:

  /** Location of bootloader setting in at the last flash page. *
  BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x0400

-- I see now that the failure occurs at the UICR address. Yet I do not know how to fix that.

Any insights?

Thanks, -- Nat

Related