From: Thomas V. <to...@on...> - 2017-09-03 16:30:52
|
I guess I should include how the hardware is connected up, to be sure I got the basics right: Chip: MK20DX256VLH7 Debugger: Olimex ARM-USB-OCD (not the -H variety) JTAG connections on CPU: Pin 23 TDI Pin 25 TMS Pin 22 TCK Pin 25 TDO Pin 34 nRST Do have a 10K pull up on pin 26 (EzPort nCS) and the pin 34 (nRST). The others do not have anything connected to them when the JTAG connector is disconnected. JTAG connections on 20pin connector Pin 1 VCC Pin 5 TDI Pin 7 TMS Pin 9 TCK Pin 13 TDO Pin 15 nRST Pin 4 GND Did I get this right so far? -Tom -----Original Message----- From: Thomas Varghese Sent: Sunday, September 3, 2017 11:09 AM To: 'Paul Fertser' <fer...@gm...> Cc: ope...@li... Subject: RE: [OpenOCD-devel] How to program Kinetis with OpenOCD on windows? Hi Paul, Did a bit of digging and found a tutorial that was somewhat relevant. So here are some basic questions that are bit more specific: 1) With the Kinetis MK20DX256VLH7, do I need the 220-470 ohm resistor on the TDI line to use SWD? 2) What should the configuration file look like, here is my attempt at an openocd.cfg: interface ftdi transport select swd adapter_khz 1000 ftdi_vid_pid 0x15BA 0x0003 ftdi_layout_init 0x0018 0x05fb ftdi_layout_signal SWD_EN -data 0 ftdi_layout_signal nSRST -data 0x0010 I did notice there was a kinetis_256K.cfg, should I be using that instead, if so how? If anyone has a working cfg file they are willing to share, that would be great! 3) Installed WinUSB driver for the Olimex ARM-USB-OCD, is this the best options? 4) When I try run "openocd.exe" in the directory with the openocd.cfg I get this: Open On-Chip Debugger 0.10.0 (2017-08-21) [https://github.com/sysprogs/openocd] Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : FTDI SWD mode enabled adapter speed: 1000 kHz Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED Info : clock speed 1000 kHz Error: BUG: current_target out of bounds 5) Based #4, where do I get libusb? I tried changing the driver to libusb-win32 and libusbk, same error. So I must be missing something else. Thanks for your patience and understanding. -Tom -----Original Message----- From: Paul Fertser [mailto:fer...@gm...] Sent: Saturday, September 2, 2017 3:06 PM To: Thomas Varghese <to...@on...> Cc: ope...@li... Subject: Re: [OpenOCD-devel] How to program Kinetis with OpenOCD on windows? Hello, On Sat, Sep 02, 2017 at 07:06:57PM +0000, Thomas Varghese wrote: > I have an Olimex ARM-USB-OCD device laying around, but could purchase > a newer one if necessary, they are relatively low cost. ... > I’ve tried downloading the latest version of OpenOCD (0.10.0). Please check the README.Windows , install WinUSB driver as suggested, and OpenOCD should just work. For production programming you should be able to use "program" command. What exactly is your question, what doesn't work? -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fer...@gm... |