diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2019-01-28 18:53:53 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2020-01-14 11:40:36 +0000 |
commit | 944d3e6771bd34e6495276a154929c2c0baf5e0a (patch) | |
tree | e56bb4ff3a63d55b9ddd220e2640db0d2b8e627c /doc/openocd.texi | |
parent | a61ec3c1d73dc0c9915662f7b9383b6f786a5fea (diff) | |
download | riscv-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 'doc/openocd.texi')
-rw-r--r-- | doc/openocd.texi | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi index 5da0f80..b793252 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3096,6 +3096,29 @@ passed as is to the underlying adapter layout handler. @end deffn @end deffn +@anchor{st_link_dap_interface} +@deffn {Interface Driver} {st-link} +This is a driver that supports STMicroelectronics adapters ST-LINK/V2 +(from firmware V2J24) and STLINK-V3, thanks to a new API that provides +directly access the arm ADIv5 DAP. + +The new API provide access to multiple AP on the same DAP, but the +maximum number of the AP port is limited by the specific firmware version +(e.g. firmware V2J29 has 3 as maximum AP number, while V2J32 has 8). +An error is returned for any AP number above the maximum allowed value. + +@emph{Note:} Either these same adapters and their older versions are +also supported by @ref{hla_interface, the hla interface driver}. + +@deffn {Config Command} {st-link serial} serial +Specifies the serial number of the adapter. +@end deffn + +@deffn {Config Command} {st-link vid_pid} [vid pid]+ +Pairs of vendor IDs and product IDs of the device. +@end deffn +@end deffn + @deffn {Interface Driver} {opendous} opendous-jtag is a freely programmable USB adapter. @end deffn @@ -3204,9 +3227,10 @@ JTAG supports both debugging and boundary scan testing. Flash programming support is built on top of debug support. JTAG transport is selected with the command @command{transport select -jtag}. Unless your adapter uses @ref{hla_interface,the hla interface -driver}, in which case the command is @command{transport select -hla_jtag}. +jtag}. Unless your adapter uses either @ref{hla_interface,the hla interface +driver} (in which case the command is @command{transport select hla_jtag}) +or @ref{st_link_dap_interface,the st-link interface driver} (in which case +the command is @command{transport select dapdirect_jtag}). @subsection SWD Transport @cindex SWD @@ -3219,9 +3243,10 @@ Flash programming support is built on top of debug support. (Some processors support both JTAG and SWD.) SWD transport is selected with the command @command{transport select -swd}. Unless your adapter uses @ref{hla_interface,the hla interface -driver}, in which case the command is @command{transport select -hla_swd}. +swd}. Unless your adapter uses either @ref{hla_interface,the hla interface +driver} (in which case the command is @command{transport select hla_swd}) +or @ref{st_link_dap_interface,the st-link interface driver} (in which case +the command is @command{transport select dapdirect_swd}). @deffn Command {swd newdap} ... Declares a single DAP which uses SWD transport. |