From 23fc7e9c960a6e462a21750fb31b99ebe8e11099 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sat, 25 Oct 2025 16:15:03 +0200 Subject: [PATCH] target: semihosting: refresh URI to semihosting documentation Some link if not anymore accessible. Replace them with current one and add a backup in case one gets not accessible anymore. Change-Id: Iffca714555e94e5322a5daac1ea756e36bbd3a8f Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/9188 Tested-by: jenkins --- doc/openocd.texi | 7 ++++--- src/target/arm_semihosting.c | 6 +++++- src/target/semihosting_common.c | 6 ++++-- src/target/semihosting_common.h | 6 ++++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/doc/openocd.texi b/doc/openocd.texi index 63d07533e..57f8703ad 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -1193,9 +1193,10 @@ monitor mode debug, only "halt mode" debug.} @cindex ARM semihosting When linked with a special runtime library provided with many toolchains@footnote{See chapter 8 "Semihosting" in -@uref{http://infocenter.arm.com/help/topic/com.arm.doc.dui0203i/DUI0203I_rvct_developer_guide.pdf, -ARM DUI 0203I}, the "RealView Compilation Tools Developer Guide". -The CodeSourcery EABI toolchain also includes a semihosting library.}, +@uref{https://developer.arm.com/documentation/dui0203/latest/semihosting, +ARM DUI 0203}. +A semihosting library if available in newlib/libgloss, in U-Boot, +in the CodeSourcery EABI toolchain, and others.}, your target code can use I/O facilities on the debug host. That library provides a small set of system calls which are handled by OpenOCD. It can let the debugger provide your system console and a file system, diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c index a7c47bf41..ea5f756d6 100644 --- a/src/target/arm_semihosting.c +++ b/src/target/arm_semihosting.c @@ -22,7 +22,11 @@ * facilities on the host computer. The target application must be linked * against a library that forwards operation requests by using the SVC * instruction trapped at the Supervisor Call vector by the debugger. - * Details can be found in chapter 8 of DUI0203I_rvct_developer_guide.pdf + * Details can be found in + * "Semihosting for AArch32 and AArch64, 2025Q1" + * https://github.com/ARM-software/abi-aa/releases/download/2025Q1/semihosting.pdf + * and in + * https://developer.arm.com/documentation/dui0203/latest/semihosting * from ARM Ltd. */ diff --git a/src/target/semihosting_common.c b/src/target/semihosting_common.c index 5f8ab1082..ef96f064e 100644 --- a/src/target/semihosting_common.c +++ b/src/target/semihosting_common.c @@ -24,8 +24,10 @@ * instruction trapped by the debugger. * * Details can be found in - * "Semihosting for AArch32 and AArch64, Release 2.0" - * https://static.docs.arm.com/100863/0200/semihosting.pdf + * "Semihosting for AArch32 and AArch64, 2025Q1" + * https://github.com/ARM-software/abi-aa/releases/download/2025Q1/semihosting.pdf + * and in + * https://developer.arm.com/documentation/dui0203/latest/semihosting * from ARM Ltd. */ diff --git a/src/target/semihosting_common.h b/src/target/semihosting_common.h index 1821ca4e2..ecf38d62a 100644 --- a/src/target/semihosting_common.h +++ b/src/target/semihosting_common.h @@ -19,8 +19,10 @@ /* * According to: - * "Semihosting for AArch32 and AArch64, Release 2.0" - * https://static.docs.arm.com/100863/0200/semihosting.pdf + * "Semihosting for AArch32 and AArch64, 2025Q1" + * https://github.com/ARM-software/abi-aa/releases/download/2025Q1/semihosting.pdf + * and to: + * https://developer.arm.com/documentation/dui0203/latest/semihosting/about-semihosting/the-semihosting-interface * from ARM Ltd. * * The available semihosting operation numbers passed in R0 are allocated