Hello! While I am working on integration libswd with openocd, it turned out that OpenOCD needs some restructurization in source tree and API standarization, so I have made some changes in my local repository [1]. Please take a look and let me know if my proposition is okay so I can move forward and make it work :-) Please sent constructive critics and what should be done better / what is yet to be done, as I will have to make all TODOS happen (or at least many of them). Also please let me know if actual swd infrastructure worked for anyone as I dont want to break things with my changes.
The changes are as follows: -directory structure of "src" should represent logical structure of a program construct (ie. interface, transport, tap/dap, flash, rtos, tcl, pld, ...) -separate interface and transport part from "jtag" into different folders (jtag is split into transport and interface) -mark all transport specific filenames with transport name prefix (ie. transport/jtag_core.c transport/jtag_commands.c transport/swd_core.c ...) -make nomenclature consistent (ie. we use "interface" everywhere instead "dongle" "adapter" "cable" ...) -drivers will be only appended with eventual functionality increase (such as swd) to maintain backward compatibility and existing code reuse - do we need to split driver files into transport specific (i dont think so)? What I did not find in the manual is the API for each layer/module - what is the API for driver/interface, transport, target, flash, etc. As I understood to make debug and flashing work I just need to implement reset, halt, run, mw, mr? This will be a standard set of commands to execute depending on target and transport? So I should split SWD api into serial-queue and dap-commands? If so, what I have created for libswd is already great mechanism to reuse in any other serial-transport :-) Thank you and have great weekend! :-) Tomek [1] http://files.tomek.cedro.info/bkp/openocd_git-20110416.tar.bz2 -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development