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
applet.interface.jtag_openocd: Add SWD support #266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether the approach of adding TMS tristate into the generic JTAG code is the right one, so I can't merge this right away; this PR will have to wait until I have more time to consider it.
Sure, no need to rush anything. My newborn just arrived, so my free time is quite limited now as well ;-) |
This adds handling of new command characters to make SWD work. The command characters are as follows: O - SWDIO drive 1 o - SWDIO drive 0 c - SWDIO read request d - SWD write 0 0 e - SWD write 0 1 f - SWD write 1 0 g - SWD write 1 1 The new commands will be emitted by an updated version of openocd (http://openocd.zylin.com/#/c/6044/) It has been tested against an stm32f103 and an at91samd21 target connected to a glasgow revC1.
e114202
to
d7da0d2
Compare
@mwick83 Hi Manuel! Would you like to get this patch to completion in both openocd and Glasgow? I have more bandwidth to spend on Glasgow these days, and I think this is a very nice feature and it would be wonderful to have it. |
@whitequark Hi Cathrine, I would also love to see this feature integrated and I would love to work on it, but to be honest, time doesn't currently permit it. So, if you do have bandwidth to work on it, feel free to use the patches as a startingpoint. On the openocd side, I think there is at least rebasing needed. As far as I can remember their bitbang implementation has been improved with regard to network performance. Performance was also one of my main concerns initially. Communication with the target was pretty slow. But I wanted to get initial support out the door first. |
Oh, when I'm back from holidays, I could defenitly spin up some real hardware tests, if needed. |
Cool, thank you! |
This should now be upstream in openocd. |
Having carefully reviewed this, I think a separate |
I propose to replace this PR with #531. |
Sure, sounds sensible. I guess it is a rather rare case to switch between JTAG and SWD on-the-fly. I can't think of a real use case. |
Thanks for chiming in! |
This adds handling of new command characters to make SWD work.
The command characters are as follows:
O - SWDIO drive 1
o - SWDIO drive 0
c - SWDIO read request
d - SWD write 0 0
e - SWD write 0 1
f - SWD write 1 0
g - SWD write 1 1
The new commands will be emitted by an updated version of openocd
(http://openocd.zylin.com/#/c/6044/)
It has been tested against an stm32f103 and an at91samd21 target
connected to a glasgow revC1.