-
Notifications
You must be signed in to change notification settings - Fork 134
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
Enable remote_bitbang support by default #134
Conversation
Predictably though, the
Garbling the OpenOCD side with bad commands (I guess?):
|
Fortunately in this PR, the "classic" OpenOCD
|
Hi @brainstorm, thanks for the PR. Regarding tcl/board/esp32s2-saola-1.cfg — i'm not sure about adding this file. Normally we add board-specific TCL files only when the board has a built-in JTAG interface. In other cases, if the board doesn't contain the JTAG interface, you can run OpenOCD specifying a pair of config files: one for the target, and one for the interface. This way every user can choose which interface to use. You can probably agree that "remote_bitbang" as the default for Saola is no better than any other interface that can be connected externally (JLink, FT2232H, etc). We can add a trivial config file for remote_bitbang interface, so that you can run OpenOCD like this:
Would this work for you? |
You are totally right, Igor, I see your point. Your suggestion would work for me as well, so I'll get rid of the Saola config and put in place what you propose. I'll fix it tonight, thanks for the speedy review! |
@igrr Actually instead of your command:
It would be with the argument flipped like this:
Otherwise I get the following error: $ openocd -f target/esp32s2.cfg -f interface/remote_bitbang.cfg
Open On-Chip Debugger v0.10.0-esp32-20201202-2-g7e342cad (2021-01-02-23:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Error: Debug adapter doesn't support any transports?
target/esp32s2.cfg:2: Error:
in procedure 'script'
at file "embedded:startup.tcl", line 26
at file "target/esp32s2.cfg", line 2 So ready to merge as-is now... would you document this somewhere in official docs? I don't want other people to go through this again :P Thanks! |
Thanks @brainstorm. Regarding documenting this, I've added a task in the internal issue tracker. Once a new OpenOCD release is made and IDF is updated to use it, we'll mention this in the docs. May I ask you to combine the 6 commits in your branch into one commit, e.g. "interface: enable remote_bitbang by default and add cfg file"? If you are unsure how, you can also leave it as is and I will do it for you, keeping your authorship. |
Sure @igrr rebased, reworded, squashed and pushed right now. Eager to see the new release so I don't have to fiddle with it across updates anymore:
There seems to be a bunch of version-checking logic in Thanks! |
@igrr happy to write that up in the docs too if that helps speeding up the merge? Just point me a repo or |
Fixes #133
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html
First commit fails because this board does not seem to have JTAG_USB support since it's fronted by an FTDI IC instead (UART), resulting in:
Instead the following file in
openocd/tcl/interface
...:... Needs to be edited accordingly:
Perhaps this should be documented accordingly somewhere in espressif documentation?
If connecting with a remote JTAG bitbanging Glasgow board like so:
And running the following Glasgow applet command:
Plus the corresponding OpenOCD command on another terminal:
Which should be fixed in VSCode ESP-IDF extension (see issue espressif/vscode-esp-idf-extension#259), ideally ;)