Skip to content

Conversation

korken89
Copy link
Collaborator

Adding JTAG support from dap-rs.

@korken89 korken89 force-pushed the jtag-support branch 5 times, most recently from aaf9e7b to 7785593 Compare April 27, 2025 10:19
@bugadani
Copy link

bugadani commented Apr 27, 2025

Hmm I got a bit confused by the PIO code - the firmware is still GPIO-bitbanging, right? In that case it might be worth to rebuild this with https://github.com/bugadani/bitbang-dap, there's no need to maintain separate bitbanging implementations. That crate would take care of SWD/JTAG, the firmware needs to provide USB, the pin/delay implementation, tracing and VCP.

I imagine the pins are a bit tricky - actual bidirectional pins would need an Option with the direction selector, but otherwise it should not be a hard rework. There is a bit of a chicken-egg problem with dap-rs releases currently, though :)

@korken89
Copy link
Collaborator Author

Indeed, it's a bitbang driver :) I got the PIO implementation to work, but did not have time/energy to finalize it.

On using the library, I think it either be fine - if one adds interfaces for moving between input and output it should have all that's necessary.
I've for a while thought about letting dap-rs have a bitbang driver shipped with it to minimize initial implementationen effort.
How do you feel about merging the bitbang lib into dap-rs?

@bugadani
Copy link

Could do, I just drafted it up separately as I wasn't sure if it would be a great fit for dap-rs. I'd have moved it into the probe-rs org eventually, but it might be better to just have one crate.

@korken89
Copy link
Collaborator Author

I feel like it's fine if dap-rs ships a basic bit-bang driver so it can be implemented on new hardware easily :) Looking at your crate I think the merge should be quite painless 🚀

@bugadani
Copy link

I had to draft up an alternative firmware because apparently this one fails to enumerate on Windows. Not sure if you're open to radical rewrites, but if you'd like to see how the basics look with embassy, the repo is here

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

Successfully merging this pull request may close these issues.

3 participants