summaryrefslogtreecommitdiff
path: root/libcpu/arm/cortex-m3
diff options
context:
space:
mode:
authorcharlown <[email protected]>2021-09-02 22:39:34 +0800
committercharlown <[email protected]>2021-09-02 22:39:34 +0800
commit8abbe89cee0099f3ec727de53baf20f7945434e9 (patch)
treea9d8b24c6f6bcb927963757846c21d9926797c43 /libcpu/arm/cortex-m3
parent2e74dd8e2d641f581ef733a050392d161d3643d0 (diff)
parentdca7dcb42a44249abbe6c36ce2a69355e60d1f79 (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'libcpu/arm/cortex-m3')
-rw-r--r--libcpu/arm/cortex-m3/cpuport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcpu/arm/cortex-m3/cpuport.c b/libcpu/arm/cortex-m3/cpuport.c
index 19c33bd7c9..d376f00424 100644
--- a/libcpu/arm/cortex-m3/cpuport.c
+++ b/libcpu/arm/cortex-m3/cpuport.c
@@ -291,7 +291,9 @@ struct exception_info
*/
void rt_hw_hard_fault_exception(struct exception_info * exception_info)
{
+#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
extern long list_thread(void);
+#endif
struct stack_frame* context = &exception_info->stack_frame;
if (rt_exception_hook != RT_NULL)
@@ -325,9 +327,9 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
{
rt_kprintf("hard fault on thread: %s\r\n\r\n", rt_thread_self()->name);
-#ifdef RT_USING_FINSH
+#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
list_thread();
-#endif /* RT_USING_FINSH */
+#endif
}
else
{