From 8363ccb913dbd0c85f4ce16bfe437ac69469b963 Mon Sep 17 00:00:00 2001 From: armink Date: Sat, 4 Nov 2017 22:24:27 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=BA=9F=E5=BC=83=E7=9A=84=20=5F=5Fget=5FSP=20=E4=B8=BA=20cmb?= =?UTF-8?q?=5Fget=5Fsp=20=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- README.md | 2 +- demos/os/rtthread/stm32f4xx/app/src/app_task.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c25924c..01b0efc 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ size_t cm_backtrace_call_stack(uint32_t *buffer, size_t size, uint32_t sp) uint32_t call_stack[16] = {0}; size_t i, depth = 0; /* 获取当前环境下的函数调用栈,每个元素将会以 32 位地址形式存储, depth 为函数调用栈实际深度 */ -depth = cm_backtrace_call_stack(call_stack, sizeof(call_stack), __get_SP()); +depth = cm_backtrace_call_stack(call_stack, sizeof(call_stack), cmb_get_sp()); /* 输出当前函数调用栈信息 * 注意:查看函数名称及具体行号时,需要使用 addr2line 工具转换 */ diff --git a/demos/os/rtthread/stm32f4xx/app/src/app_task.c b/demos/os/rtthread/stm32f4xx/app/src/app_task.c index 065a285..81b1a38 100644 --- a/demos/os/rtthread/stm32f4xx/app/src/app_task.c +++ b/demos/os/rtthread/stm32f4xx/app/src/app_task.c @@ -67,7 +67,7 @@ static rt_err_t exception_hook(void *context) { list_thread(); #endif - cm_backtrace_fault(*((uint32_t *)(__get_SP() + sizeof(uint32_t) * 8)), __get_SP() + sizeof(uint32_t) * 9); + cm_backtrace_fault(*((uint32_t *)(cmb_get_sp() + sizeof(uint32_t) * 8)), cmb_get_sp() + sizeof(uint32_t) * 9); while (_continue == 1);