-
Notifications
You must be signed in to change notification settings - Fork 5
Jtag support #8
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
Jtag support #8
Conversation
|
Looking forward to this! 🚀 You go! |
9e1376d to
afd4b7b
Compare
|
I think in places it's really obvious that I'm working with a bitbanging implementation on the other end, so I can pretty easily affort 1-bit sequences in the API - for my case. Not sure if that is acceptable for more sophisticated implementations, but regardless of that, this PR needs some debugging work before I can start thinking about that :) This PR is largely based on the CMSIS-DAP library that the RPi debugprobe sources pull in (which then don't end up using JTAG...), and they have largely been mechanically transcribed. As that wasn't particularly easy, I expect the code to have issues, although right now my setup seems broken and I can't even make sense of the logic analyzer trace I captured yesterday. My next step is to get an ESP32-based implementation working, so that I can attach a debugger without fear of tearing off test points from the RPi debugprobe, hopefully that will make it easier to find out what goes wrong and where. |
|
Fixed a few things, probe-rs can now output at least something:
|
|
Hmm I think I got this right, just DPIDR comes back as 0 over JTAG for whatever reason. This chip is iffy (SWD seems to be sampled incorrectly) so maybe I should expect anomalies like this. I was able to run an embedded-test test suite, so I guess it's time to start cleaning this up :) |
|
Let's see what we can do with this :) |
|
Very nice! Is there also a reference implementation in e.g. the Rusty Probe's firmware? I'm thinking about how I'll test the PR. |
|
Do you have a reference implementation I can port to the Rusty Probe? I think that should be enough to validate this as working. :) |
|
I've started the implementation here: probe-rs/rusty-probe-firmware#31 |
|
Sorry Emil, I don't really want to merge PRs without you, but I don't want to force you into writing code for this, either. I also trust the PR enough to think it's useful in the state it is - I've used this to interface with multiple devices using multiple debug probe implementations and I'd like to move on to other work. I don't expect this code to be perfect, but I think I've reasonably matched ARM's implementation. I believe we can improve everything iteratively as we need to. |
No description provided.