
#msp430 launchpad
# PIN_TRST p2.0
# PIN_TDI  p2.1
# PIN_TMS  p2.2
# PIN_TCK  p2.3
# PIN_TDO  p2.4
# PIN_SRST p2.5

# Raspberry Pi
# ARM_TRST      22 GPIO_GEN3 P1-15  IN (22 ALT4)
# ARM_TDO     5/24 GPIO_GEN5 P1-18 OUT (24 ALT4)
# ARM_TCK    13/25 GPIO_GEN6 P1-22 OUT (25 ALT4)
# ARM_TDI     4/26 GPIO_GCLK P1-7   IN ( 4 ALT5)
# ARM_TMS    12/27 CAM_GPIO  S5-11 OUT (27 ALT4)
# ARM_GND                    P1-25

# D2 PD1 PIN_TRST
# D3 PD0 PIN_TDI
# D4 PD4 PIN_TMS
# D5 PC6 PIN_TCK
# D6 PD7 PIN_TDO
# D7 PE6 PIN_SRST

interface parport

# Broadcom 2835 on Raspberry Pi

telnet_port 4444
#gdb_port 0
#tcl_port 0

adapter_khz 1000

#jtag_nsrst_delay 400
#jtag_ntrst_delay 400

if { [info exists CHIPNAME] } {
   set  _CHIPNAME $CHIPNAME
} else {
   set  _CHIPNAME raspi
}

reset_config none

if { [info exists CPU_TAPID ] } {
   set _CPU_TAPID $CPU_TAPID
} else {
   set _CPU_TAPID 0x07b7617F
}
jtag newtap $_CHIPNAME arm -irlen 5 -expected-id $_CPU_TAPID

set _TARGETNAME $_CHIPNAME.arm
target create $_TARGETNAME arm11 -chain-position $_TARGETNAME

