Reputation: 1426
I got some problems getting OpenOCD to communicate with my STM32F100RB Discovery board (it uses ST-Link).
I am not used to working with open source tools, and therefore I've never had problems programming and debugging my embedded platforms. In the past week I've had more problems than I had ever imagined, just trying to get an IDE + FreeRTOS + Debugging up and running.
I have now decided to use Eclipse + Sourcery G++ Lite + OpenOCD for my embedded application. I have a little application compiled (good start...) and are now trying to program and debug using OpenOCD. When I am doing that I get the following error:
Open On-Chip Debugger 0.7.0-rc2 (2013-04-28-12:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Error: Debug adapter doesn't support any transports?
Runtime Error: embedded:startup.tcl:20:
in procedure 'script'
at file "embedded:startup.tcl", line 58
at file "stm32f1x_stlink.cfg", line 17
in procedure 'transport' called at file "C:/openocd-0.7.0- rc2/bin/../scripts/target/stm32_stlink.cfg", line 53
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 20
I have no idea where to start, please help. Also: if anyone has a better opensource/free IDE for STM32 which "supports" FreeRTOS (i.e. for which a demo/template is available), I'll be very happy to hear about it :)
Edit:
Ok, I think that I used the wrong config-file in the first try. Now I am getting this instead:
C:\OpenOCD\openocd-0.7.0-rc2\bin>openocd-0.7.0-rc2.exe -f stlink-v2.cfg
Open On-Chip Debugger 0.7.0-rc2 (2013-04-28-12:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn't support configurable speed
Error: session's transport is not selected.
Error: allow transport 'hla_swd'
Error: allow transport 'hla_jtag'
Error: allow transport 'stlink_swim'
in procedure 'transport'
in procedure 'init'
Upvotes: 4
Views: 24449
Reputation: 353
I encounter the same issue. When i try this command:
openocd-x64-0.8.0 -f interface\stlink-v2.cfg -f target\stm32f1x.cfg
I get the following:
c:\>openocd-x64-0.8.0 -f interface\stlink-v2.cfg -f target\stm32f1x.cfg
Open On-Chip Debugger 0.8.0 (2014-04-28-08:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Error: session's transport is not selected.
Runtime Error: embedded:startup.tcl:20:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'swj_newdap' called at file "C:/openocd-0.8.0//scripts/target\stm32f1x.cfg", line 37
in procedure 'transport' called at file "C:/openocd-0.8.0//scripts/target/swj-dp.tcl", line 26
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 20
EDIT:
Nevermind, I found it... my stlink is a V2 version, so I tried with the V2 config and stm32f1x_stlink.cfg. No it started without a glitch. Next step is to connect with GDB and Eclipse.
Cheers!
Alex
Upvotes: 0
Reputation: 8860
Why don't you just use the available board configuration? scripts/board/stm32vldiscovery.cfg This is for exactly your board. This way you won't need to specify interface and chip, just the board:
openocd-0.7.0-rc2.exe -f board/stm32vldiscovery.cfg
Upvotes: 2
Reputation: 4340
You need to also reference the stm32f1x.cfg file:
openocd-0.7.0-rc2.exe -f stlink-v2.cfg -f stm32f1x.cfg
Upvotes: 0
Reputation: 5022
To answer your second question, you didn't provide the configuration file for your board ( STM32F100RB Discovery), openocd only knows about your adapter (ST-Link), therefore the error message.
Upvotes: 0