This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"Error: Flash Download failed - Cortex-M0" after upgrade to SDK 5.1.0

Having just upgraded to the Soft Device 6.0.0 and SDK 5.1.0, I can no longer flash my nRF51822 from Keil. I get this in the Keil console:

Load "C:\\Users\\Eliot\\dev\\nrf51_sdk\\nrf51822\\Board\\nrf6310\\s110\\ble_app_proximity\\arm\\_build\\ble_app_proximity.axf" 
Set JLink Project File to "C:\Users\Eliot\dev\nrf51_sdk\nrf51822\Board\nrf6310\s110\ble_app_proximity\arm\JLinkSettings.ini"
* JLink Info: Device "NRF51822_XXAA" selected (257 KB flash, 16 KB RAM).
 
JLink info:
------------
DLL: V4.80 , compiled Dec 20 2013 19:37:53
Firmware: J-Link Lite-Cortex-M V8 compiled Aug 29 2012 15:24:23
Hardware: V8.00
S/N : 518002874 
Feature(s) : GDB 
 
* JLink Info: Found SWD-DP with ID 0x0BB11477
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
ROMTableAddr = 0xE00FF003
 
Target info:
------------
Device: nRF51822_xxAA
VTarget = 3.338V
State of Pins: 
TCK: 0, TDI: 0, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints:          2
JTAG speed: 2000 kHz
 
Erase Failed!
Error: Flash Download failed  -  "Cortex-M0"

and this in the JLinkLog.txt:

T0EEC 002:522 SEGGER J-Link V4.80 Log File (0000ms, 2271ms total)
T0EEC 002:522 DLL Compiled: Dec 20 2013 19:37:53 (0000ms, 2271ms total)
T0EEC 002:522 Logging started @ 2014-01-08 19:20 (0000ms, 2271ms total)
T0EEC 002:522 JLINK_SetWarnOutHandler(...) (0001ms, 2272ms total)
T0EEC 002:523 JLINK_OpenEx(...)
Firmware: J-Link Lite-Cortex-M V8 compiled Aug 29 2012 15:24:23
Hardware: V8.00
S/N: 518002874
Feature(s): GDB  returns O.K. (0264ms, 2536ms total)
T0EEC 002:787 JLINK_SetErrorOutHandler(...) (0000ms, 2536ms total)
T0EEC 002:787 JLINK_ExecCommand("ProjectFile = "C:\Users\Eliot\dev\nrf51_sdk\nrf51822\Board\nrf6310\s110\ble_app_proximity\arm\JLinkSettings.ini"", ...)  returns 0x00 (0001ms, 2537ms total)
T0EEC 002:798 JLINK_ExecCommand("Device = nRF51822_xxAA", ...)Device "NRF51822_XXAA" selected (257 KB flash, 16 KB RAM).  returns 0x00 (0009ms, 2546ms total)
T0EEC 002:807 JLINK_ExecCommand("DisableConnectionTimeout", ...)  returns 0x01 (0000ms, 2547ms total)
T0EEC 002:808 JLINK_GetHardwareVersion()  returns 0x13880 (0000ms, 2547ms total)
T0EEC 002:808 JLINK_GetDLLVersion()  returns 48000 (0000ms, 2547ms total)
T0EEC 002:808 JLINK_GetFirmwareString(...) (0000ms, 2547ms total)
T0EEC 002:822 JLINK_GetDLLVersion()  returns 48000 (0001ms, 2548ms total)
T0EEC 002:823 JLINK_GetCompileDateTime() (0000ms, 2548ms total)
T0EEC 002:826 JLINK_GetFirmwareString(...) (0000ms, 2548ms total)
T0EEC 002:830 JLINK_GetHardwareVersion()  returns 0x13880 (0000ms, 2548ms total)
T0EEC 002:840 JLINK_TIF_Select(JLINKARM_TIF_SWD)  returns 0x00 (0001ms, 2549ms total)
T0EEC 002:841 JLINK_SetSpeed(2000) (0001ms, 2550ms total)
T0EEC 002:842 JLINK_GetId() >0x108 TIF>Found SWD-DP with ID 0x0BB11477 >0x35 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x35 TIF> >0x0D TIF> >0x28 TIF> >0x35 TIF> >0x35 TIF> >0x35 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x35 TIF> >0x35 TIF> >0x35 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x35 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x35 TIF> >0x35 TIF> >0x0D TIF> >0x28 TIF> >0x35 TIF> >0x35 TIF>
Found Cortex-M0 r0p0, Little endian. -- CPU_WriteMem(4 bytes @ 0xE0002000) -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU_ReadMem(4 bytes @ 0xE0002000)FPUnit: 4 code (BP) slots and 0 literal slots -- CPU_ReadMem(4 bytes @ 0xE000EDFC) -- CPU_ReadMem(4 bytes @ 0xE0001000) -- CPU_WriteMem(4 bytes @ 0xE0001000) -- CPU_ReadMem(4 bytes @ 0xE00FF018) >0x35 TIF>  returns 0x0BB11477 (0033ms, 2583ms total)
T0EEC 002:875 JLINK_GetDeviceFamily()  returns 6 (0000ms, 2583ms total)
T0EEC 002:877 JLINK_ReadMem (0xE00FFFF0, 0x0010 Bytes, ...) -- CPU is running -- CPU_ReadMem(16 bytes @ 0xE00FFFF0) -- Data:  0D 00 00 00 10 00 00 00 05 00 00 00 B1 00 00 00  returns 0x00 (0002ms, 2585ms total)
T0EEC 002:879 JLINK_ReadMem (0xE00FFFD0, 0x0020 Bytes, ...) -- CPU is running -- CPU_ReadMem(32 bytes @ 0xE00FFFD0) -- Data:  04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...  returns 0x00 (0001ms, 2586ms total)
T0EEC 002:880 JLINK_ReadMem (0xE00FF000, 0x0018 Bytes, ...) -- CPU is running -- CPU_ReadMem(24 bytes @ 0xE00FF000) -- Data:  03 F0 F0 FF 03 20 F0 FF 03 30 F0 FF 00 00 00 00 ...  returns 0x00 (0000ms, 2586ms total)
T0EEC 002:880 JLINK_ReadMemU32(0xE000ED00, 0x0001 Items, ...) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000ED00) -- Data:  00 C2 0C 41  returns 0x01 (0001ms, 2587ms total)
T0EEC 002:881 JLINK_SetResetType(JLINKARM_RESET_TYPE_NORMAL)  returns JLINKARM_RESET_TYPE_NORMAL (0000ms, 2587ms total)
T0EEC 002:881 JLINK_Reset() -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDFC) >0x35 TIF> -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000ED0C) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDF0) -- CPU is running -- CPU_WriteMem(4 bytes @ 0xE000EDFC) -- CPU is running -- CPU_ReadMem(4 bytes @ 0xE000EDF0)
 -- CPU_WriteMem(4 bytes @ 0xE0002000) (0020ms, 2607ms total)
T0EEC 002:901 JLINK_Halt()  returns 0x00 (0000ms, 2607ms total)
T0EEC 002:901 JLINK_IsHalted()  returns TRUE (0000ms, 2607ms total)
T0EEC 002:901 JLINK_ReadMemU32(0xE000EDF0, 0x0001 Items, ...) -- CPU_ReadMem(4 bytes @ 0xE000EDF0) -- Data:  03 00 03 00  returns 0x01 (0001ms, 2608ms total)
T0EEC 002:902 JLINK_WriteU32(0xE000EDF0, 0xA05F0003) -- CPU_WriteMem(4 bytes @ 0xE000EDF0)  returns 0x00 (0001ms, 2609ms total)
T0EEC 002:903 JLINK_WriteU32(0xE000EDFC, 0x01000000) -- CPU_WriteMem(4 bytes @ 0xE000EDFC)  returns 0x00 (0000ms, 2609ms total)
T0EEC 002:911 JLINK_GetHWStatus(...)  returns 0x00 (0001ms, 2610ms total)
T0EEC 002:917 JLINK_GetNumBPUnits(Type = 0xFFFFFF00)  returns 0x04 (0000ms, 2610ms total)
T0EEC 002:917 JLINK_GetNumBPUnits(Type = 0xF0)  returns 0x2000 (0000ms, 2610ms total)
T0EEC 002:917 JLINK_GetNumWPUnits()  returns 0x02 (0000ms, 2610ms total)
T0EEC 002:922 JLINK_GetSpeed()  returns 0x7D0 (0000ms, 2610ms total)
T0EEC 002:925 JLINK_ReadMemU32(0xE000E004, 0x0001 Items, ...) -- CPU_ReadMem(4 bytes @ 0xE000E004) -- Data:  00 00 00 00  returns 0x01 (0001ms, 2611ms total)
T0EEC 002:926 JLINK_Halt()  returns 0x00 (0000ms, 2611ms total)
T0EEC 002:926 JLINK_IsHalted()  returns TRUE (0000ms, 2611ms total)
T0EEC 006:354 JLINK_Close() >0x42 TIF> >0x28 TIF> >0x35 TIF> (0006ms, 2617ms total)
T0EEC 006:354  (0006ms, 2617ms total)
T0EEC 006:354 Closed (0006ms, 2617ms total)

I'm using the target nrf51822_xxaa_s110 (256K) in Keil and have check the memory addresses and I'm not trying to overwrite the soft device.

Have also checked everything in these posts:

devzone.nordicsemi.com/.../error-flash-download-failed-cortex-m0

devzone.nordicsemi.com/.../why-do-i-get-“error-flash-download-failed-–-cortex-m0”-when-downloading-a-project-from-keil

devzone.nordicsemi.com/.../uvision-reflashed-j-link-on-nrf51822-ek,-failed,-and-pca10001-no-longer-works

Here's my memory settings in the Kiel project:

rom start: 0x14000
rom size: 0x2B000
ram start: 0x20002000
ram size: 0x2000

I'm using Keil uVision 5.1.0.0 and have just installed the Segger driver from Setup_JLinkARM_V480.exe, including the CDC option.

Parents
  • I've been chasing this around in circles for the last three hours and can't get it to work at all.

    I'm running Keil 5.1 and I get the same error when trying to flash a device. I have nothing under the Devices tab on the options for target nrf51822_xxaa_s110 (256k)... so it has no idea how to flash it (if I look under debug etc and the flashing algorithm its blank and if I try to add it's not found).

    I've installed the legacy support and then went back and forth and reinstalled the SDK in all sorts of order..

    This is amazingly difficult to get a simple SDK up and running.

    I just can't get it to list the nRF51822 device at all! Driving me slightly insane.

  • Another cause for download errors is if you have a softdevice loaded in your device and try to program it with an app that does not include the soft device. Solution is to erase the chip (i.e., the soft device) then program with your app.

Reply
  • Another cause for download errors is if you have a softdevice loaded in your device and try to program it with an app that does not include the soft device. Solution is to erase the chip (i.e., the soft device) then program with your app.

Children
No Data
Related