I tried reducing the debug clock to 20khz. Here is the log-
SEGGER J-Link GDB Server V5.02d Command Line Version
JLinkARM.dll V5.02d (DLL compiled Sep 18 2015 20:21:49)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: MKL26Z128xxx4
Target interface: SWD
Target interface speed: 20kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Sep 18 2015 19:53:12
Hardware: V9.30
S/N: 59304847
Feature(s): GDB
Checking target voltage...
Target voltage: 3.36 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
R0 = 7FFFDDFD, R1 = FFFFFEDF, R2 = CFDD1DFF, R3 = EFFF7BFF
R4 = BEFDDFFF, R5 = FF5FF7FD, R6 = FFDFFC7F, R7 = FBDFFFFE
R8 = BFFBFDFE, R9 = FD14DFAF, R10= FFAFFFE7, R11= CFDFF6F7
R12= 7DFFFFEF, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= FFFEFFFC
R14(LR) = FFFFFFF9, R15(PC) = FFFFFFFE
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
ERROR: Failed to preserve original RAM content before CPU clock frequency detection!
Failed to restore original RAM content after CPU clock frequency detection!
Failed to enable SWO. Could not measure target CPU frequency.
Downloading 192 bytes @ address 0x00000000 - Verified OK
Downloading 16 bytes @ address 0x00000400 - Verified OK
Downloading 2480 bytes @ address 0x00000410 - Verified OK
Downloading 8 bytes @ address 0x00000DC0 - Verified OK
Downloading 4 bytes @ address 0x00000DC8 - Verified OK
Downloading 4 bytes @ address 0x00000DCC - Verified OK
Downloading 96 bytes @ address 0x00000DD0 - Verified OK
Downloading 24 bytes @ address 0x00000E30 - Verified OK
ERROR: Failed to download RAMCode.
Failed to download RAMCode!
Writing register (PC = 0x000006d0)
Read 4 bytes @ address 0x000006D0 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x00000514 (Data = 0xFFFF)
Read 2 bytes @ address 0x00000514 (Data = 0xFFFF)
Resetting target
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
Read 2 bytes @ address 0x00000514 (Data = 0xFFFF)
Read 2 bytes @ address 0x00000514 (Data = 0xFFFF)
Read 2 bytes @ address 0x00000514 (Data = 0xFFFF)
R0 = 7FFFDDFD, R1 = FFFFFEDF, R2 = CFDD1DFF, R3 = EFFF7BFF
R4 = BEFDDFFF, R5 = FF5FF7FD, R6 = FFDFFC7F, R7 = FBDFFFFE
R8 = BFFBFDFE, R9 = FD14DFAF, R10= FFAFFFE7, R11= CFDFF6F7
R12= 7DFFFFEF, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= FFFEFFFC
R14(LR) = FFFFFFF9, R15(PC) = FFFFFFFE
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
Setting breakpoint @ address 0x00000514, Size = 2, BPHandle = 0x0001
Starting target CPU...
ERROR: Can not read register 15 (R15) while CPU is running
...Target halted (PC = 0x00000000)
Reading all registers
ERROR: Can not read register 0 (R0) while CPU is running
ERROR: Can not read register 1 (R1) while CPU is running
ERROR: Can not read register 2 (R2) while CPU is running
ERROR: Can not read register 3 (R3) while CPU is running
ERROR: Can not read register 4 (R4) while CPU is running
ERROR: Can not read register 5 (R5) while CPU is running
ERROR: Can not read register 6 (R6) while CPU is running
ERROR: Can not read register 7 (R7) while CPU is running
ERROR: Can not read register 8 (R8) while CPU is running
ERROR: Can not read register 9 (R9) while CPU is running
ERROR: Can not read register 10 (R10) while CPU is running
ERROR: Can not read register 11 (R11) while CPU is running
ERROR: Can not read register 12 (R12) while CPU is running
ERROR: Can not read register 13 (R13) while CPU is running
ERROR: Can not read register 14 (R14) while CPU is running
ERROR: Can not read register 15 (R15) while CPU is running
ERROR: Can not read register 16 (XPSR) while CPU is running
ERROR: Can not read register 17 (MSP) while CPU is running
ERROR: Can not read register 18 (PSP) while CPU is running
ERROR: Can not read register 24 (PRIMASK) while CPU is running
ERROR: Can not read register 25 (BASEPRI) while CPU is running
ERROR: Can not read register 26 (FAULTMASK) while CPU is running
ERROR: Can not read register 27 (CONTROL) while CPU is running
Removing breakpoint @ address 0x00000514, Size = 2
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)