Hi,
I have recently read libswd code and want to somewhat push the SWD progress.
First modification should be to arm_adi_v5.c and/or adi_v5_jtag/swd.c, so that 
arm_adi_v5.c could be transport independent.

I found both libswd and my SWD patch modify 2 main functions in arm_adi_v5.c, 
which are ahbap_debugport_init and mem_ap_read_buf_u32.

ahbap_debugport_init should obviously be modified to initialize SWD if SWD 
transport is sellected.
And mem_ap_read_buf_u32 should not call adi_jtag_dp_scan, or implement 
mem_ap_read_buf_u32_jtag and mem_ap_read_buf_u32_swd.

2 solutions:
1. In my SWD patch, I add queue_dp_scan to dap->op, and implement 
dap_queue_dp_scan to call dap->op->queue_dp_scan instead of JTAG ones.
And queue_dp_scan is implemented in both jtag_dp_ops and swd_dp_ops.
2. In libswd code, 2 functions are implemented for mem_ap_read_buf_u32, which 
are mem_ap_read_buf_u32_jtag and mem_ap_read_buf_u32_swd.
And they are called in mem_ap_read_buf_u32 according to the transport sellected.

So the result is simple, choose one of the 2 methods above.
Both are OK for me if we can make progress.
And I can prepare the patch if any one want to try.




simonqian.openocd
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to