Akos Vandra
2012-11-25 20:15:15 UTC
Hi guys!
I am trying to use openocd to program a jtag chain that is composed of:
- lpc1768 (cortex-m3)
- xc9572XL cpld (xilinx 9500 series)
- XC2C256 cpld (xilinx coolrunner II)
I am using the next config file:
debug_level 3
source [find interface/vsllink.cfg]
transport select jtag
adapter_khz 100
source [find target/lpc1768.cfg]
jtag newtap cpld1 tap -expected-id 0x49604093 -irlen 8
jtag newtap cpld2 tap -expected-id 0x16d4c093 -irlen 8
I generated the svf file using xilinx impact, adding the three devices to
the chain, specifying an irlen of 4 for the cpu, and 8 for the coolrunner
II cpld.
I took the irlen of the cpu from the lpc1768 config file, and the irlen of
the coolrunner from its bsdl file.
I clicked on output->svf->generate svf file, and then went on "erasing" the
device, and stopping the generation.
What I came up with is the attached svf file. I modified the "FREQUENCY"
command to be slow enough for the lpc1768 to handle (it has 4MHz internal
oscillator, so 666Khz max, I am using 10Khz instead of the generated 1MHz)
I tried to play it with
svf <path_to_file.svf>
I also tried to play using
svf -tap cpld1.tap <path_to_file.svf>, but that gives a segfault.
My debug output is also attached, and here is what I get on the terminal:
***@fm12bq:~/projects/Xilinx/cpldtest$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
TRST OFF;
ENDIR IDLE;
ENDDR IDLE;
STATE RESET;
STATE IDLE;
FREQUENCY 1E4 HZ;
10 kHz
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
TIR 4 TDI (0f) SMASK (0f) ;
HIR 8 TDI (ff) SMASK (ff) ;
HDR 1 TDI (00) SMASK (01) ;
TDR 1 TDI (00) SMASK (01) ;
SIR 8 TDI (fe) SMASK (ff) ;
SDR 32 TDI (00000000) SMASK (ffffffff) TDO (f9604093) MASK (0fffffff) ;
tdo check error at line 22
read = 0x0, want = 0xF2C08126, mask = 0x1FFFFFFE
fail to run command at line 22
tdo check error at line 22
read = 0x0, want = 0xF2C08126, mask = 0x1FFFFFFE
Time used: 0m0s13ms
svf file programmed failed
in procedure 'svf'
Has anyone done this before? I've no idea what I am doing wrong.
Regards,
Ákos Vandra
I am trying to use openocd to program a jtag chain that is composed of:
- lpc1768 (cortex-m3)
- xc9572XL cpld (xilinx 9500 series)
- XC2C256 cpld (xilinx coolrunner II)
I am using the next config file:
debug_level 3
source [find interface/vsllink.cfg]
transport select jtag
adapter_khz 100
source [find target/lpc1768.cfg]
jtag newtap cpld1 tap -expected-id 0x49604093 -irlen 8
jtag newtap cpld2 tap -expected-id 0x16d4c093 -irlen 8
I generated the svf file using xilinx impact, adding the three devices to
the chain, specifying an irlen of 4 for the cpu, and 8 for the coolrunner
II cpld.
I took the irlen of the cpu from the lpc1768 config file, and the irlen of
the coolrunner from its bsdl file.
I clicked on output->svf->generate svf file, and then went on "erasing" the
device, and stopping the generation.
What I came up with is the attached svf file. I modified the "FREQUENCY"
command to be slow enough for the lpc1768 to handle (it has 4MHz internal
oscillator, so 666Khz max, I am using 10Khz instead of the generated 1MHz)
I tried to play it with
svf <path_to_file.svf>
I also tried to play using
svf -tap cpld1.tap <path_to_file.svf>, but that gives a segfault.
My debug output is also attached, and here is what I get on the terminal:
***@fm12bq:~/projects/Xilinx/cpldtest$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
svf /home/akos/projects/Xilinx/cpldtest/program.svf
svf processing file: "/home/akos/projects/Xilinx/cpldtest/program.svf"TRST OFF;
ENDIR IDLE;
ENDDR IDLE;
STATE RESET;
STATE IDLE;
FREQUENCY 1E4 HZ;
10 kHz
TIR 0 ;
HIR 0 ;
TDR 0 ;
HDR 0 ;
TIR 4 TDI (0f) SMASK (0f) ;
HIR 8 TDI (ff) SMASK (ff) ;
HDR 1 TDI (00) SMASK (01) ;
TDR 1 TDI (00) SMASK (01) ;
SIR 8 TDI (fe) SMASK (ff) ;
SDR 32 TDI (00000000) SMASK (ffffffff) TDO (f9604093) MASK (0fffffff) ;
tdo check error at line 22
read = 0x0, want = 0xF2C08126, mask = 0x1FFFFFFE
fail to run command at line 22
tdo check error at line 22
read = 0x0, want = 0xF2C08126, mask = 0x1FFFFFFE
Time used: 0m0s13ms
svf file programmed failed
in procedure 'svf'
exit
Connection closed by foreign host.Has anyone done this before? I've no idea what I am doing wrong.
Regards,
Ákos Vandra