summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorShicheng Chu <[email protected]>2023-06-29 23:24:25 +0800
committerGitHub <[email protected]>2023-06-29 11:24:25 -0400
commite2c031643c8dec7c9ea1581216e19bf19c8f73f0 (patch)
tree926536732e7472c5e86ac5198b239d82f9f55da4 /libcpu
parent148ae53cf8d3abc2c2e11c94c171b123b950b2fc (diff)
[include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h (#7750)
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/sim/win32/startup.c8
-rw-r--r--libcpu/ti-dsp/c28x/cpuport.c16
2 files changed, 16 insertions, 8 deletions
diff --git a/libcpu/sim/win32/startup.c b/libcpu/sim/win32/startup.c
index 18ef2c997d..583b93205b 100644
--- a/libcpu/sim/win32/startup.c
+++ b/libcpu/sim/win32/startup.c
@@ -81,7 +81,7 @@ struct rt_init_tag
{
const char *level;
init_fn_t fn;
-#if RT_DEBUG_INIT
+#ifdef RT_DEBUG_INIT
const char *fn_name;
#endif
};
@@ -114,7 +114,7 @@ static int rt_init_objects_sort(void)
{
table->level = ((struct rt_init_desc *)ptr_begin)->level;
table->fn = ((struct rt_init_desc *)ptr_begin)->fn;
-#if RT_DEBUG_INIT
+#ifdef RT_DEBUG_INIT
table->fn_name = ((struct rt_init_desc *)ptr_begin)->fn_name;
#endif
ptr_begin += sizeof(struct rt_init_desc) / sizeof(unsigned int);
@@ -168,7 +168,7 @@ void rt_components_board_init(void)
{
break;
}
-#if RT_DEBUG_INIT
+#ifdef RT_DEBUG_INIT
rt_kprintf("initialize %s", rt_init_table[index_i].fn_name);
result = rt_init_table[index_i].fn();
rt_kprintf(":%d done\n", result);
@@ -203,7 +203,7 @@ void rt_components_init(void)
{
break;
}
-#if RT_DEBUG_INIT
+#ifdef RT_DEBUG_INIT
rt_kprintf("initialize %s", rt_init_table[index_i].fn_name);
result = rt_init_table[index_i].fn();
rt_kprintf(":%d done\n", result);
diff --git a/libcpu/ti-dsp/c28x/cpuport.c b/libcpu/ti-dsp/c28x/cpuport.c
index 069449c1dc..f282744dac 100644
--- a/libcpu/ti-dsp/c28x/cpuport.c
+++ b/libcpu/ti-dsp/c28x/cpuport.c
@@ -13,6 +13,14 @@
#include <rthw.h>
+#define DBG_TAG "kernel.irq"
+#ifdef RT_DEBUG_IRQ
+#define DBG_LVL DBG_LOG
+#else
+#define DBG_LVL DBG_WARNING
+#endif /* defined (RT_DEBUG_IRQ) */
+#include <rtdbg.h>
+
extern volatile rt_uint8_t rt_interrupt_nest;
/* exception and interrupt handler table */
@@ -174,14 +182,14 @@ void rt_interrupt_enter(void)
RT_OBJECT_HOOK_CALL(rt_interrupt_enter_hook,());
rt_hw_interrupt_enable(level);
- RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq has come..., irq current nest:%d\n",
- (rt_int32_t)rt_interrupt_nest));
+ LOG_D("irq has come..., irq current nest:%d",
+ (rt_int32_t)rt_interrupt_nest);
}
void rt_interrupt_leave(void)
{
- RT_DEBUG_LOG(RT_DEBUG_IRQ, ("irq is going to leave, irq current nest:%d\n",
- (rt_int32_t)rt_interrupt_nest));
+ LOG_D("irq is going to leave, irq current nest:%d",
+ (rt_int32_t)rt_interrupt_nest);
rt_hw_interrupt_disable();
RT_OBJECT_HOOK_CALL(rt_interrupt_leave_hook,());