openocd/src/jtag
Tomas Vanek 01030fb893 drivers/cmsis-dap: tidy up buffer access
Each one of CMSIS-DAP command handlers was responsible for setting
HID report number, which in case of USB bulk transport was not used
at all. The command had to be filled with 1 byte offset whereas
the response was read without an offset.

Introduce 'command' and 'response' pointers into struct cmsis_dap.
Use them for filling the command and read the response respectively.
CMSIS-DAP command parameter are now at positions as documented in
https://arm-software.github.io/CMSIS_5/DAP/html/group__DAP__Commands__gr.html
Adjust buffer allocation for HID and USB bulk transports.

While on it, use h_u32_to_le() and h_u16_to_le() instead of per-byte
writes.

Change-Id: Ib0808d6826ba0e254c1007ace8b743405536332a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/6120
Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2021-04-10 20:54:43 +01:00
..
aice openocd: drop dependency from libusb0 2021-04-05 23:25:34 +01:00
drivers drivers/cmsis-dap: tidy up buffer access 2021-04-10 20:54:43 +01:00
hla stlink: support of ST-LINK TCP server using stlink-dap and hla 2021-03-10 21:29:06 +00:00
Makefile.am jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
adapter.c jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
commands.c Fix debug prints when loading to flash 2020-09-05 16:48:08 +01:00
commands.h jtag: make cmd_queue_scan_field_clone public 2018-10-16 11:58:17 +01:00
core.c jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
driver.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
interface.c coding style: prototype of functions with no parameters 2020-05-09 14:39:59 +01:00
interface.h armv7m_trace: get rid of the old tpiu code 2021-03-10 21:34:04 +00:00
interfaces.c jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
interfaces.h jtag: remove unused function adapter_driver_modules_load() 2020-05-02 15:41:21 +01:00
jtag.h jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
minidriver.h jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
startup.tcl zy1000: drop the code, deprecated in v0.10.0 2021-03-19 21:55:50 +00:00
swd.h swd: get rid of jtag queue to assert/deassert srst 2020-01-14 11:15:12 +00:00
swim.c swim: add new transport 2020-05-24 21:32:05 +01:00
swim.h swim: fix adapter speed handling 2020-05-24 21:31:21 +01:00
tcl.c jtag/tcl: fix memory leak in error return 2020-11-04 17:35:25 +00:00
tcl.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00