aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiviu Ionescu <ilg@livius.net>2018-06-12 23:54:41 +0300
committerLiviu Ionescu <ilg@livius.net>2018-06-12 23:54:41 +0300
commit8022a315a60d883a12126b6ee2848261ed74f4df (patch)
tree04a2fbe7d56713ad5ddd507684cdbb68a50e3c6e
parent08a814686d16dc51238be83db0d8a4beb4a5a966 (diff)
downloadriscv-openocd-8022a315a60d883a12126b6ee2848261ed74f4df.zip
riscv-openocd-8022a315a60d883a12126b6ee2848261ed74f4df.tar.gz
riscv-openocd-8022a315a60d883a12126b6ee2848261ed74f4df.tar.bz2
target/riscv: explain why `arm` commands are used
-rw-r--r--src/target/riscv/riscv.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 98ddc04..576a4c7 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -1529,6 +1529,19 @@ extern __COMMAND_HANDLER(handle_common_semihosting_fileio_command);
extern __COMMAND_HANDLER(handle_common_semihosting_resumable_exit_command);
extern __COMMAND_HANDLER(handle_common_semihosting_cmdline);
+/*
+ * To be noted that RISC-V targets use the same semihosting commands as
+ * ARM targets.
+ *
+ * The main reason is compatibility with existing tools. For example the
+ * Eclipse OpenOCD/SEGGER J-Link/QEMU plug-ins have several widgets to
+ * configure semihosting, which generate commands like `arm semihosting
+ * enable`.
+ * A secondary reason is the fact that the protocol used is exactly the
+ * one specified by ARM. If RISC-V will ever define its own semihosting
+ * protocol, then a command like `riscv semihosting enable` will make
+ * sense, but for now all semihosting commands are prefixed with `arm`.
+ */
static const struct command_registration arm_exec_command_handlers[] = {
{
"semihosting",