# Adapter configuration for Busblaster
interface ft2232
ft2232_vid_pid 0x0403 0x6010
ft2232_device_desc "USB <-> Serial Converter"
ft2232_layout jtagkey
ft2232_latency 2

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

if { [info exists ENDIAN] } {	
	set  _ENDIAN $ENDIAN    
} else {	 
	set  _ENDIAN little
}

if { [info exists CPUTAPID ] } {
	set _CPUTAPID $CPUTAPID
} else {
	set _CPUTAPID 0x3100e02f
}

reset_config trst_and_srst

adapter_khz 6000

jtag newtap $_CHIPNAME dsp -expected-id 0x00000000 -irlen 8
jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

# The target
set _TARGETNAME [format "%s.arm" $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME -variant arm7tdmi

init

# Execute the Calypso "Magic" (sniffed from TI CCS v3.3 with XDS510)
svf calypso_magic.svf

halt
arm core_state arm

#arm7_9 dcc_downloads enable
arm7_9 fast_memory_access enable


