aboutsummaryrefslogtreecommitdiff
path: root/tcl/interface
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2019-01-28 18:53:53 +0100
committerTomas Vanek <vanekt@fbl.cz>2020-01-14 11:40:36 +0000
commit944d3e6771bd34e6495276a154929c2c0baf5e0a (patch)
treee56bb4ff3a63d55b9ddd220e2640db0d2b8e627c /tcl/interface
parenta61ec3c1d73dc0c9915662f7b9383b6f786a5fea (diff)
downloadriscv-openocd-944d3e6771bd34e6495276a154929c2c0baf5e0a.zip
riscv-openocd-944d3e6771bd34e6495276a154929c2c0baf5e0a.tar.gz
riscv-openocd-944d3e6771bd34e6495276a154929c2c0baf5e0a.tar.bz2
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>
Diffstat (limited to 'tcl/interface')
-rw-r--r--tcl/interface/stlink-dap.cfg17
1 files changed, 17 insertions, 0 deletions
diff --git a/tcl/interface/stlink-dap.cfg b/tcl/interface/stlink-dap.cfg
new file mode 100644
index 0000000..f889f74
--- /dev/null
+++ b/tcl/interface/stlink-dap.cfg
@@ -0,0 +1,17 @@
+#
+# STMicroelectronics ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 in-circuit
+# debugger/programmer
+#
+# This new interface driver creates a ST-Link wrapper for ARM-DAP
+# Old ST-LINK/V1 and ST-LINK/V2 pre version V2J24 don't support this method
+#
+
+interface st-link
+st-link vid_pid 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753
+
+# transport select dapdirect_jtag
+# transport select dapdirect_swd
+
+# Optionally specify the serial number of usb device
+# e.g.
+# st-link serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"