Jump to content

FTDI2232 JTAG

From HW wiki
Revision as of 16:27, 24 June 2014 by Kulatond (talk | contribs)

PiKRON's JTAG adapter

Author: Petr Porazil

File:Jt usb5.pdf

Adapter is compatible with standard 20 pin ARM JTAG connector as well as provides reduced 10 pin connector used on PiKRON's LPC17xx, LPC21xx, i.MX and other boards.

Permit access to usb as non-root user

in /etc/udev/rules.d add file 45-ftdi-libftdi.rules with following content:

ACTION!="add", SUBSYSTEM!="usb_device", GOTO="kcontrol_rules_end"
ATTR(idProduct)=="bcd9", ATTR(idVendor)=="0403", MODE:="666"
LABEL="kcontrol_rules_end"

Values are checked on Stellaris board and Ubuntu 10.10. Then reload rules

:/# initctl reload-configuration udev

and reconnect your hardware.

Older setup for LCP2148

#daemon configuration
telnet_port 4444
gdb_port 3333

# tell gdb our flash memory map
# and enable flash programming
#gdb_memory_map enable
#gdb_flash_program enable

#interface
interface ft2232
#ft2232_device_desc "JTAG"
ft2232_layout usbjtag
ft2232_vid_pid 0x0403 0x6010
#jtag_speed 3

# reset layout for ul_usb1 and jt_usb5 with ft2232
#               7     TRST      NTRST        IOL0
#               6     nHRST     RST          IOL2
#               4     RTCK      SRST         IOL1

#use combined on interfaces or targets that can't set TRST/SRST separately
#            trst_and_srst
#reset_config trst_only srst_pulls_trst
reset_config trst_and_srst separate trst_open_drain srst_push_pull

source [find target/lpc2148.cfg]

init
reset halt

Setup for STM3210C-EVAL

telnet_port 4444
gdb_port 3333
#set CHIPNAME STM32F107VCT6
#set WORKAREASIZE 0x10000
interface ftdi
#ftdi_device_desc "Dual RS232"
ftdi_vid_pid 0x0403 0x6010

ftdi_layout_init 0x05f8 0x0cfb
ftdi_layout_signal nTRST -data 0x0010 -noe 0x0800
ftdi_layout_signal nSRST -ndata 0x0040 -noe 0x0400

#source [find interface/ftdi/xds100v2.cfg]
source [find board/stm3210c_eval.cfg]
reset_config trst_and_srst

init; 
#ftdi_set_signal PWR_RST 1; jtag arp_init

#stm32f1x.cpu arp_halt
#wait_halt
#stm32f1x.cpu curstate
openocd -c "source [find load-jt_usb5.cfg]" -c "program STM3210C-EVAL_FW_V1.1.0.hex"