aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek El-Sherbiny <tarek.el-sherbiny@arm.com>2019-12-20 17:46:47 +0000
committerjimqui01 <54316584+jimqui01@users.noreply.github.com>2020-03-23 14:22:21 +0000
commit9c9dd077b78578969f0a7ec6b5b1fc3280c10c04 (patch)
treeef85983c14f580511252d2c90ef997f3fa77fce1
parent80261b84886ac3d8c6ee6984af7992c6e1842fcb (diff)
fwk: Add the cli debugger entry
The framework calls the debugger start function if the library was included in the build. Change-Id: I76177d376bcd1e46f5bc6f92cec4cc91fcd8cc30 Signed-off-by: Tarek El-Sherbiny <tarek.el-sherbiny@arm.com>
-rw-r--r--framework/include/fwk_cli_dbg.h52
-rw-r--r--framework/src/fwk_module.c3
2 files changed, 55 insertions, 0 deletions
diff --git a/framework/include/fwk_cli_dbg.h b/framework/include/fwk_cli_dbg.h
new file mode 100644
index 00000000..c9e6bc94
--- /dev/null
+++ b/framework/include/fwk_cli_dbg.h
@@ -0,0 +1,52 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef FWK_CLI_DBG_H
+#define FWK_CLI_DBG_H
+
+/*!
+ * \addtogroup GroupLibFramework Framework
+ * @{
+ */
+
+/*!
+ * \defgroup GroupCLI Debugger
+ * @{
+ */
+
+#if defined(BUILD_HAS_DEBUGGER)
+#include <cli.h>
+
+/*!
+ * \brief Define the CLI Debugger function
+ *
+ * \details If the CLI Debugger is not included in the build this macro
+ * will be empty
+ *
+ */
+#define CLI_DEBUGGER() cli_init()
+
+#else
+/*!
+ * \brief Define the CLI Debugger function
+ *
+ * \details If the CLI Debugger is not included in the build this macro
+ * will be empty
+ *
+ */
+#define CLI_DEBUGGER()
+#endif
+
+/*!
+ * @}
+ */
+
+/*!
+ * @}
+ */
+#endif /* FWK_CLI_DBG_H */
diff --git a/framework/src/fwk_module.c b/framework/src/fwk_module.c
index 9fa0fa0a..cf568940 100644
--- a/framework/src/fwk_module.c
+++ b/framework/src/fwk_module.c
@@ -10,6 +10,7 @@
#include <string.h>
#include <fwk_assert.h>
+#include <fwk_cli_dbg.h>
#include <fwk_host.h>
#include <fwk_mm.h>
#include <fwk_status.h>
@@ -383,6 +384,8 @@ int __fwk_module_init(void)
return FWK_E_STATE;
}
+ CLI_DEBUGGER();
+
status = __fwk_thread_init(EVENT_COUNT);
if (status != FWK_SUCCESS)
return status;