That is pretty much what I was thinking.
The 500kHz is set by the target file that comes with openocd
$OPENOCD_DIR$/target/stm32stick.cfg . I tried to set it to a different
speed, but that was basically just guessing. I thought that the jtag_khz
in the target file would work for me.
I attached the debug output with -d 3
Michael
Rick Altherr schrieb:
The error messages indicate that we are talking to the interface, but
the JTAG signals don't appear to be valid. I don't know anything
about the ST32-PerformanceStick, but I'd check pinout and voltage
rails. OpenOCD is trying to talk to the JTAG tap and is just getting
bogus data. That is almost always a hardware problem.
A run with -d 3 or 'debug_level 3' would clarify exactly where in
OpenOCD we get a failure, but it looks a lot like the JTAG chain
validation failed which is the first thing we do. It is also possible
that the JTAG clock speed is wrong (it appears to be set to 500kHz,
but you don't set it explicitly).
Rick
On Mar 9, 2009, at 7:23 AM, Michael Jäntsch wrote:
Hello,
I obviously had both problems. I needed to set the vid/pid in the config
file plus the permission problem. I fixed this and got one step further.
But it is still not working. Openocd is obviously talking to the ft2232
chip but still not to the ST32-PerformanceStick.
My openocd.cfg:
source [find target/stm32stick.cfg]
# ftdi interface
interface ft2232
ft2232_device_desc "STM32-PerformanceStick A"
ft2232_layout stm32stick
ft2232_vid_pid 0x0640 0x002d
gdb_port 4789
and I get the following
Open On-Chip Debugger 1.0 (2009-03-09-14:42) svn:1405
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
500 kHz
Error: JTAG communication failure, check connection, JTAG interface,
target power etc.
Error: trying to validate configured JTAG chain anyway...
Error: Could not validate JTAG scan chain, IR mismatch, scan returned
0x7FFF. tap=stm32_hitex.cpu pos=0 expected 0x1 got 3
Warn : Could not validate JTAG chain, continuing anyway...
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : Block read error address 0xe000ed00, count 0x1
Warn : no telnet port specified, using default port 4444
Warn : no tcl port specified, using default port 6666
Warn : Invalid ACK in SWJDP transaction
Any ideas?
Thanks
Michael
Holger Schurig schrieb:
Error: 30 161 ft2232.c:1506 ft2232_init_ftd2xx(): unable to
open ftdi device: 2
You might also have a permission problem in your /proc/bus/usb
(or the new location somewhere in /sys). In this
case, "strace -oa -efile ./openocd" and a careful reading of the
generated "a" file will show this.
Then add a proper /etc/udev/rules.d/XXX file to solve this.
--
Technische Universität München
Michael Jäntsch
Fakultät für Informatik
Robotics and Embedded Systems
Boltzmannstr. 3
85748 Garching bei München
michael.jaent...@in.tum.de
www6.in.tum.de
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development
--
Rick Altherr
kc8...@kc8apf.net
"He said he hadn't had a byte in three days. I had a short, so I split
it with him."
-- Unsigned
--
Technische Universität München
Michael Jäntsch
Fakultät für Informatik
Robotics and Embedded Systems
Boltzmannstr. 3
85748 Garching bei München
michael.jaent...@in.tum.de
www6.in.tum.de
Open On-Chip Debugger 1.0 (2009-03-09-14:42) svn:1405
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
User : 5 0 command.c:494 command_run_line():
Debug: 6 0 configuration.c:88 find_file(): found openocd.cfg
Debug: 8 0 command.c:91 script_command(): script_command - interface
Debug: 9 0 command.c:108 script_command(): script_command - interface,
argv[0]=ocd_interface
Debug: 10 0 command.c:108 script_command(): script_command - interface,
argv[1]=ft2232
Debug: 12 0 command.c:91 script_command(): script_command - ft2232_device_desc
Debug: 13 0 command.c:108 script_command(): script_command -
ft2232_device_desc, argv[0]=ocd_ft2232_device_desc
Debug: 14 0 command.c:108 script_command(): script_command -
ft2232_device_desc, argv[1]=STM32-PerformanceStick A
Debug: 16 0 command.c:91 script_command(): script_command - ft2232_layout
Debug: 17 0 command.c:108 script_command(): script_command - ft2232_layout,
argv[0]=ocd_ft2232_layout
Debug: 18 0 command.c:108 script_command(): script_command - ft2232_layout,
argv[1]=stm32stick
Debug: 20 0 command.c:91 script_command(): script_command - ft2232_vid_pid
Debug: 21 0 command.c:108 script_command(): script_command - ft2232_vid_pid,
argv[0]=ocd_ft2232_vid_pid
Debug: 22 0 command.c:108 script_command(): script_command - ft2232_vid_pid,
argv[1]=0x0640
Debug: 23 0 command.c:108 script_command(): script_command - ft2232_vid_pid,
argv[2]=0x002d
Debug: 24 0 configuration.c:88 find_file(): found
/usr/local/lib/openocd/target/stm32stick.cfg
Debug: 26 0 command.c:91 script_command(): script_command - jtag_khz
Debug: 27 0 command.c:108 script_command(): script_command - jtag_khz,
argv[0]=ocd_jtag_khz
Debug: 28 0 command.c:108 script_command(): script_command - jtag_khz,
argv[1]=500
Debug: 29 0 jtag.c:2611 handle_jtag_khz_command(): handle jtag khz
User : 30 0 command.c:383 command_print(): 500 kHz
Debug: 32 0 command.c:91 script_command(): script_command - jtag_nsrst_delay
Debug: 33 0 command.c:108 script_command(): script_command - jtag_nsrst_delay,
argv[0]=ocd_jtag_nsrst_delay
Debug: 34 0 command.c:108 script_command(): script_command - jtag_nsrst_delay,
argv[1]=100
Debug: 36 0 command.c:91 script_command(): script_command - jtag_ntrst_delay
Debug: 37 0 command.c:108 script_command(): script_command - jtag_ntrst_delay,
argv[0]=ocd_jtag_ntrst_delay
Debug: 38 0 command.c:108 script_command(): script_command - jtag_ntrst_delay,
argv[1]=100
Debug: 40 1 command.c:91 script_command(): script_command - reset_config
Debug: 41 1 command.c:108 script_command(): script_command - reset_config,
argv[0]=ocd_reset_config
Debug: 42 1 command.c:108 script_command(): script_command - reset_config,
argv[1]=trst_and_srst
Debug: 43 1 jtag.c:1858 jim_newtap_cmd(): Creating New Tap, Chip: stm32_hitex,
Tap: cpu, Dotted: stm32_hitex.cpu, 8 params
Debug: 44 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irlen
Debug: 45 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -ircapture
Debug: 46 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irmask
Debug: 47 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -expected-id
Debug: 48 1 jtag.c:1990 jim_newtap_cmd(): Created Tap: stm32_hitex.cpu @ abs
position 0, irlen 4, capture: 0xf mask: 0xe
Debug: 49 1 jtag.c:1858 jim_newtap_cmd(): Creating New Tap, Chip: stm32_hitex,
Tap: bs, Dotted: stm32_hitex.bs, 6 params
Debug: 50 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irlen
Debug: 51 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -ircapture
Debug: 52 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irmask
Debug: 53 1 jtag.c:1990 jim_newtap_cmd(): Created Tap: stm32_hitex.bs @ abs
position 1, irlen 5, capture: 0x1 mask: 0x1e
Debug: 54 1 jtag.c:1858 jim_newtap_cmd(): Creating New Tap, Chip: stm32_hitex,
Tap: unknown, Dotted: stm32_hitex.unknown, 6 params
Debug: 55 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irlen
Debug: 56 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -ircapture
Debug: 57 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irmask
Debug: 58 1 jtag.c:1990 jim_newtap_cmd(): Created Tap: stm32_hitex.unknown @
abs position 2, irlen 4, capture: 0x1 mask: 0xf
Debug: 59 1 target.c:3961 jim_target(): Target command params:
Debug: 60 1 target.c:3962 jim_target(): target create stm32_hitex.cpu cortex_m3
-endian little -chain-position stm32_hitex.cpu
Debug: 62 1 command.c:91 script_command(): script_command - bank
Debug: 63 1 command.c:108 script_command(): script_command - bank,
argv[0]=ocd_flash_bank
Debug: 64 1 command.c:108 script_command(): script_command - bank,
argv[1]=stm32x
Debug: 65 1 command.c:108 script_command(): script_command - bank, argv[2]=0
Debug: 66 1 command.c:108 script_command(): script_command - bank, argv[3]=0
Debug: 67 1 command.c:108 script_command(): script_command - bank, argv[4]=0
Debug: 68 1 command.c:108 script_command(): script_command - bank, argv[5]=0
Debug: 69 1 command.c:108 script_command(): script_command - bank, argv[6]=0
Debug: 71 1 command.c:91 script_command(): script_command - gdb_port
Debug: 72 1 command.c:108 script_command(): script_command - gdb_port,
argv[0]=ocd_gdb_port
Debug: 73 1 command.c:108 script_command(): script_command - gdb_port,
argv[1]=4789
User : 74 1 command.c:494 command_run_line():
Debug: 76 1 command.c:91 script_command(): script_command - init
Debug: 77 1 command.c:108 script_command(): script_command - init,
argv[0]=ocd_init
Debug: 78 1 openocd.c:137 handle_init_command(): target init complete
Debug: 79 1 ft2232.c:1540 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX
with 'stm32stick' layout (0640:002d)
Debug: 80 591 ft2232.c:1651 ft2232_init_ftd2xx(): current latency timer: 2
Debug: 81 592 ft2232.c:2278 stm32stick_init(): 80 88 8b
Debug: 82 593 ft2232.c:2298 stm32stick_init(): 82 01 03
Debug: 83 594 ft2232.c:294 ft2232_speed(): 86 0b 00
Debug: 84 606 openocd.c:144 handle_init_command(): jtag interface init complete
Debug: 85 606 jtag.c:2206 jtag_init_inner(): Init JTAG chain
Debug: 86 606 jtag.c:392 jtag_call_event_callbacks(): jtag event: JTAG
controller reset (RESET or TRST)
Debug: 87 606 jtag.c:1453 jtag_reset_callback(): -
Debug: 88 606 jtag.c:1453 jtag_reset_callback(): -
Debug: 89 606 jtag.c:1453 jtag_reset_callback(): -
Debug: 90 611 jtag.c:392 jtag_call_event_callbacks(): jtag event: JTAG
controller reset (RESET or TRST)
Debug: 91 611 jtag.c:1453 jtag_reset_callback(): -
Debug: 92 611 jtag.c:1453 jtag_reset_callback(): -
Debug: 93 611 jtag.c:1453 jtag_reset_callback(): -
Error: 94 616 jtag.c:1509 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: 95 616 jtag.c:2221 jtag_init_inner(): trying to validate configured JTAG
chain anyway...
Debug: 96 616 jtag.c:392 jtag_call_event_callbacks(): jtag event: JTAG
controller reset (RESET or TRST)
Debug: 97 616 jtag.c:1453 jtag_reset_callback(): -
Debug: 98 616 jtag.c:1453 jtag_reset_callback(): -
Debug: 99 616 jtag.c:1453 jtag_reset_callback(): -
Error: 100 618 jtag.c:1684 jtag_validate_chain(): Could not validate JTAG scan
chain, IR mismatch, scan returned 0x7FFF. tap=stm32_hitex.cpu pos=0 expected
0x1 got 3
Warn : 101 618 jtag.c:2226 jtag_init_inner(): Could not validate JTAG chain,
continuing anyway...
Debug: 102 618 openocd.c:150 handle_init_command(): jtag init complete
Debug: 103 618 cortex_swjdp.c:977 ahbap_debugport_init():
Warn : 104 628 cortex_swjdp.c:220 swjdp_transaction_endcheck(): Invalid ACK in
SWJDP transaction
Warn : 105 635 cortex_swjdp.c:220 swjdp_transaction_endcheck(): Invalid ACK in
SWJDP transaction
Debug: 106 635 cortex_swjdp.c:1021 ahbap_debugport_init(): AHB-AP ID Register
0xffffffff, Debug ROM Address 0xffffffff
Warn : 107 639 cortex_swjdp.c:220 swjdp_transaction_endcheck(): Invalid ACK in
SWJDP transaction
Warn : 108 647 cortex_swjdp.c:220 swjdp_transaction_endcheck(): Invalid ACK in
SWJDP transaction
Warn : 109 659 cortex_swjdp.c:734 ahbap_read_buf_u32(): Block read error
address 0xe000ed00, count 0x1
Debug: 110 659 target.c:1180 target_read_u32(): address: 0xe000ed00 failed
Debug: 111 659 openocd.c:159 handle_init_command(): flash init complete
Debug: 112 659 openocd.c:163 handle_init_command(): mflash init complete
Debug: 113 659 openocd.c:167 handle_init_command(): NAND init complete
Debug: 114 659 openocd.c:171 handle_init_command(): pld init complete
Warn : 115 659 telnet_server.c:612 telnet_init(): no telnet port specified,
using default port 4444
Debug: 116 659 gdb_server.c:2225 gdb_init(): gdb service for target cortex_m3
at port 4789
Warn : 117 659 tcl_server.c:178 tcl_init(): no tcl port specified, using
default port 6666
User : 118 659 command.c:494 command_run_line():
Warn : 119 678 cortex_swjdp.c:220 swjdp_transaction_endcheck(): Invalid ACK in
SWJDP transaction
Warn : 120 786 cortex_swjdp.c:220 swjdp_transaction_endcheck(): Invalid ACK in
SWJDP transaction
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development