Debugging on FRDM-K64F on KDS 1.1.1

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

Debugging on FRDM-K64F on KDS 1.1.1

Jump to solution
6,237 Views
paulderocco
Contributor III

I've read everything I could find here, and a bunch elsewhere on the web, about how to debug FRDM-K64F code over its USB interface, to no avail. Somewhere I read that you're supposed to use the "GDB OpenOCD Debugging" choice in the Debug Configuration dialog. Initially, I got a popup saying "Error in services launch sequence. OpenOCD requires some -c or -f configuration options to start." Somewhere else I found an explanation that I needed to add "-f  kinetis.cfg" to the Debugger config options. Now it doesn't pop anything up, but it fails to load anyway. Instead, the OpenOCD console shows the following messages:

 

Open On-Chip Debugger 0.8.0-dev-dirty (2014-08-20-11:07)

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'

Error: unable to open CMSIS-DAP device

Error: unable to init CMSIS-DAP driver

Error: Error selecting 'cmsis-dap' as transport

Runtime Error: C:/Freescale/KDS_1.1.1/openocd/bin/..//scripts/kinetis.cfg:3:

in procedure 'script'

at file "embedded:startup.tcl", line 58

in procedure 'interface' called at file "C:/Freescale/KDS_1.1.1/openocd/bin/..//scripts/kinetis.cfg", line 3

 

So I'm stumped. The FRDM users guide says nothing about how to debug. Is there some app note somewhere that I've missed? What do I do next?

Labels (1)
Tags (3)
1 Solution
1,412 Views
BlackNight
NXP Employee
NXP Employee

Hi Bilal,

do you have the latest firmware loaded on the board? See http://developer.mbed.org/handbook/Firmware-FRDM-K64F

But in any case I don't recommend to use the mbed firmware: the Segger and P&E one are much more stable and easier to use.

And 20 times faster!

See http://mcuoneclipse.com/2014/04/27/segger-j-link-firmware-for-opensdav2/

Erich

View solution in original post

9 Replies
1,412 Views
therealfreegeek
Contributor IV

Just opened up my K64FRDM board and watched the first video and then selected the default debugger and also got the same errors.

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'

Error: unable to open CMSIS-DAP device

Error: unable to init CMSIS-DAP driver

Error: Error selecting 'cmsis-dap' as transport

Runtime Error: C:/Freescale/KDS_3.0.0/openocd/bin/..//scripts/kinetis.cfg:3:

in procedure 'script'

at file "embedded:startup.tcl", line 58

in procedure 'interface' called at file "C:/Freescale/KDS_3.0.0/openocd/bin/..//scripts/kinetis.cfg", line 3

Pretty disappointing that it does this straight out of the box.

I reflashed the board to use the Segger debugger and it worked no problem,

But still it would be nice to know why the original debugger fails like this.

0 Kudos
1,412 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Paul:

Just checking. Did you manage to connect to your FRDM-K64F?

Tobias has good suggestions there. Personally I had good results with the Segger J-Link firmware.

Regards!

Jorge Gonzalez

0 Kudos
1,412 Views
paulderocco
Contributor III

I have a Multilink Universal FX, which works fine. At the time I asked, it was elsewhere, but now that I have it, I don't need to get the OpenOCD port working. I used that on a K70 board, and it was pretty slow anyway.

0 Kudos
1,412 Views
bilalarain
Contributor II

Hi

I have the same problem, may be you guys can help. I have followed the user guide (KDSUG.pdf) and configure the debugger as shown in the image:

DebugConfig.png

When debug, I got the following error:

Error.png

Note that I am using Ubuntu 14.04 and I am using the preinstalled bootloader. The Debug port is /dev/ttyACM0. I have been searching on the web but could not find any solution to solve this problem. Will look forward for your help in this regard.

Bilal

0 Kudos
1,413 Views
BlackNight
NXP Employee
NXP Employee

Hi Bilal,

do you have the latest firmware loaded on the board? See http://developer.mbed.org/handbook/Firmware-FRDM-K64F

But in any case I don't recommend to use the mbed firmware: the Segger and P&E one are much more stable and easier to use.

And 20 times faster!

See http://mcuoneclipse.com/2014/04/27/segger-j-link-firmware-for-opensdav2/

Erich

1,412 Views
acampbell
Contributor II

But what if I'm using the board for mbed applications? Would I still be able to easily flash .bin files to the board if I use a different firmware package? I assume drag-n-drop won't be available.

0 Kudos
1,412 Views
bilalarain
Contributor II

Hi Erich

It works out nicely. Many thanks for your help.

Regards

Bilal

0 Kudos
1,412 Views
adriangogu
Contributor I

Hello,

It appeared the same problem for me: error info comes to console as reported  in the top of this discussion.

Also the reset red led stays on all the time.

I have updated the firmware as instructed, trying both alternatives PEMicro and Segger J-Link, but didn't change the situation.

Could you please advice if the reset led always on would point to different problem/solution ?

Regards,

Adrian

0 Kudos
1,413 Views
iliketux
Contributor II

Hello Paul DeRocco,

debugging with the preinstalled bootloader does not seem to work.

But here are some links that explain how you can replace it by the PEMicro or Segger J-Link:

https://community.freescale.com/docs/DOC-100733

https://community.freescale.com/docs/DOC-100705

http://mcuoneclipse.com/2014/04/27/segger-j-link-firmware-for-opensdav2/

http://www.segger.com/opensda.html

Regards,

    Tobi