riscv-openocd/tcl
Antonio Borneo 944d3e6771 stlink: add DAP direct driver
STLINK-V3 and the new firmware V2J24 for ST-LINK/V2 provide API
to directly access the DAP registers.
This mode permits to use the native target in cortex_m.c, with no
need to override it with the target in hla_target.c.
Other advantages wrt HLA are: support for Cortex-A cores, support
for SoC multi-core and/or multi AP, support for OpenOCD commands
"dap" thus including control of CSW.
This obsoletes the existing HLA driver for ST-Link, that should
anyway be kept for those cases where it's not possible to update
the ST-Link firmware.

This commit introduces the minimal implementation for direct DAP
access. The implementation is much slower than the HLA because
every memory transfer requires several USB packets. Further
commits will close the performance gap.
The whole ST-Link driver is compiled under BUILD_HLADAPTER, to
remove the need to split the driver between the two modes. This
has to be reworked, but it's quite invasive!
A new interface file stlink-dap.cfg is added and should be used
in place of stlink.cfg to enable the DAP mode.
Documentation is updated and reports limitation on the maximum AP
number that can be accessed by ST-Link for some firmware already
tested.

Change-Id: I932ffe16bc81d00b1fe489e2944fda13470cce9b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4904
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-01-14 11:40:36 +00:00
..
board tcl: update scripts after "jtag_reset" got deprecated 2020-01-02 21:24:45 +00:00
chip Fix a typo. 2013-07-07 13:00:59 +00:00
cpld xilinx-xc7: Add additional IDCODEs. 2018-10-27 14:37:43 +01:00
cpu/arm Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
fpga fpga/altera-10m50: add all device id 2018-07-31 18:56:14 +01:00
interface stlink: add DAP direct driver 2020-01-14 11:40:36 +00:00
target tcl: update scripts after "jtag_reset" got deprecated 2020-01-02 21:24:45 +00:00
test tcl: update scripts after "jtag_reset" got deprecated 2020-01-02 21:24:45 +00:00
tools tcl/board: add Linksys WAG200G config 2016-10-17 09:16:33 +01:00
bitsbytes.tcl TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00
mem_helper.tcl mem_helper: add mrh command 2018-12-06 09:38:41 +00:00
memory.tcl Fix wrong end-of-region calculation 2019-10-18 09:19:09 +01:00
mmr_helpers.tcl TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00