Debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugger

1,445 Views
julioruzicki
Contributor II

Hello everyone, I beginner in Kinets. I could compile my first app, but I found a problem do debug to FRDM-K22F board.

The problem found was it:

pastedImage_0.png

Does someone can help me?

Thanks

Labels (1)
0 Kudos
5 Replies

739 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Julio Ruzicki,

        Could you tell me which IDE you are using, IAR or CW?

        Which debug interface of your FRDM-K22F board? MBED(check your board, whether it is a MBED disc in your computer)?

      I think you debug interface configuration is not correct, so please tell me your IDE and debug interface.


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

739 Views
julioruzicki
Contributor II

Hi Jingjing, thanks by your reply. I'm using kinetis on linux mint. The interface is J-link.

I think that the is GDB server, because the kinetis can recovery any information. Follow the console messages:

SEGGER J-Link GDB Server V4.92 Command Line Version

JLinkARM.dll V4.92 (DLL compiled Sep 30 2014 09:34:53)

-----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:     5 sec.

------J-Link related settings------

J-Link Host interface:         USB

J-Link script:                 none

J-Link settings file:          none

------Target related settings------

Target device:                 MK22FX512xxx12

Target interface:              SWD

Target interface speed:        0kHz

Target endian:                 little

Connecting to J-Link...

J-Link is connected.

Firmware: J-Link OpenSDA 2 compiled Nov 28 2014 10:35:51

Hardware: V1.00

S/N: 621000000

Checking target voltage...

Target voltage: 3.30 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 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000

R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000

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

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

R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE

XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000

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

Reading all registers

Select auto target interface speed (1429 kHz)

Flash breakpoints enabled

Semi-hosting enabled (VectorAddr = 0x08)

Semihosting I/O set to TELNET Client

Downloading 392 bytes @ address 0x00000000 - Verified OK

Downloading 16 bytes @ address 0x00000400 - Verified OK

Downloading 2240 bytes @ address 0x00000410 - Verified OK

Downloading 4 bytes @ address 0x00000CD0 - Verified OK

Downloading 4 bytes @ address 0x00000CD4 - Verified OK

Downloading 36 bytes @ address 0x00000CD8 - Verified OK

ERROR: Programming failed @ address 0x00000000 (Algo135: Illegal command)

Writing register (PC = 0x000007c4)

Read 4 bytes @ address 0x000007C4 (Data = 0xFFFFFFFF)

Read 2 bytes @ address 0x000004CC (Data = 0xFFFF)

Read 2 bytes @ address 0x000004CC (Data = 0xFFFF)

Read 2 bytes @ address 0x000004CC (Data = 0xFFFF)

Read 2 bytes @ address 0x000004CC (Data = 0xFFFF)

Read 2 bytes @ address 0x000004CC (Data = 0xFFFF)

WARNING: Failed to reset CPU. VECTRESET has confused core.

WARNING: CPU did not halt after reset.

WARNING: S_RESET_ST not cleared

WARNING: CPU did not halt after reset.

ERROR: Error while identifying Cortex-M core.

Resetting target

Halting target CPU...

...Target halted (PC = 0x05FA0004)

R0 = 05FA0004, R1 = 05FA0004, R2 = 05FA0004, R3 = 05FA0004

R4 = 05FA0004, R5 = 05FA0004, R6 = 05FA0004, R7 = 05FA0004

R8 = 05FA0004, R9 = 05FA0004, R10= 05FA0004, R11= 05FA0004

R12= 05FA0004, R13= 05FA0004, MSP= 05FA0004, PSP= 05FA0004

R14(LR) = 05FA0004, R15(PC) = 05FA0004

XPSR 05FA0004, APSR 000A0000, EPSR 05000000, IPSR 00000004

CFBP 05FA0004, CONTROL 5000000, FAULTMASK FA0000, BASEPRI 00, PRIMASK 04

Reading all registers

WARNING: Failed to read memory @ address 0x05FA0004

Setting breakpoint @ address 0x000004CC, Size = 2, BPHandle = 0x0000

WARNING: No more breakpoint resources left

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

ERROR: Can not read register 32 (FPSCR) while CPU is running

ERROR: Can not read register 33 (FPS0) while CPU is running

ERROR: Can not read register 34 (FPS1) while CPU is running

ERROR: Can not read register 35 (FPS2) while CPU is running

ERROR: Can not read register 36 (FPS3) while CPU is running

ERROR: Can not read register 37 (FPS4) while CPU is running

ERROR: Can not read register 38 (FPS5) while CPU is running

ERROR: Can not read register 39 (FPS6) while CPU is running

ERROR: Can not read register 40 (FPS7) while CPU is running

ERROR: Can not read register 41 (FPS8) while CPU is running

ERROR: Can not read register 42 (FPS9) while CPU is running

ERROR: Can not read register 43 (FPS10) while CPU is running

ERROR: Can not read register 44 (FPS11) while CPU is running

ERROR: Can not read register 45 (FPS12) while CPU is running

ERROR: Can not read register 46 (FPS13) while CPU is running

ERROR: Can not read register 47 (FPS14) while CPU is running

ERROR: Can not read register 48 (FPS15) while CPU is running

ERROR: Can not read register 49 (FPS16) while CPU is running

ERROR: Can not read register 50 (FPS17) while CPU is running

ERROR: Can not read register 51 (FPS18) while CPU is running

ERROR: Can not read register 52 (FPS19) while CPU is running

ERROR: Can not read register 53 (FPS20) while CPU is running

ERROR: Can not read register 54 (FPS21) while CPU is running

ERROR: Can not read register 55 (FPS22) while CPU is running

ERROR: Can not read register 56 (FPS23) while CPU is running

ERROR: Can not read register 57 (FPS24) while CPU is running

ERROR: Can not read register 58 (FPS25) while CPU is running

ERROR: Can not read register 59 (FPS26) while CPU is running

ERROR: Can not read register 60 (FPS27) while CPU is running

ERROR: Can not read register 61 (FPS28) while CPU is running

ERROR: Can not read register 62 (FPS29) while CPU is running

ERROR: Can not read register 63 (FPS30) while CPU is running

ERROR: Can not read register 64 (FPS31) while CPU is running

Removing breakpoint @ address 0x000004CC, Size = 2

WARNING: Breakpoint @ address 0x000004CC not found

WARNING: Failed to read memory @ address 0x00000000

WARNING: Failed to read memory @ address 0x00000000

0 Kudos

739 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Julio Ruzicki,

    Thank you for your detail information.

    I am not sure whether kinetis can works on your linux mint, we don't have linux mint, so can't try it, normally kinetis download is working on windows OS, eg,window7.

    Can you find a win7 computer? You can try the kinetis download in windows 7 again?

    Associated with some IDE, you can download the code to your K22 with JLINK.


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

739 Views
julioruzicki
Contributor II

Thanks again, I'm also trying use a virtual machine with windows XP and happens the same problem.

I have installed the full SEGGER package, but the problems still happens.

0 Kudos

739 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Julio Ruzichki,

    Please download the KSDK1.1.0

  Then refer to the attached document:Kinetis SDK K22 User's Guide.pdf, do it step by step, check it whether you miss some configurations.


Wish it hleps you!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos