OpenOCD, Mac OS, FRDM-K64F

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

OpenOCD, Mac OS, FRDM-K64F

4,397件の閲覧回数
rajbatra
Contributor IV

I originally posted this message in the Kinetis Microcontroller forum - but realized I may get better traction here (apologies for posting twice)...

 

 

I installed the OpenOCD package (0.9) from The GNU ARM Eclipse OpenOCD | GNU ARM Eclipse

and installed the corresponding eclipse plugin in KDS.

 

When I run the hello example, I get the error unable to find the kinetis.cfg file. Erich Styger provided the config file in another chain, and I also installed KDS on my PC and pulled the file from there (thinking that maybe newer).

 

In any case, I then copied the file to /Applications/GNU ARM Eclipse/OpenOCD/0.9.0-201505191004/scripts

 

Now when I run it, I get the error:

/Applications/GNU ARM Eclipse/OpenOCD/0.9.0-201505191004//scripts/kinetis.cfg:11: Error: invalid subcommand "newdap kinetis cpu -irlen 4"

in procedure 'script'

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

in procedure 'cmsis-dap' called at file "/Applications/GNU ARM Eclipse/OpenOCD/0.9.0-201505191004//scripts/kinetis.cfg", line 11

 

 

Does anyone have a solution?

ラベル(1)
9 返答(返信)

2,124件の閲覧回数
hak8or
Contributor II

It's been a bit over a month so I figured I would ask, what is the state of merging those patches into upstream OpenOCD?

0 件の賞賛
返信

2,124件の閲覧回数
jeffwilliams
Contributor I

We've used KDS + openocd with Mac for several months now. It wasn't pretty - we had to go get the Freescale patches and apply them to a new branch from the commit they used. Then on a random day in 2015 I cloned openocd origin/master and merged that branch to a detached master.  I've posted this all as a github repo:  https://github.com/0x6a77/openocd

We are able to do this with both CMSIS-DAP and JTAG (using an FTDI-based dongle: the c232hm-edhsl).

I've found it quite difficult to work with openocd (and suspect FSL have as well), so I hold no hope that useful KDS changes will ever go mainstream. It's messy, because there was a big refactor between the commit FSL used for KDS and what's in openocd's origin/master. I tried as best I could to make these coherent, but it's really hard in this situation.

You should be able to my instructions to easily build yourself a working openocd for Mac and get it to work the way you want with KDS. We are able to maintain single KDS project structures shared over Mac, Linux and Windows and it works pretty well.

There's a separate github repo that holds a copy of the scripts we use (hacked? :smileyhappy:) to make this work: https://github.com/0x6a77/KinetisOpenOcdConfigs

This all works pretty well for us as late as KDS 3.0.2.

0 件の賞賛
返信

2,124件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Raj,

Freescale KDS3.0 can support Mac OS 10.10 ("Yosemite").

Kinetis Design Studio Integrated Development |Freescale

if you use FRDM-K64F board, I suggest you read below document for how to connect board. maybe you would try other interface besides OpenOCD.

Summary of FRDM-K64F open source debug interface

can this help?


Have a great day,
Zhang Jun

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

0 件の賞賛
返信

2,124件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Raj Batra,

Kinetis Design Studio for MAC OS X only includes run control/debug support with Segger J-Link. P&E Multilink and OpenOCD support might be added at a later date.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,124件の閲覧回数
rajbatra
Contributor IV

Hi Carlos,

     The thread: Re: openSDA for Mac OS X mentions using the library I installed. So was hoping that someone got it to work on the K64F board.

Thanks,

-Raj

0 件の賞賛
返信

2,124件の閲覧回数
joeseymour
Contributor III

Kinetis support in OpenOCD is largely built in, not contained within the kinetis.cfg file. The OpenOCD shipped with KDS is built with patches that add support for newer Freescale devices including the K64F and ease integration with KDS. From a quick look, the GNU ARM Eclipse repository (GNU ARM Eclipse Plug-ins / OpenOCD / [70a14d] /src/flash/nor/kinetis.c) doesn't appear to contain anything similar. Unfortunately that means that unless support for those devices has been implemented independently of KDS you won't be able to use the the GNU ARM Eclipse build of OpenOCD to debug a Kinetis K64 device.

See also: OpenOCD with FRDM-K64F support

It's worth bearing in mind that SEGGER debug configurations are supported on Mac hosts, and SEGGER provide, subject to terms and conditions, OpenSDA applications that will allow you to debug a K64F device without having a physical J-Link:

SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2

2,124件の閲覧回数
rajbatra
Contributor IV

Hi Joe,

     I found J-Link interface on mac to be rather flakey. When I restart a debug session, I get

Error in services launch sequence

Starting J-Link GDB Server timed out.

only recourse is to unplug the K64F board and replug (reset button doesn't seem to help). With DAP running in my virtual box, I can consistently connect and debug (it's just slow), hence why I started looking at OpenOCD for Mac...

-Raj

0 件の賞賛
返信

2,124件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Raj,

the problem you see needing the board to re-power is not a Segger or Mac issue: it is a board issue and happens on other OS and with other debug firmware too.

Erich

2,124件の閲覧回数
joeseymour
Contributor III

Just to expand on Erich's post. I always power-cycle the FRDM-K64F board *twice* when using OpenSDA.

0 件の賞賛
返信