Hello world :-)

The work on SWD is almost ready. You can watch the code at [1]. This
is the source tree I am currently working on with KT-LINK interface
and STM32Primer{1,2}. After some fixes and verification its in a few
days it should be merged with OpenOCD source tree. You can already
test, familiarize with changes and give your feedback :-)

There has been two aproached made during my work. One to reorganize
all of the source code and then implementing the SWD. No need to teel
that this failed because it took too much time with no result. So I
have decided to integrate libswd with openocd with non-invasive manner
to make proof-of-concept and then fix the project organization if
possible. Therefore everything should work and look as before, except
there are some new features available :-)

The list of changes is fairly long, but the essence is following:
-SWD is implemented using transport mechanism and libswd
-target is using existing arm_adi_v5 infrastructure (not yet verified)
-ft2232_swd driver was created. it is based on existing jtag_interface
using layouts for SWD buffers initialization. Adding new drivers
should be trivial then.
-interface api was extended with bitbang() and transfer() functions
allowing manual signal driving (bitbang) and bistream transfer from/to
the bitstream array (transfer) - those two functions will allow
virtually all other protocol implementation being non dependent on
jtag.
-interface api was extended with signal list that can be driven manually
-tcl was extended with interface_signal and bitbang command to handle
manual signal driving
-probably something more, I have tried to be as backward-compatibile
and non-invasible as possible

Detailed project documentation on creating free and open SWD
implementation is at [2].  The libswd was already tested on UrJTAG so
you can experiment on your own. I am sure that its internal
organization if elegant and functional enough to create any other
serial transport necessary in future (i.e. I2C, SPI, 1WIRE, ...). As
for now the functionality of libswd ends on dp/ap read/write and
below, the upper layers should be handled by target/arm_adi_v5 that
existed already in openocd for jtag transport.

Best regards! :-)
Tomek

[1] http://repo.or.cz/w/openocd/libswd.git
[2] http://stm32primer2swd.sf.net/

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to