aboutsummaryrefslogtreecommitdiff
path: root/debugger/include/cli.h
diff options
context:
space:
mode:
authorAnthony Roberts <anthony.roberts@arm.com>2020-03-09 15:13:03 +0000
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-03-23 17:14:30 +0000
commitf15afcef27dc63433985a2c10e5ec5981ffe55ca (patch)
treebdc2ab70faefa601075d5edf18ddc044c1fc689a /debugger/include/cli.h
parentaf0b6a3273407c8d59491cf0b4584bc18cd29c50 (diff)
dbg: Replace checkpoint functionality with empty calls when flag is off
This allows CLI functions such as checkpoint() to be left in the code without having them behind an ifdef. Change-Id: I8680ef5cdd0ae126b41a059ca6219dd4f1674f92 Signed-off-by: Anthony Roberts <anthony.roberts@arm.com>
Diffstat (limited to 'debugger/include/cli.h')
-rw-r--r--debugger/include/cli.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/debugger/include/cli.h b/debugger/include/cli.h
index f169bbcd..ef34d323 100644
--- a/debugger/include/cli.h
+++ b/debugger/include/cli.h
@@ -272,6 +272,8 @@ uint32_t cli_getline(
*/
int32_t cli_strncmp(const char *s1, const char *s2, uint32_t limit);
+#ifdef BUILD_HAS_DEBUGGER
+
/*!
* \brief Register a new CLI command at run time
*
@@ -282,4 +284,21 @@ int32_t cli_strncmp(const char *s1, const char *s2, uint32_t limit);
*/
int cli_command_register(cli_command_st new_cmd);
+#else
+
+/*!
+ * \brief Register a new CLI command at run time
+ *
+ * \param new_cmd The new command to register.
+ *
+ * \retval CLI_SUCCESS Operation succeeded.
+ * \retval CLI_ERR_MEM Not enough memory.
+ */
+#define cli_command_register(new_cmd) \
+ __extension__({ \
+ (void)new_cmd; \
+ FWK_SUCCESS; \
+ })
+#endif
+
#endif /* _CLI_H_ */