nRF51822 mbed kit with product key (contact technical support if it was not written on the mbed kit package)
This blog post will not take installation of above dependencies into consideration.
Configuring a project for CMSIS-DAP debugger:
Open a project in Keil, and go to Options for Target, and select CMSIS-DAP Debugger under the debug tab:
Check that the "Use Debug Driver" is checked under Utilities tab:
Now go into the debugger settings and verify that the nRF51xxx programming algorithm is chosen:
Go to tab "debug" and see that the debugger and device is recognized and properly configured:
Loading Softdevice S110 v6 or older:
As the softdevice depends on writing to UICR in these versions, and the flash algorithm does not allow this, we must use the MBED enumerated drive to load the softdevice.
Download the S110 softdevice from our website.
Extract the content to your desired location.
Copy the softdevice .hex file to the MBED enumerated drive X:\ (where X is the MBED drive for your specific computer)
Once loaded, please follow the "configuring a project for CMSIS-DAP debugger" section for the s110 project of your desire.
Loading Softdevice S110 v7 or newer:
Since this version of the softdevice does not write into UICR, you have two options:
Load it using the same option as for S110 <= v6
Load it by creating an empty project, with the softdevice .hex file as the "Name of Executable" in Keil project settings. Copy the softdevice .hex file to the location of the newly created "empty" Keil project.
I'm getting this error when trying to program the softdevice:
Error: Flash Download failed - "Cortex-M0"
Try blanking the nRF device. This is done by holding in the RESET button for 5 seconds.
The LED "LD3" will start blinking slowly, then faster. Hold the RESET button until the LED is continuously lit. Now the flash on the nRF should be completely erased.
Note: The softdevice is not erase-protected using these method, so do not choose "Erase Full Chip" under "Flash Download" section when developing your application!
This behavior will change with future versions of the flash programming algorithm that is supplied with the nRF51 SDK installer.
I can download, softdevice and program
can see service broadcasting
but no connection is success.
I had sent the softdevice S110v7.0.0 to mbed driver.
The start address is point to 0x00000050 when I try to start debug session for ble_app_beacon proj
Is there something I missed?
I have not tested this procedure with any other debugger.
It will work with the CMSIS-DAP. STlink and ULink should work, but it's untested from my end.
@hkn - can you comment if this (or a similar step) can be used to flash a nrf51822 breakout board ? I know that we also need to mergehex the softradio, but I dont know if I can use a Ulink/Stlink with the Keil to do that.
I had the same issue initially on my PC.
Try downloading the mbed-drivers:
It should enumerate three devices:
See if these are present on your PC.