This change aims to address a compatibility issue with recent OpenOCD
pre-release and what is planned in OpenOCD v1.0.0 planned end of 2025.
OpenOCD commit 34ec5536c0ba ("stlink: deprecate HLA support") [1] was
merged in December 2024 after release tag 0.12.0 and before coming
release v1.0.0. It deprecates the legacy HLA driver interface (also
called transport) in favor to the generic DAP interface that is
supported by ST-Link firmware v2.1 and later.
Since the referred commit, OpenOCD config script must source a new
config file (interface/stlink-hla.cfg) in order to select hla_swd
transport. This change breaks many ST-Link based OpenOCD config files
of Zephyr. Alternatively, already existing interface/stlink-dap.cfg
can be used with dapdirect_swd interface to use direct DAP/SWD interface.
To overcome the issue and support older and newer OpenOCD releases,
change the OpenCOD configuration files for non-ST boards that use
ST-Link to interface target debug and/or flash programming support.
Use the already existing are still maintained interface/stlink-dap.cfg
config script file together with dapdirect_swd transport interface.
One may potentially face connection issues if using both a recent
OpenOCD firmware and using a ST-Link adapter that embeds a ST-Link
firmware v1.x. This may happen with old ST-Link adapter devices.
ST-Link firmware v1.0 do not support DAP direct SWD interface. In such
a case, either upgrade the ST-Link firmware (refer to STM32CubeProgrammer
guide), or revert the change made here to explicitly use hla_swd
transport based on stlink-hla.cfg.
Link: 34ec5536c0/ [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>