On Fri, Jun 06, 2014 at 09:39:23PM +0300, Teemu Hakala wrote: > On 6.6.2014, at 17:07, Atte Peltomaki <atte.peltomaki@xxxxxx> wrote: > > Let me know if you have comments, eg. if I'm trying something > > stupid/impossible. A lot of this is completely new to me, so please bear > > with me :) > > Ivan and Qinglai have some working SWD code, but it is for a Cortex M0 > and [Gdb remote stub]. Might be of help or source of inspiration or just > a nuisance to bother with. Dunno if OpenOCD is using any primitives > similar to Gdb. The GDB stub code uses some CMSIS-DAP code from ARM. I managed to find a v0.01 beta version of the CMSIS-DAP spec and code from ARM website. In any case, it's Apache licensed and thus incompatible with the much more free and righteous GPLv2 that OpenOCD uses. So, they also have their own SWD implementation, AFAIK taken from LibSWD. > Using the Basic FT232R is of course not mandatory, but we happen to have > those around and they’re pretty cheap. It should be perfectly suitable for the job and that's the only thing I have anyway. Of course I could just grab an existing JTAG dongle that supports SWD and it'd be plug-and-play, but first and foremost this is an interesting learning experience for me ;) > Anyway it seems that we might want to consider what physical programming- > debug-interfaces we want to have on our hardware. I’m starting to think > the next generation idea of supporting JTAG is good and other interfaces > can be dumped. Now we just need you and other guys to make the programming > software to work :) I agree, lack of JTAG on the Cortex M0 is a problem as it seems to be much better supported than SWD (which also is not very well exposed). I believe all ARMs that support JTAG also support SWD, so using a reduced pin count debugging interface is still possible. Personally I'd like to see a CMSIS-DAP compatible USB interface directly on the next-gen board. This would get us free OpenOCD support, among other things. Although, I'm slightly concerned of the specification being v0.01 beta.. > : https://bitbucket.org/jigsaw_echo/m0dbg/src If I ever get OpenOCD + Sparkfun Basic working together, I'll need to read through this more carefully, thanks.  http://sourceforge.net/apps/trac/libswd -- Atte Peltomäki atte.peltomaki@xxxxxx <> http://kameli.org "Your effort to remain what you are is what limits you"