AnsweredAssumed Answered

OpenOCD and stlink-v2

Question asked by usafape on Aug 28, 2012
Latest reply on Aug 30, 2012 by usafape
I am trying to get OpenOCD to work with my STM32F4Discovery board and I get the following error:

fabio@fs-1:~/workspace/stm32_code/test$ openocd -d 3 -f ./openocd.cfg
Open On-Chip Debugger 0.6.0-rc1-dev-00015-g47728f9 (2012-08-27-23:46)
Licensed under GNU GPL v2
For bug reports, read
User : 11 2 command.c:549 command_print(): debug_level: 3
Debug: 12 2 configuration.c:45 add_script_search_dir(): adding /home/fabio/.openocd
Debug: 13 2 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/site
Debug: 14 2 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/scripts
Debug: 15 2 configuration.c:86 find_file(): found ./openocd.cfg
Debug: 16 2 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_telnet_port 4444
Debug: 17 2 command.c:145 script_debug(): command - telnet_port ocd_telnet_port 4444
Debug: 19 2 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_gdb_port 3333
Debug: 20 2 command.c:145 script_debug(): command - gdb_port ocd_gdb_port 3333
Debug: 22 2 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface stlink-v2
Debug: 23 2 command.c:145 script_debug(): command - interface ocd_interface stlink-v2
Error: 25 2 adapter.c:183 handle_interface_command(): The specified debug interface was not found (stlink-v2)
User : 26 2 command.c:549 command_print(): The following debug interfaces are available:
Debug: 27 2 command.c:631 run_command(): Command failed with error code -101
User : 28 2 command.c:669 command_run_line(): Runtime Error: ./openocd.cfg:5:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'interface' called at file "./openocd.cfg", line 5

I am using the following config file:
#daemon configuration
telnet_port 4444
gdb_port 3333
# Interface (using versaloon)
interface stlink-v2
transport select swd
swd_mode 2
swd_delay 2
 
 
set WORKAREASIZE 0x800
source [find target/stm32.cfg]

Can somebody shine me some light to this?

Outcomes