Hi Andreas, Thanks for clarifying a great many things.
I did a bit more reading of the source. I hadn't realised that both JTAG and SWD DAP ops go via dap_ops -> cmsis_dap_transport -> jtag_interface.swd -> cmsis_dap_swd_driver to generate the USBHID commands. I actually thought JTAG/CMSIS-DAP hadn't been implemented in openocd yet, my mistake. Now I see cmsis_dap_swd_driver is used here not as a way of implementing SWD operations, but just a way of implementating DAP operations in a way that the DAP transport can access them. Does that sound right? Exploring possibilities, I think we could remove the cmsis_dap_swd_driver instance and move the read_red/write_reg stuff up into the transport. However there's got to be a convenient interface between them: - If we do the actual USB operations as part of the jtag_interface, we need a way for the transport to queue generic CMSIS-DAP commands on the jtag_interface. Maybe a custom command that's just raw CMSIS-DAP bytes? Or a dap_driver to the jtag_interface, similar to swd_driver? - Maybe it would be possible to do the USB operations on the transport side? This doesn't gel with the description of a transport as relating only to the on-wire signalling not the messaging protcol. To work the jtag_interface would need a way to queue CMSIS-DAP commands on the transport for custom commands, adapter_khz, etc. - Or alternatively we leave it as it is, but maybe label the cmsis_dap_swd_driver instance more clearly to make it clearer that it's not an SWD-only interface, but just a convenient interface for any DAP register operations? I'd be happy to put time towards exploring any of these though (or some fourth choice) if it's helpful? Cheers, Angus ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck® Code Sight™ - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
