Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Discovery boards use a stlink-v2-1 and need different openocd config file #263

Open
Phylex opened this issue Sep 5, 2020 · 5 comments

Comments

@Phylex
Copy link

Phylex commented Sep 5, 2020

Hi in the "Verify Installation" section of the book openocd is started with the interface/stlink.cfg or the /stlink-v2.cfg new boards use a stlink-v2-1 so the correct file is the interface/stlink-v2-1.cfg then it starts without a problem otherwise it errors with
Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'. adapter speed: 1000 kHz adapter_nsrst_delay: 100 Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD none separate Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Error: open failed in procedure 'init' in procedure 'ocd_bouncer'

@adamgreig
Copy link
Member

Thanks for the report! What version of openocd are you using? In the latest version, there's no stlink-v2.cfg or stlink-v2-1.cfg, and all STlinks use just stlink.cfg instead. However, there hasn't been a release of openocd in a long time, so many users are still on old versions where those other files are required.

Probably the complete solution here is that we'll stop suggesting openocd and suggest probe-rs tools instead, which don't have this sort of issue.

@Phylex
Copy link
Author

Phylex commented Sep 16, 2020

The version is 0.10.0 and is the current packaged version for void-linux.

@bitdivine
Copy link

Same symptoms, solution and openocd version here. 0.10.0 is also the default version of openocd for Ububtu 20.04. I note that for programming Blue Pills I also use stlink-v2-1.cfg

@julianoes
Copy link

This issue seems to have been fixed by #268, however, it would be good to add to the troubleshooting section to try both, if one doesn't work. The F3 I bought seemed to still want v2, not v2-1.

bors bot added a commit to rust-embedded/discovery that referenced this issue Oct 17, 2020
272: appendix: add hint about ST-LINK config version r=eldruin a=julianoes

My F3 seemed to come with the stlink-v2 and not the stlink-v2-1 config interface which caused the same "Error: open failed" output.

I suggest to hint to try the older version in that case.

I've also separated Cause and Fix headings because I didn't know how to phrase it otherwise.

Related to rust-embedded/book#263.

Co-authored-by: Julian Oes <[email protected]>
bors bot added a commit to rust-embedded/discovery that referenced this issue Oct 17, 2020
272: appendix: add hint about ST-LINK config version r=eldruin a=julianoes

My F3 seemed to come with the stlink-v2 and not the stlink-v2-1 config interface which caused the same "Error: open failed" output.

I suggest to hint to try the older version in that case.

I've also separated Cause and Fix headings because I didn't know how to phrase it otherwise.

Related to rust-embedded/book#263.

Co-authored-by: Julian Oes <[email protected]>
bors bot added a commit to rust-embedded/discovery that referenced this issue Oct 17, 2020
272: appendix: add hint about ST-LINK config version r=eldruin a=julianoes

My F3 seemed to come with the stlink-v2 and not the stlink-v2-1 config interface which caused the same "Error: open failed" output.

I suggest to hint to try the older version in that case.

I've also separated Cause and Fix headings because I didn't know how to phrase it otherwise.

Related to rust-embedded/book#263.

Co-authored-by: Julian Oes <[email protected]>
bors bot added a commit to rust-embedded/discovery that referenced this issue Oct 18, 2020
272: appendix: add hint about ST-LINK config version r=eldruin a=julianoes

My F3 seemed to come with the stlink-v2 and not the stlink-v2-1 config interface which caused the same "Error: open failed" output.

I suggest to hint to try the older version in that case.

I've also separated Cause and Fix headings because I didn't know how to phrase it otherwise.

Related to rust-embedded/book#263.

Co-authored-by: Julian Oes <[email protected]>
bors bot added a commit to rust-embedded/discovery that referenced this issue Oct 18, 2020
272: appendix: add hint about ST-LINK config version r=eldruin a=julianoes

My F3 seemed to come with the stlink-v2 and not the stlink-v2-1 config interface which caused the same "Error: open failed" output.

I suggest to hint to try the older version in that case.

I've also separated Cause and Fix headings because I didn't know how to phrase it otherwise.

Related to rust-embedded/book#263.

Co-authored-by: Julian Oes <[email protected]>
bors bot added a commit to rust-embedded/discovery that referenced this issue Oct 26, 2020
272: appendix: add hint about ST-LINK config version r=eldruin a=julianoes

My F3 seemed to come with the stlink-v2 and not the stlink-v2-1 config interface which caused the same "Error: open failed" output.

I suggest to hint to try the older version in that case.

I've also separated Cause and Fix headings because I didn't know how to phrase it otherwise.

Related to rust-embedded/book#263.

Co-authored-by: Julian Oes <[email protected]>
@jeffwhite-619
Copy link

I have recently ordered a Discovery board for use in this tutorial and had to change the filename to stlink-v2-1.cfg for it to work. I'm not sure if I received an older board, or if this is the newer board, but it does appear that users like myself may be still be acquiring boards that need this change to proceed through the tutorial.

bors bot added a commit that referenced this issue Feb 17, 2021
284: Add note about using more recent openocd interface file. Closes #277 and #263 r=eldruin a=adamgreig

This is a long-standing issue thanks to openocd's confusing rename of this interface file and not having a release for many years (see also #283 and #268).

Co-authored-by: Adam Greig <[email protected]>
JohnTitor added a commit to JohnTitor/rust that referenced this issue Mar 2, 2021
Update books

## reference

2 commits in 361367c126290ac17cb4089f8d38fd8b2ac43f98..3b6fe80c205d2a2b5dc8a276192bbce9eeb9e9cf
2021-02-15 09:58:13 -0800 to 2021-02-22 22:09:17 -0800
- Add an extra fn() entry to the variance table in the subtyping chapter (rust-lang/reference#874)
- Turbofish: Explain what the example is of. (rust-lang/reference#966)

## book

28 commits in db5e8a5105aa22979490dce30e33b68d8645761d..0f87daf683ae3de3cb725faecb11b7e7e89f0e5a
2021-02-12 16:58:20 -0500 to 2021-03-01 08:54:04 -0500
- Ohhh the should_panic was for mdbook test. Oops
- Fix bad regex in the update rustc script and regenerate broken output
- Clarify that we only mentioned unwrap_or_else, but haven't explained it
- Add ferris to some listings that don't compile. Fixes rust-lang/book#2598
- Remove fancy quote from a code comment
- Panic now points at our code, not stdlib slice code
- Disable playground on thread::sleep examples
- Disable playground button on listings in ch 12 that use CLI args
- Reword ambiguous sentence. Fixes rust-lang/book#2317.
- Rename shoes_in_my_size to shoes_in_size to be a better example
- Fix visible "ANCHOR: here" in listing 13-21 (rust-lang/book#2628)
- minor clarification about deriving Copy and Clone (rust-lang/book#2627)
- Clarify relationship of trait to mock object
- Fix "message" that should be "method"
- Fix rust-lang/book#2625 (rust-lang/book#2626)
- fix misleading hash claim (rust-lang/book#2621)
- Make link syntax consistent and word wrap
- Added hyperlinks to Appendices
- Use console syntax highlighting in some more places
- Merge remote-tracking branch 'origin/pr/2615'
- Fix broken blockquote
- Update one more bit of output caught by the update rust script
- Update and clarify some text affected by the rand update
- Update lock files and output
- Update error output for changes to chapter 10 listings
- Merge remote-tracking branch 'origin/pr/2542'
- Tweak wording in for loop explanation
- Merge remote-tracking branch 'origin/pr/2460'

## rust-by-example

1 commits in 551cc4bc8394feccea6acd21f86d9a4e1d2271a0..3e0d98790c9126517fa1c604dc3678f396e92a27
2021-02-03 17:12:37 -0300 to 2021-02-25 08:23:10 -0300
- Make flow_control/for/.into_iter() example run (rust-lang/rust-by-example#1415)

## rustc-dev-guide

530 commits in 7adfab4..c431f8c
2020-04-08 08:52:05 +0200 to 2021-02-28 16:35:20 -0500

... Many updates.

## embedded-book

1 commits in 4cf7981696a85c3e633076c6401611bd3f6346c4..a96d096cffe5fa2c84af1b4b61e1492f839bb2e1
2021-02-11 10:55:22 +0000 to 2021-02-17 08:08:52 +0000
- Add note about using more recent openocd interface file. Closes rust-embedded/book#277 and rust-embedded/book#263  (rust-embedded/book#284)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants