Skip to content

Commit 34ec553

Browse files
committed
stlink: deprecate HLA support
The STLink API that supports dap-direct is available from STLink firmware v2j24, published in early 2015. We can reasonably expect that any old STLink still in use today has got at least one firmware update during the last 10 years. Most of the board files in upstream OpenOCD still use the STLink in HLA mode. This limits the test coverage of the dap-direct code, which was introduced in OpenOCD v0.11.0. - Rename interface/stlink.cfg as interface/stlink-hla.cfg to still provide support for HLA, adding a deprecated message. - Rename interface/stlink-dap.cfg as interface/stlink.cfg to make dap-direct the default trasport. - Add a redirect file interface/stlink-dap.cfg for users that have out-of-tree custom board files. - Update all the board files to the new setup. - Remove STLink HLA mentions from the documentation, while adding a reference to interface/stlink-hla.cfg Checkpatch-ignore: LONG_LINE Change-Id: I99366bb03cd3b83f8f408514e657f30e59813063 Signed-off-by: Antonio Borneo <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8523 Tested-by: jenkins Reviewed-by: Andrzej Sierżęga <[email protected]>
1 parent 3ce0962 commit 34ec553

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+94
-92
lines changed

doc/openocd.texi

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ This command is only available if your libusb1 is at least version 1.0.16.
24892489
Specifies the @var{serial_string} of the adapter to use.
24902490
If this command is not specified, serial strings are not checked.
24912491
Only the following adapter drivers use the serial string from this command:
2492-
arm-jtag-ew, cmsis_dap, esp_usb_jtag, ft232r, ftdi, hla (stlink, ti-icdi), jlink, kitprog, opendus,
2492+
arm-jtag-ew, cmsis_dap, esp_usb_jtag, ft232r, ftdi, hla (ti-icdi), jlink, kitprog, opendus,
24932493
openjtag, osbdm, presto, rlink, st-link, usb_blaster (ublast2), usbprog, vsllink, xds110.
24942494
@end deffn
24952495

@@ -3206,23 +3206,14 @@ version reported is V2.J21.S4.
32063206
Currently Not Supported.
32073207
@end deffn
32083208

3209-
@deffn {Config Command} {hla layout} (@option{stlink}|@option{icdi}|@option{nulink})
3209+
@deffn {Config Command} {hla layout} (@option{icdi}|@option{nulink})
32103210
Specifies the adapter layout to use.
32113211
@end deffn
32123212

32133213
@deffn {Config Command} {hla vid_pid} [vid pid]+
32143214
Pairs of vendor IDs and product IDs of the device.
32153215
@end deffn
32163216

3217-
@deffn {Config Command} {hla stlink_backend} (usb | tcp [port])
3218-
@emph{ST-Link only:} Choose between 'exclusive' USB communication (the default backend) or
3219-
'shared' mode using ST-Link TCP server (the default port is 7184).
3220-
3221-
@emph{Note:} ST-Link TCP server is a binary application provided by ST
3222-
available from @url{https://www.st.com/en/development-tools/st-link-server.html,
3223-
ST-LINK server software module}.
3224-
@end deffn
3225-
32263217
@deffn {Command} {hla command} command
32273218
Execute a custom adapter-specific command. The @var{command} string is
32283219
passed as is to the underlying adapter layout handler.
@@ -3232,9 +3223,12 @@ passed as is to the underlying adapter layout handler.
32323223
@anchor{st_link_dap_interface}
32333224
@deffn {Interface Driver} {st-link}
32343225
This is a driver that supports STMicroelectronics adapters ST-LINK/V2
3235-
(from firmware V2J24), STLINK-V3 and STLINK-V3PWR, thanks to a new API that provides
3226+
(from 2015 firmware V2J24), STLINK-V3 and STLINK-V3PWR, thanks to a new API that provides
32363227
directly access the arm ADIv5 DAP.
32373228

3229+
The older API that requires HLA transport is deprecated and will be dropped
3230+
from OpenOCD. In mean time it's still available by using @file{interface/stlink-hla.cfg}.
3231+
32383232
The new API provide access to multiple AP on the same DAP, but the
32393233
maximum number of the AP port is limited by the specific firmware version
32403234
(e.g. firmware V2J29 has 3 as maximum AP number, while V2J32 has 8).
@@ -10677,7 +10671,7 @@ baud with our custom divisor to get 12MHz)
1067710671
@item OpenOCD invocation line:
1067810672
@example
1067910673
openocd -f interface/stlink.cfg \
10680-
-c "transport select hla_swd" \
10674+
-c "transport select dapdirect_swd" \
1068110675
-f target/stm32l1.cfg \
1068210676
-c "stm32l1.tpiu configure -protocol uart" \
1068310677
-c "stm32l1.tpiu configure -traceclk 24000000 -pin-freq 12000000" \

tcl/board/st_b-l475e-iot01a.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This is for using the onboard STLINK
77
source [find interface/stlink.cfg]
88

9-
transport select hla_swd
9+
transport select dapdirect_swd
1010

1111
# increase working area to 96KB
1212
set WORKAREASIZE 0x18000

tcl/board/st_nucleo_8l152r8.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This is a ST NUCLEO 8L152R8 board with a single STM8L152R8T6 chip.
44
# http://www.st.com/en/evaluation-tools/nucleo-8l152r8.html
55

6-
source [find interface/stlink-dap.cfg]
6+
source [find interface/stlink.cfg]
77

88
transport select swim
99

tcl/board/st_nucleo_8s208rb.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This is a ST NUCLEO 8S208RB board with a single STM8S208RBT6 chip.
44
# https://www.st.com/en/evaluation-tools/nucleo-8s208rb.html
55

6-
source [find interface/stlink-dap.cfg]
6+
source [find interface/stlink.cfg]
77

88
transport select swim
99

tcl/board/st_nucleo_f0.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
source [find interface/stlink.cfg]
1212

13-
transport select hla_swd
13+
transport select dapdirect_swd
1414

1515
source [find target/stm32f0x.cfg]
1616

tcl/board/st_nucleo_f103rb.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
source [find interface/stlink.cfg]
77

8-
transport select hla_swd
8+
transport select dapdirect_swd
99

1010
source [find target/stm32f1x.cfg]
1111

tcl/board/st_nucleo_f3.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
source [find interface/stlink.cfg]
77

8-
transport select hla_swd
8+
transport select dapdirect_swd
99

1010
source [find target/stm32f3x.cfg]
1111

tcl/board/st_nucleo_f4.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
source [find interface/stlink.cfg]
1010

11-
transport select hla_swd
11+
transport select dapdirect_swd
1212

1313
source [find target/stm32f4x.cfg]
1414

tcl/board/st_nucleo_f7.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
source [find interface/stlink.cfg]
77

8-
transport select hla_swd
8+
transport select dapdirect_swd
99

1010
source [find target/stm32f7x.cfg]
1111

tcl/board/st_nucleo_g0.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
source [find interface/stlink.cfg]
1414

15-
transport select hla_swd
15+
transport select dapdirect_swd
1616

1717
source [find target/stm32g0x.cfg]
1818

0 commit comments

Comments
 (0)