On 21/11/12 9:06 AM, Akos Vandra wrote:
Hi!
I'm trying to get OpenOCD to work with a jtag chain with multiple
devices, namely a xilinx FPGA, a CPLD, a platform flash, and a
cortex-m3 (lpc17xx).
Auto-detecting the jtag chain seems to work fine (I get four devices,
with detected idcode and irlen), but I also get an error, stating that
thread looks like 0x03FFFFFFFFFFFFFFFFFFFF0105, and it should end look
like 0x.....3.
Has anyone successfully made openocd work with a chain with multiple
devices? Can you send a sample configuration file, so I can start
debugging from something that *should* work? Even if it's not the same
devices...
Does anyone have any idea what could be broken?
Regards,
Ákos Vandra
Hi Ákos,
I'm using a chain that includes a lpc3131 and a Actel FPGA with no
problems, I've attached my cfg file.
Other than that I'm not too sure, but it could certainly help to copy
the errors verbosely.
Cheers,
Andrew
#source [find interface/luminary-icdi.cfg]
#source [find interface/jtagkey.cfg]
interface ft2232
ft2232_device_desc "USB <-> Serial Cable"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010
jtag_khz 1000
reset_config srst_only srst_pulls_trst
# Is the LPC on the chain?
source [find target/lpc3131.cfg]
# FPGA Tap: A3PN060
A3P060
jtag newtap fpga tap -expected-id 0x1b9521cf -expected-id 0x129121cf -irlen 8
-ircapture 0x01 -irmask 0x03
######################
# Target configuration
######################
# Determine default image type
#
proc mcu_imgtype {IMGFILE {TYPE ""}} {
if {$TYPE == ""} {
if [string match -nocase "*.bin" $IMGFILE] {
set TYPE "bin"
} elseif [string match -nocase "*.elf" $IMGFILE] {
set TYPE "elf"
} elseif [string match -nocase "*.hex" $IMGFILE] {
set TYPE "ihex"
}
}
return $TYPE
}
# Determine default image offset
#
proc mcu_imgtypeoffset {TYPE {OFFSET ""} {BASE 0}} {
if {$OFFSET == ""} {
if {$TYPE == "bin"} {
set OFFSET $BASE
} else {
set OFFSET 0
}
}
return $OFFSET
}
# Flash .rom file to spi flash via seperate loader - currently 72KB max payload
#
proc lpc313x_spi_flash_load {IMGFILE} {
init
sleep 100
halt
sleep 200
set BUFF_OFFSET 0x11030800
echo "\nLoading $IMGFILE to RAM at $BUFF_OFFSET"
load_image $IMGFILE $BUFF_OFFSET bin
set OFFSET 0x11029000
echo "\nLoading spi programmer to RAM at $OFFSET"
load_image jtag_spi_prog.bin $OFFSET bin
halt
sleep 500
step $OFFSET
halt
sleep 1000
step $OFFSET
sleep 500
step
sleep 500
resume
echo "\nFlash succeeded when GPIO2 led pulsing slowly"
sleep 4000
exit
}
# Execute a binary image in RAM at a given address.
#
# Resets the CPU, but doesn't remap memory.
# Useful for basic hardware tests on virgin boards.
#
proc lpc313x_ram_load {IMGFILE {TYPE ""} {OFFSET ""}} {
init
sleep 100
halt
sleep 200
halt
set TYPE [mcu_imgtype $IMGFILE $TYPE]
if {$OFFSET == ""} {
if {$TYPE == "bin"} {
set OFFSET 0x11029000
} else {
set OFFSET 0
}
}
echo "Loading image to RAM at $OFFSET\n"
load_image $IMGFILE $OFFSET $TYPE
#echo "\nCurrent State:"
#poll
halt
sleep 100
step $OFFSET
halt
step $OFFSET
#step
#echo "\nFinal State:"
#poll
echo "\nStart GDB now"
}
# Loads a SVF file into the FPGA
#
proc a3p_svf_play {SVF_FILE} {
#reset halt # stop the lpc to ensure it doesn't get in the way
svf -tap fpga.tap $SVF_FILE quiet progress
}
proc print_ready {} {
#halt
sleep 500
echo "\nReady..."
}
init
#scan_chain
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel