mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805)
This commit is contained in:
1 parent
52d3637fba
commit
244b903e5d
34 files changed
+92
-102
No files matched your search
+11
-11
@@ -89,18 +89,18 @@ config ARCH_ARM_MMU
|
||||
depends on ARCH_ARM
|
||||
|
||||
if RT_USING_SMART
|
||||
config KERNEL_VADDR_START
|
||||
hex "The virtural address of kernel start"
|
||||
default 0xffff000000000000 if ARCH_ARMV8
|
||||
default 0xc0000000 if ARCH_ARM
|
||||
default 0x80000000 if ARCH_RISCV
|
||||
depends on ARCH_MM_MMU
|
||||
config KERNEL_VADDR_START
|
||||
hex "The virtural address of kernel start"
|
||||
default 0xffff000000000000 if ARCH_ARMV8
|
||||
default 0xc0000000 if ARCH_ARM
|
||||
default 0x80000000 if ARCH_RISCV
|
||||
depends on ARCH_MM_MMU
|
||||
|
||||
config RT_IOREMAP_LATE
|
||||
bool "Support to create IO mapping in the kernel address space after system initlalization."
|
||||
default n
|
||||
depends on ARCH_ARM_CORTEX_A
|
||||
depends on ARCH_MM_MMU
|
||||
config RT_IOREMAP_LATE
|
||||
bool "Support to create IO mapping in the kernel address space after system initlalization."
|
||||
default n
|
||||
depends on ARCH_ARM_CORTEX_A
|
||||
depends on ARCH_MM_MMU
|
||||
endif
|
||||
|
||||
config ARCH_ARM_ARM9
|
||||
|
||||
@@ -808,8 +808,8 @@ typedef int ER; /* Error code. A signed integer. */
|
||||
rt_kprintf(fmt,##__VA_ARGS__); \
|
||||
}while(0)
|
||||
|
||||
#define RT_DEBUG
|
||||
#ifdef RT_DEBUG
|
||||
#define RT_USING_DEBUG
|
||||
#ifdef RT_USING_DEBUG
|
||||
#define DBOUT(fmt,...) \
|
||||
do \
|
||||
{ \
|
||||
@@ -821,7 +821,7 @@ typedef int ER; /* Error code. A signed integer. */
|
||||
do{}while(0)
|
||||
#endif
|
||||
|
||||
#ifdef RT_DEBUG
|
||||
#ifdef RT_USING_DEBUG
|
||||
#define ASSERT(arg) \
|
||||
if((arg) == 0) \
|
||||
{ \
|
||||
|
||||
@@ -81,7 +81,7 @@ struct rt_init_tag
|
||||
{
|
||||
const char *level;
|
||||
init_fn_t fn;
|
||||
#ifdef RT_DEBUG_INIT
|
||||
#ifdef RT_DEBUGING_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;
|
||||
#ifdef RT_DEBUG_INIT
|
||||
#ifdef RT_DEBUGING_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;
|
||||
}
|
||||
#ifdef RT_DEBUG_INIT
|
||||
#ifdef RT_DEBUGING_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;
|
||||
}
|
||||
#ifdef RT_DEBUG_INIT
|
||||
#ifdef RT_DEBUGING_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);
|
||||
|
||||
@@ -374,8 +374,8 @@ typedef int ER; /* Error code. A signed integer. */
|
||||
rt_kprintf(fmt,##__VA_ARGS__); \
|
||||
}while(0)
|
||||
|
||||
#define RT_DEBUG
|
||||
#ifdef RT_DEBUG
|
||||
#define RT_USING_DEBUG
|
||||
#ifdef RT_USING_DEBUG
|
||||
#define DBOUT(fmt,...) \
|
||||
do \
|
||||
{ \
|
||||
@@ -387,7 +387,7 @@ typedef int ER; /* Error code. A signed integer. */
|
||||
do{}while(0)
|
||||
#endif
|
||||
|
||||
#ifdef RT_DEBUG
|
||||
#ifdef RT_USING_DEBUG
|
||||
#define ASSERT(arg) \
|
||||
if((arg) == 0) \
|
||||
{ \
|
||||
|
||||
Reference in new issue
Block a user