Hello! Sorry for cross-posting but this somehow touches both applications. LibSWD is a standalone library that can generate SWD operations, then flush them into device driver. This driver (some function set) is application specific, so it cannot be compiled in into libswd, but rather linked with libswd during application compilation. However libswd then complains about missing driver functions at linking time.
For UrJTAG I have copied sources of libswd into application source tree and passed proper source file with driver functions to compile everything and then link with urjtag binary. This was fine until I included LibSWD as OpenOCD submodule, because now it requires its own empty drivers to compile, and those drivers override openocd's drivers. When I removed template drivers from libswd source tree so it can be linked with drivers already compiled and provided by openocd, there are some unresolved dependencies in libswd.la submodule. This is the only thing that keeps me from running libswd on openocd :-) So the question is - how to create/implement universal driver function set that would allow libswd to compile cleanly, but also allow external applications (such UrJTAG and OpenOCD) to provide its own driver functions. The only sensible way for me seems to be using function pointers that will be set at library initialization by the external function... Maybe there is some more smart approach? Best regads! :-) 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