AnsweredAssumed Answered

programming a custom kl03 device with jlink debugger

Question asked by Gnichi Mohamed on Mar 18, 2016
Latest reply on Mar 23, 2016 by ZhangJennie

Hello

I want to move my software from my frdm-kl03 to a custom board with a JLINK EDU debugger.

This is what i get when starting gdb

SEGGER J-Link GDB Server V5.10n Command Line Version

 

 

JLinkARM.dll V5.10n (DLL compiled Feb 19 2016 18:39:11)

 

 

-----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:                 MKL03Z32xxx4

Target interface:              SWD

Target interface speed:        30kHz

Target endian:                 little

 

 

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link V9 compiled Feb  2 2016 18:43:46

Hardware: V9.30

S/N: 269302272

OEM: SEGGER-EDU

Feature(s): FlashBP, GDB

Checking target voltage...

Target voltage: 3.03 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 = 0x20000600)

Target interface speed set to 1000 kHz

Resetting target

Halting target CPU...

...Target halted (PC = 0x1C0000C0)

R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000

R4 = 00000000, R5 = 1C001CA0, R6 = 00000000, R7 = 00000000

R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000

R12= 00000000, R13= 20000218, MSP= 20000218, PSP= FFFFFFFC

R14(LR) = 1C0015F9, R15(PC) = 1C0000C0

XPSR 61000000, APSR 60000000, 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

Downloading 192 bytes @ address 0x00000000 - Verified OK

Downloading 16 bytes @ address 0x00000400 - Verified OK

Downloading 16128 bytes @ address 0x00000410 - Verified OK

Downloading 4800 bytes @ address 0x00004310 - Verified OK

Downloading 8 bytes @ address 0x000055D0 - Verified OK

Downloading 4 bytes @ address 0x000055D8 - Verified OK

Downloading 4 bytes @ address 0x000055DC - Verified OK

Downloading 108 bytes @ address 0x000055E0 - Verified OK

Writing register (PC = 0x000004e8)

Read 4 bytes @ address 0x000004E8 (Data = 0xF002B672)

Read 2 bytes @ address 0x00000F3C (Data = 0x1C03)

Read 2 bytes @ address 0x00000E56 (Data = 0x1DFB)

Read 2 bytes @ address 0x00000E56 (Data = 0x1DFB)

Read 2 bytes @ address 0x00000E56 (Data = 0x1DFB)

Read 2 bytes @ address 0x000010EC (Data = 0x1D3B)

Resetting target

Halting target CPU...

...Target halted (PC = 0x1C0000C0)

Read 2 bytes @ address 0x00000E56 (Data = 0x1DFB)

Read 2 bytes @ address 0x00000E56 (Data = 0x1DFB)

Read 2 bytes @ address 0x00000E56 (Data = 0x1DFB)

R0 = 00000000, R1 = F000300C, R2 = 00000400, R3 = 00000000

R4 = 20000150, R5 = 20000208, R6 = 00000000, R7 = 1FFFFF65

R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000

R12= 00000000, R13= 20000218, MSP= 20000218, PSP= FFFFFFFC

R14(LR) = 1FFFFF5D, R15(PC) = 1C0000C0

XPSR 41000000, APSR 40000000, EPSR 01000000, IPSR 00000000

CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Reading all registers

Read 4 bytes @ address 0x1C0000C0 (Data = 0x490D480C)

Setting breakpoint @ address 0x00000E56, Size = 2, BPHandle = 0x0001

Setting breakpoint @ address 0x00000F3C, Size = 2, BPHandle = 0x0002

Setting breakpoint @ address 0x000010EC, Size = 2, BPHandle = 0x0003

Starting target CPU...

Debugger requested to halt target...

...Target halted (PC = 0x1C00071E)

Reading all registers

Removing breakpoint @ address 0x00000E56, Size = 2

Removing breakpoint @ address 0x00000F3C, Size = 2

Removing breakpoint @ address 0x000010EC, Size = 2

Read 4 bytes @ address 0x1C00071E (Data = 0xD0F52800)

Setting breakpoint @ address 0x00000E56, Size = 2, BPHandle = 0x0004

Setting breakpoint @ address 0x000010EC, Size = 2, BPHandle = 0x0005

Starting target CPU...

 

And it stays there without doing anything, it seems everything is OK except it can't start the target.

Thanks for helping

Outcomes