On Tue, Jul 12, 2011 at 9:38 AM, simon qian <simonqian.open...@gmail.com> wrote: > 4. Add SWD drivers, this should be the libswd. And call SWD drivers in > adi_v5_swd.
Hello Simon! This is almost done. Getting back to this today. When its done, then I get to higher layers. The basic concept is that both jtag and swd can use arm_adi_v5 calls, depending on transport selected. Transport select is done by selecting interface, then transport has its own select() and init() functions - select() prepares everything for use with swd, init() interrogates scan chain. I would highly suggest creating one common openocd context to store all settings in one place, then passing this context to all functions (like in libswd, libftdi, etc) - then we have everything in one place, not global, not replicated in many places. I have already expanded target structire with transport and driver pointer but this is a dirty hack to test functionalities and it should not stay this way on a release. Using oocd_ctx would also allow using multithread use :-) Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development