-
Notifications
You must be signed in to change notification settings - Fork 200
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
Can we get SWD support? #69
Comments
There is already a (preview quality) SWD applet! There's no actual gdbserver (or flasher) support right now mostly because I was going to integrate with @azonenberg's jtaghal, and jtaghal isn't evolving quite quickly enough. There will likely be native gdbserver support, the same as for MIPS EJTAG applet. |
You might be able to plug it into https://github.com/orbcode/orbuculum |
That's mostly pointless, it's just more C code I cannot actually distribute with Glasgow itself... Really, the protocol is not very complex. |
Update: I will not even try to rely on jtaghal, Glasgow-native gdbserver is superior in every way. |
I have done some work on SWD. Please let me know how I can help realize the SWD support. |
There's a prototype of an SWD applet. What's missing is the actual debugger code. Currently the bottleneck is maintainer time / review bandwidth so there is little you can do to make things faster. |
I have been picking at SWIM+stm8, programming only so far. |
We should probably have a different issue for SWIM, as far as I remember it's a completely different protocol. |
Certainly! I have a couple more branches from master for other protocols, but they are pretty gross atm. I'll create merge rqs when that have at least some utility. |
Is it worth trying to write a driver for support with openocd? That's something I've done in the past and would be willing to work on. |
Does openocd have something like the JTAG bitbang interface but for SWD? Anything that works through a socket rather than through libusb would work. |
I believe so - I can start experimenting with this and report back if I find something. |
We can quite easily add a |
i never realized there was a |
As fast as the native JTAG applet allows, which is currently 6 MHz due to a temporary limitation while we're migrating from Migen to nMigen. |
in that case that |
No idea if OpenOCD can even do the equivalent of that. @wrongbaud may be investigating that; you could take a look too if you want things earlier. |
I have every intention of helping, especially on matters that are especially useful to me; I will look into it, though i am not very familiar with the inner workings of openocd. Also my glasgow is just a parts bin waiting to be assembled so i can't test anything. |
So, i looked around the OpenOCD code. |
Correct. |
So, after opening the ticket there was some progress, one of the patches was rebased, but it needs to be tested, i cant do it myself, because my glasgow isn't ready, and i don't know how i could do it any other way. If someone could look into this it would be great, i believe it should work. Here's the ticket: |
I have a working Glasgow revC1 and would like to help, but I haven't used OpenOCD for some time. So what exactly should I do to test? Take a recent OpenOCD and apply http://openocd.zylin.com/#/c/4205/ I have for example a STM32F072 and would hook up it's SWCLK and SWDIO to the Glasgow. |
I think you just need to add the new commands to
stm32f0x config.
Should look something like this:
|
I don't think that would work, |
Hum, okay. Then we can just copy it to a new applet and apply the required modifications. |
I believe connecting to a target using SWD and that driver should be enough to approve the changes. I don't think we actually need to change anything in the applet. |
Well, you should need to test if the new commands actually work, no? |
hm, i don't think i understood quite right how the applet worked, i guess you're right |
We now have |
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
The `SimulationPort` class is an implementation of the proposed RFC GlasgowEmbedded#69 (amaranth-lang/amaranth#1417, amaranth-lang/rfcs#69). The `SimulationPlatform` class is a temporary workaround for the lack of built-in knowledge of `SimulationPort` by `io.{Buffer,FFBuffer}`. In conjunction with the `PortGroup` class, these classes enable testing I/O gateware. Eventually they should be integrated with the Glasgow framework (`access.simulation`), but it is not done at the moment.
Is that possible while only using FOSS?
The text was updated successfully, but these errors were encountered: