|
From: Paul F. <fer...@gm...> - 2017-09-03 18:08:25
|
Hi Thomas :) On Sun, Sep 03, 2017 at 04:08:58PM +0000, Thomas Varghese wrote: > 1) With the Kinetis MK20DX256VLH7, do I need the 220-470 ohm resistor on the TDI line to use SWD? If you want to use SWD with Olimex ARM-USB-OCD, then yes, you either need the resistor hack or you need an Olimex SWD adapter (or similar part from other manufacturer). > 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 You shouldn't be writing interface config file yourself, no. In this case you should just source interface/ftdi/olimex-arm-usb-ocd.cfg , then "transport select swd", then source target config, in your case "target/kx.cfg" should work. > 3) Installed WinUSB driver for the Olimex ARM-USB-OCD, is this the best options? Yes, you need to install WinUSB with Zadig, and probably you need to install it for the whole composite device (depends on windows version I guess). > 4) When I try run "openocd.exe" in the directory with the > openocd.cfg I get this: ... I suggest you try running like this: openocd -f interface/ftdi/olimex-arm-usb-ocd.cfg -c "transport select swd" -f target/kx.cfg > Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED This likely means WinUSB wasn't properly installed. > 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. No, you should use WinUSB. libusb_open knows how to talk to it. HTH -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fer...@gm... |