Hey,

thanks a lot for the help.
That obviously did it. I still have the following errors but I can now use gdb to debug my code. 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.cpu pos=0 expected 0x1 got 3

Is this going to be a problem later on???

thanks a lot for your help
Michael

Spencer Oliver schrieb:
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Michael Jäntsch
Sent: 10 March 2009 17:46
To: [email protected]
Subject: Re: [Openocd-development] ST32-PerformanceStick

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



Its hard to say what is causing the problem
The ST32-PerformanceStick works find for me on both win32/linux
I am using the ftdi's own driver in linux, however libftdi also works fine.

Just for info, do you have v1 or v2 - they may have differant vid/pid's -
run lsusb to find out.
http://www.hitex.com/index.php?id=340
http://www.hitex.com/index.php?id=1506

here is my working config:

# debug options
debug_level 3
#log_output openocd.log

# daemon configuration
telnet_port 4000
gdb_port 2000

jtag_khz 500

# comstick ftdi device
interface ft2232
ft2232_layout stm32stick
#ft2232_device_desc "STM32-PerformanceStick A"        # for win32
ft2232_device_desc "STM32-PerformanceStick"
ft2232_vid_pid 0x0640 0x002d    # required for linux

jtag_nsrst_delay 100
jtag_ntrst_delay 100

# use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst

# stm32 stick
jtag newtap stm32 cpu -irlen 4 -ircapture 0x1 -irmask 0xf
jtag newtap stm32 bs -irlen 5 -ircapture 0x1 -irmask 0x1
jtag newtap str750 unknown -irlen 4 -ircapture 0x1 -irmask 0x0f
target create stm32.cpu cortex_m3 -endian little -chain-position stm32.cpu

# working area
stm32.cpu configure -work-area-virt 0 -work-area-phys 0x20000000
-work-area-size 0x4000 -work-area-backup 0

# flash stuff
flash bank stm32x 0 0 0 0 0

init
reset halt

Cheers
Spen



--
Technische Universität München
Michael Jäntsch
Fakultät für Informatik
Robotics and Embedded Systems
Boltzmannstr. 3
85748 Garching bei München
[email protected]
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 1 command.c:494 command_run_line(): 
Debug: 6 1 configuration.c:88 find_file(): found openocd.cfg
Debug: 8 1 command.c:91 script_command(): script_command - telnet_port
Debug: 9 1 command.c:108 script_command(): script_command - telnet_port, 
argv[0]=ocd_telnet_port
Debug: 10 1 command.c:108 script_command(): script_command - telnet_port, 
argv[1]=4000
Debug: 12 1 command.c:91 script_command(): script_command - gdb_port
Debug: 13 1 command.c:108 script_command(): script_command - gdb_port, 
argv[0]=ocd_gdb_port
Debug: 14 1 command.c:108 script_command(): script_command - gdb_port, 
argv[1]=2000
Debug: 16 1 command.c:91 script_command(): script_command - jtag_khz
Debug: 17 1 command.c:108 script_command(): script_command - jtag_khz, 
argv[0]=ocd_jtag_khz
Debug: 18 1 command.c:108 script_command(): script_command - jtag_khz, 
argv[1]=500
Debug: 19 1 jtag.c:2611 handle_jtag_khz_command(): handle jtag khz
User : 20 1 command.c:383 command_print(): 500 kHz
Debug: 22 1 command.c:91 script_command(): script_command - interface
Debug: 23 1 command.c:108 script_command(): script_command - interface, 
argv[0]=ocd_interface
Debug: 24 1 command.c:108 script_command(): script_command - interface, 
argv[1]=ft2232
Debug: 26 1 command.c:91 script_command(): script_command - ft2232_layout
Debug: 27 1 command.c:108 script_command(): script_command - ft2232_layout, 
argv[0]=ocd_ft2232_layout
Debug: 28 1 command.c:108 script_command(): script_command - ft2232_layout, 
argv[1]=stm32stick
Debug: 30 1 command.c:91 script_command(): script_command - ft2232_device_desc
Debug: 31 1 command.c:108 script_command(): script_command - 
ft2232_device_desc, argv[0]=ocd_ft2232_device_desc
Debug: 32 1 command.c:108 script_command(): script_command - 
ft2232_device_desc, argv[1]=STM32-PerformanceStick
Debug: 34 1 command.c:91 script_command(): script_command - ft2232_vid_pid
Debug: 35 1 command.c:108 script_command(): script_command - ft2232_vid_pid, 
argv[0]=ocd_ft2232_vid_pid
Debug: 36 1 command.c:108 script_command(): script_command - ft2232_vid_pid, 
argv[1]=0x0640
Debug: 37 1 command.c:108 script_command(): script_command - ft2232_vid_pid, 
argv[2]=0x002d
Debug: 39 1 command.c:91 script_command(): script_command - jtag_nsrst_delay
Debug: 40 1 command.c:108 script_command(): script_command - jtag_nsrst_delay, 
argv[0]=ocd_jtag_nsrst_delay
Debug: 41 1 command.c:108 script_command(): script_command - jtag_nsrst_delay, 
argv[1]=100
Debug: 43 1 command.c:91 script_command(): script_command - jtag_ntrst_delay
Debug: 44 1 command.c:108 script_command(): script_command - jtag_ntrst_delay, 
argv[0]=ocd_jtag_ntrst_delay
Debug: 45 1 command.c:108 script_command(): script_command - jtag_ntrst_delay, 
argv[1]=100
Debug: 47 1 command.c:91 script_command(): script_command - reset_config
Debug: 48 1 command.c:108 script_command(): script_command - reset_config, 
argv[0]=ocd_reset_config
Debug: 49 1 command.c:108 script_command(): script_command - reset_config, 
argv[1]=trst_and_srst
Debug: 50 1 jtag.c:1858 jim_newtap_cmd(): Creating New Tap, Chip: stm32, Tap: 
cpu, Dotted: stm32.cpu, 6 params
Debug: 51 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irlen
Debug: 52 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -ircapture
Debug: 53 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irmask
Debug: 54 1 jtag.c:1990 jim_newtap_cmd(): Created Tap: stm32.cpu @ abs position 
0, irlen 4, capture: 0x1 mask: 0xf
Debug: 55 1 jtag.c:1858 jim_newtap_cmd(): Creating New Tap, Chip: stm32, Tap: 
bs, Dotted: stm32.bs, 6 params
Debug: 56 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irlen
Debug: 57 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -ircapture
Debug: 58 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irmask
Debug: 59 1 jtag.c:1990 jim_newtap_cmd(): Created Tap: stm32.bs @ abs position 
1, irlen 5, capture: 0x1 mask: 0x1
Debug: 60 1 jtag.c:1858 jim_newtap_cmd(): Creating New Tap, Chip: stm32, Tap: 
unknown, Dotted: stm32.unknown, 6 params
Debug: 61 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irlen
Debug: 62 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -ircapture
Debug: 63 1 jtag.c:1877 jim_newtap_cmd(): Processing option: -irmask
Debug: 64 1 jtag.c:1990 jim_newtap_cmd(): Created Tap: stm32.unknown @ abs 
position 2, irlen 4, capture: 0x1 mask: 0xf
Debug: 65 1 target.c:3961 jim_target(): Target command params:
Debug: 66 1 target.c:3962 jim_target(): target create stm32.cpu cortex_m3 
-endian little -chain-position stm32.cpu 
Debug: 68 2 command.c:91 script_command(): script_command - bank
Debug: 69 2 command.c:108 script_command(): script_command - bank, 
argv[0]=ocd_flash_bank
Debug: 70 2 command.c:108 script_command(): script_command - bank, 
argv[1]=stm32x
Debug: 71 2 command.c:108 script_command(): script_command - bank, 
argv[2]=0x08000000
Debug: 72 2 command.c:108 script_command(): script_command - bank, 
argv[3]=0x20000
Debug: 73 2 command.c:108 script_command(): script_command - bank, argv[4]=0
Debug: 74 2 command.c:108 script_command(): script_command - bank, argv[5]=0
Debug: 75 2 command.c:108 script_command(): script_command - bank, argv[6]=0
Debug: 77 2 command.c:91 script_command(): script_command - gdb_memory_map
Debug: 78 2 command.c:108 script_command(): script_command - gdb_memory_map, 
argv[0]=ocd_gdb_memory_map
Debug: 79 2 command.c:108 script_command(): script_command - gdb_memory_map, 
argv[1]=enable
Debug: 81 2 command.c:91 script_command(): script_command - gdb_flash_program
Debug: 82 2 command.c:108 script_command(): script_command - gdb_flash_program, 
argv[0]=ocd_gdb_flash_program
Debug: 83 2 command.c:108 script_command(): script_command - gdb_flash_program, 
argv[1]=enable
User : 84 2 command.c:494 command_run_line(): 
Debug: 86 2 command.c:91 script_command(): script_command - init
Debug: 87 2 command.c:108 script_command(): script_command - init, 
argv[0]=ocd_init
Debug: 88 2 openocd.c:137 handle_init_command(): target init complete
Debug: 89 2 ft2232.c:1540 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX 
with 'stm32stick' layout (0640:002d)
Debug: 90 592 ft2232.c:1651 ft2232_init_ftd2xx(): current latency timer: 2
Debug: 91 593 ft2232.c:2278 stm32stick_init(): 80 88 8b
Debug: 92 594 ft2232.c:2298 stm32stick_init(): 82 01 03
Debug: 93 595 ft2232.c:294 ft2232_speed(): 86 0b 00
Debug: 94 607 openocd.c:144 handle_init_command(): jtag interface init complete
Debug: 95 607 jtag.c:2206 jtag_init_inner(): Init JTAG chain
Debug: 96 609 jtag.c:392 jtag_call_event_callbacks(): jtag event: JTAG 
controller reset (RESET or TRST)
Debug: 97 609 jtag.c:1453 jtag_reset_callback(): -
Debug: 98 609 jtag.c:1453 jtag_reset_callback(): -
Debug: 99 609 jtag.c:1453 jtag_reset_callback(): -
Debug: 100 610 jtag.c:392 jtag_call_event_callbacks(): jtag event: JTAG 
controller reset (RESET or TRST)
Debug: 101 610 jtag.c:1453 jtag_reset_callback(): -
Debug: 102 610 jtag.c:1453 jtag_reset_callback(): -
Debug: 103 610 jtag.c:1453 jtag_reset_callback(): -
Error: 104 622 jtag.c:1509 jtag_examine_chain(): JTAG communication failure, 
check connection, JTAG interface, target power etc.
Error: 105 622 jtag.c:2221 jtag_init_inner(): trying to validate configured 
JTAG chain anyway...
Debug: 106 622 jtag.c:392 jtag_call_event_callbacks(): jtag event: JTAG 
controller reset (RESET or TRST)
Debug: 107 622 jtag.c:1453 jtag_reset_callback(): -
Debug: 108 622 jtag.c:1453 jtag_reset_callback(): -
Debug: 109 622 jtag.c:1453 jtag_reset_callback(): -
Error: 110 624 jtag.c:1684 jtag_validate_chain(): Could not validate JTAG scan 
chain, IR mismatch, scan returned 0x7FFF. tap=stm32.cpu pos=0 expected 0x1 got 3
Warn : 111 624 jtag.c:2226 jtag_init_inner(): Could not validate JTAG chain, 
continuing anyway...
Debug: 112 624 openocd.c:150 handle_init_command(): jtag init complete
Debug: 113 624 cortex_swjdp.c:977 ahbap_debugport_init():  
Warn : 114 626 jtag.c:1357 jtag_check_value(): TAP stm32.cpu:
Warn : 115 626 jtag.c:1367 jtag_check_value(): value captured during scan 
didn't pass the requested check:
Warn : 116 626 jtag.c:1369 jtag_check_value(): captured: 0x0F check_value: 0x01 
check_mask: 0x0F
Warn : 117 626 jtag.c:1321 jtag_read_buffer(): in_handler: w/o "in_value", 
mismatch in SIR
Debug: 118 627 openocd.c:159 handle_init_command(): flash init complete
Debug: 119 627 openocd.c:163 handle_init_command(): mflash init complete
Debug: 120 627 openocd.c:167 handle_init_command(): NAND init complete
Debug: 121 627 openocd.c:171 handle_init_command(): pld init complete
Debug: 122 627 gdb_server.c:2225 gdb_init(): gdb service for target cortex_m3 
at port 2000
Warn : 123 627 tcl_server.c:178 tcl_init(): no tcl port specified, using 
default port 6666
User : 124 627 command.c:494 command_run_line(): 
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to