Best way to debug on Kinetis tower module?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Best way to debug on Kinetis tower module?

ソリューションへジャンプ
3,009件の閲覧回数
mittymcdoogle
Contributor III

I am trying to debug on my Kinetis tower module without much success. My module currently shows up as an mbed Serial Port device so I am debugging with an OpenOCD configuration. Whenever I do, I receive the following error message:

 

"

Error in final launch sequence

Failed to execute MI command:

-target-select remote localhost:3333

Error message from debugger back end:

Remote communication error.  Target disconnected.: No error.

Failed to execute MI command:

-target-select remote localhost:3333

Error message from debugger back end:

Remote communication error.  Target disconnected.: No error.

Remote communication error.  Target disconnected.: No error.

"

 

I've tried debugging with P&E/Segger and both time out.

 

How do I fix this problem?

 

Thanks,

Mitty

ラベル(1)
1 解決策
2,274件の閲覧回数
mittymcdoogle
Contributor III
9 返答(返信)
2,274件の閲覧回数
robertboys
Contributor IV

If you want to use OpenSDA in CMSIS-DAP mode there is an additional step needed that is not yet well documented.

The FRDM-K64F needs this step - all other Freedom boards I have tested (so far) do not need this extra step.  They can use the standard CMSIS-DAP app (is an S19 file that we use).

We are working on a Keil KnowledgeBase article for the FRDM K64F.  Here is part of it:

*************************************************************************************************

Installing the CMSIS-DAP Driver for mbed

The CMSIS-DAP Debugger in µVision needs the CMSIS-DAP driver for mbed installed on your PC to communicate to your CMSIS-DAP target board.

To install the CMSIS-DAP driver for mbed:

  1. Download the CMSIS-DAP driver for mbed (mbedWinSerial_16466.exe) from the mbed site
  2. Make sure your target board is connected to your PC and has the CMSIS-DAP app installed in your target board. (installed using RESET/powerup sequence)
  3. Install the CMSIS-DAP driver.  After installation, in Windows, opening the Devices and Printers dialog should show the following new devices on your PC:
    • MBED microcontroller USB Device
    • MBED CMSIS-DAP
    • mbed Serial Port(COMnn)  nn = the COM port number

*************************************************************************************************

This is using Keil uVision but we suspect this is applicable for other tools vendors.

I am interested in hearing about any other experiences getting CMSIS-DAP working and other information we can use in our forthcoming article.

Email: bob.boys@arm.com

Thanks

Bob Boys

ARM/Keil

bob.boys@arm.com

2,274件の閲覧回数
robertboys
Contributor IV

Here is the Knowledgebase article:  µVISION: Using MDK-ARM with the TWR-K64F mbed Kit

0 件の賞賛
返信
2,274件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Mitty,

I just tried this on my FRDM-K64F Freedom board that has MBED firmware so I would use the OpenOCD configuration as well.

The first time I downloaded I got the same error you had.

I then disconnected the debugger USB cable and then re-connected it.  Re-tried the download and it worked.

Here are my Debug Configuration settings:

ScreenHunter_159 Jun. 19 17.00.gif

ScreenHunter_160 Jun. 19 17.00.gif

ScreenHunter_161 Jun. 19 17.00.gif

Regards,

David

0 件の賞賛
返信
2,274件の閲覧回数
mittymcdoogle
Contributor III

Thanks, David. I checked and I have all of the same settings, but I am still unable to debug.

Here is what my console is displaying every time I try to debug:

"

Open On-Chip Debugger 0.8.0-dev (2015-01-09-16:22)

Licensed under GNU GPL v2

For bug reports, read

  http://openocd.sourceforge.net/doc/doxygen/bugs.html

Info : only one transport option; autoselect 'cmsis-dap'

Info : CMSIS-DAP: SWD  Supported

Info : CMSIS-DAP: Interface Initialised (SWD)

Info : add flash_bank kinetis kinetis.flash

cortex_m reset_config sysresetreq

adapter speed: 1000 kHz

Started by GNU ARM Eclipse

Info : CMSIS-DAP: FW Version = 1.0

Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1

Info : DAP_SWJ Sequence (reset: 50+ '1' followed by 0)

Info : CMSIS-DAP: Interface ready

Info : clock speed 1000 kHz

Info : IDCODE 0x2ba01477

Info : kinetis.cpu: hardware has 6 breakpoints, 4 watchpoints

Info : accepting 'gdb' connection from 3333

Error: Unsupported K-family FAMID

Error: auto_probe failed

Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.

Error: attempted 'gdb' connection rejected

"

0 件の賞賛
返信
2,274件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Mitty,

Can you try to clear all breakpoints and watchpoints?

Failed to Debug with GDB: Breakpoints or Expressions on non-existing Locations | MCU on Eclipse

Regards,

David

0 件の賞賛
返信
2,274件の閲覧回数
mittymcdoogle
Contributor III

Hi David,

There are no breakpoints or watchpoints.

Thanks,

Tim

0 件の賞賛
返信
2,274件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Mitty,

Are you connecting the USB cable to FRDM-k64F, wait 10 seconds, disconnect and quickly re-connect the USB?

I have found that initial USB connection will not work but after re-connecting the interface works.

Secondly, attached is ZIP with MBED and PEMicro firmware that works on my board so maybe switching back and forth will grease the wheels so to speak.

Have a look at this very good blogger's report on antivirus software that might affect things.

FRDM Board not responding? Check your Virus Scanner! | MCU on Eclipse

Segger JLink firmware for frdm-k64f at bottom of web page: SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2

Have you done online update of KDS by doing the Help->Install New Software... then in Wizaard select from pull-down the "Freescale KDS Update Site - http://freescale.com/lgfiles/updates/Eclipse/KDS" and Select All, Next, Finish...?

Regards,

David

2,274件の閲覧回数
mittymcdoogle
Contributor III

Hi David,

Yes, I have tried that. Also, (just for clarification) I am trying to debug a kinetis tower module, not a freedom board. I also have a freedom board that I am able to debug.

I am currently updated to KDS 3.0.0.

Thanks,

Mitty

0 件の賞賛
返信
2,275件の閲覧回数
mittymcdoogle
Contributor III

I loaded Segger firmware (SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2) and am now able to debug.