summaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-11 01:20:49 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 10:57:57 -0800
commit89870c86e7aafd81a5720fcfd30002d24d26b232 (patch)
treec41dcace73f7873ed92ab6bd625871c494a00c3f /src/openocd.c
parentf973320cbb98d661bc0e4ba4fa9939ce8bce2b83 (diff)
downloadopenocd_libswd-89870c86e7aafd81a5720fcfd30002d24d26b232.tar.gz
openocd_libswd-89870c86e7aafd81a5720fcfd30002d24d26b232.tar.bz2
openocd_libswd-89870c86e7aafd81a5720fcfd30002d24d26b232.tar.xz
openocd_libswd-89870c86e7aafd81a5720fcfd30002d24d26b232.zip
add src/hello.c to augment new command tutorial
The hello module provides the 'hello' command, printing a greetings to the command console. It can grow to serve as pedagogical example of services that OpenOCD developers should use: a runnable style guide.
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 2a74a46b..d67ebd59 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -177,6 +177,9 @@ COMMAND_HANDLER(handle_init_command)
command_context_t *global_cmd_ctx;
+/// src/hello.c gives a simple example for writing new command modules
+int hello_register_commands(struct command_context_s *cmd_ctx);
+
/* NB! this fn can be invoked outside this file for non PC hosted builds */
command_context_t *setup_command_handler(void)
{
@@ -188,6 +191,7 @@ command_context_t *setup_command_handler(void)
COMMAND_EXEC, "show OpenOCD version");
/* register subsystem commands */
+ hello_register_commands(cmd_ctx);
server_register_commands(cmd_ctx);
telnet_register_commands(cmd_ctx);
gdb_register_commands(cmd_ctx);