stlink: simplify the use of deprecated HLA transport

Commit 34ec5536c0 ("stlink: deprecate HLA support") makes hard
to use the still functional HLA transport with the stlink listed
in board config files.
Now that the prefixes 'hla_' and 'dapdirect_' has been dropped
from the transport name, allow overriding the transport by using
the 'stlink-hla' script in front of the board file, e.g.:

	openocd -f interface/stlink-hla.cfg -f board/st_nucleo_f4.cfg

Revert the documentation changes of the change above.
Improve the documentation to explain how to use the compatibility
HLA mode.
Improve the error message in stlink driver to guide the user to
update the stlink firmware and to use the compatibility HLA mode.

Change-Id: I5d0bc7954511692cebe024bda2aaa72767b97681
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8679
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2024-12-23 20:20:08 +01:00
parent ad53fe659b
commit 420f637cab
3 changed files with 31 additions and 3 deletions

View File

@@ -5143,7 +5143,12 @@ static int stlink_dap_init(void)
if ((mode != STLINK_MODE_DEBUG_SWIM) &&
!(stlink_dap_handle->version.flags & STLINK_F_HAS_DAP_REG)) {
LOG_ERROR("ST-Link version does not support DAP direct transport");
LOG_ERROR("The firmware in the ST-Link adapter only supports deprecated HLA.");
LOG_ERROR("Please consider updating the ST-Link firmware with a version");
LOG_ERROR("newer that V2J24 (2015), available for downloading on ST website:");
LOG_ERROR(" https://www.st.com/en/development-tools/stsw-link007.html");
LOG_ERROR("In mean time, you can re-run OpenOCD for ST-Link HLA as:");
LOG_ERROR(" openocd -f interface/stlink-hla.cfg ...");
return ERROR_FAIL;
}
return ERROR_OK;