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

Section 1.4.4 references unknown files #283

Closed
aThorp96 opened this issue Feb 17, 2021 · 6 comments
Closed

Section 1.4.4 references unknown files #283

aThorp96 opened this issue Feb 17, 2021 · 6 comments

Comments

@aThorp96
Copy link

This section tells you to run $ openocd -f interface/stlink.cfg -f target/stm32f3x.cfg, except it doesn't specify where to get those files. Are they part of the project template?

@adamgreig
Copy link
Member

Those files are (or, should be) included with openocd, but if your openocd is a old version (which unfortunately includes the most recent release 0.10.0, from 2017), you might need to try a different filename (interface/stlink-v2.cfg perhaps). If you can, I recommend getting the latest nightly version of openocd, there are pre-built images available for various operating systems.

Another option is to use a tool such as PyOCD or probe-rs, which can also provide a GDB interface, are more up-to-date, and will work with ST-Links as well.

@aThorp96
Copy link
Author

Thanks for your quick response @adamgreig! I may have those files, but I'm not sure. Do you know where apt would install the files?

@adamgreig
Copy link
Member

You don't need to provide a path, openocd just knows where to look when you pass it those arguments to the -f flag. If you have installed openocd from apt you probably don't have stlink.cfg, though, as the apt version is the latest (super old) release.

In Ubuntu they'd be /usr/share/openocd/scripts/interface/ and target/, you'll probably find stlink-v2.cfg. (By the way, you can run locate stlink-v2.cfg to rapidly find that sort of thing).

@aThorp96
Copy link
Author

Ah, gotcha. When it didn't find the file I assumed it was a relative path. Thanks! I'll keep the locate command in mind :)

@aThorp96
Copy link
Author

I'm not sure whether or not this warrants any changes to the section, if a you need an open ticket for tracking, so I'll let you close it at your discretion. However my initial issue is resolved. Thanks again for the quick help @adamgreig ! Much appreciated

@adamgreig
Copy link
Member

Glad to hear it! I think this is already covered by #277 and #263, so I'll close this one. And, uh, maybe make a note in the book this time...

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]>
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

2 participants