diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index dad24c248f..9ac03f6b7a 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -269,7 +269,7 @@ jobs: - "microchip/same70" - "smartfusion2" - "maxim/max32660-evsys" - - "efm32" + # - "efm32" - RTT_BSP: "mips" RTT_TOOL_CHAIN: "sourcery-mips" SUB_RTT_BSP: diff --git a/bsp/Infineon/docs/PSOC6系列BSP制作教程.md b/bsp/Infineon/docs/PSOC6系列BSP制作教程.md index 52b61600fb..1c80634913 100644 --- a/bsp/Infineon/docs/PSOC6系列BSP制作教程.md +++ b/bsp/Infineon/docs/PSOC6系列BSP制作教程.md @@ -385,7 +385,7 @@ PSOC6 BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 #### 4.1.2 ENV 配置 - 系统心跳统一设置为 1000(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/bsp/efm32/startup.c b/bsp/efm32/startup.c index d120eed4a1..acad123826 100644 --- a/bsp/efm32/startup.c +++ b/bsp/efm32/startup.c @@ -36,7 +36,7 @@ extern int __bss_end__; /* External function prototypes ----------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ -#ifdef RT_DEBUG +#ifdef RT_USING_DEBUG /***************************************************************************//** * @brief * Reports the name of the source file and the source line number where the diff --git a/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md b/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md index 3a33fd5a68..8e0ea7e9c5 100644 --- a/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md +++ b/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md @@ -790,7 +790,7 @@ GD32 BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 #### 4.1.2 ENV 配置 - 系统心跳统一设置为 1000(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md b/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md index a7d8264b72..b020a0f0c4 100644 --- a/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md +++ b/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md @@ -594,7 +594,7 @@ GD32 BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 #### 4.1.2 ENV 配置 - 系统心跳统一设置为 1000(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/bsp/imxrt/docs/IMXRT系列BSP制作教程.md b/bsp/imxrt/docs/IMXRT系列BSP制作教程.md index 3e26c1f82f..775d922c1b 100644 --- a/bsp/imxrt/docs/IMXRT系列BSP制作教程.md +++ b/bsp/imxrt/docs/IMXRT系列BSP制作教程.md @@ -237,7 +237,7 @@ i.MX RT BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置 #### ENV 配置 - 系统心跳统一设置为 1000(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md b/bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md index 20770155a2..63be9b620f 100644 --- a/bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md +++ b/bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md @@ -238,7 +238,7 @@ LPC BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 I #### ENV 配置 - 系统心跳统一设置为 100(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/bsp/phytium/aarch32/configs/e2000d_rtsmart.h b/bsp/phytium/aarch32/configs/e2000d_rtsmart.h index 913e053bd7..7aae38b854 100644 --- a/bsp/phytium/aarch32/configs/e2000d_rtsmart.h +++ b/bsp/phytium/aarch32/configs/e2000d_rtsmart.h @@ -29,7 +29,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch32/configs/e2000d_rtthread.h b/bsp/phytium/aarch32/configs/e2000d_rtthread.h index 9d6a4ca793..cadee425a4 100644 --- a/bsp/phytium/aarch32/configs/e2000d_rtthread.h +++ b/bsp/phytium/aarch32/configs/e2000d_rtthread.h @@ -28,7 +28,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch32/configs/e2000q_rtsmart.h b/bsp/phytium/aarch32/configs/e2000q_rtsmart.h index 3e169f917d..4a866173bc 100644 --- a/bsp/phytium/aarch32/configs/e2000q_rtsmart.h +++ b/bsp/phytium/aarch32/configs/e2000q_rtsmart.h @@ -29,7 +29,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch32/configs/e2000q_rtthread.h b/bsp/phytium/aarch32/configs/e2000q_rtthread.h index 39be678f07..7de715186f 100644 --- a/bsp/phytium/aarch32/configs/e2000q_rtthread.h +++ b/bsp/phytium/aarch32/configs/e2000q_rtthread.h @@ -28,7 +28,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch64/configs/e2000d_rtsmart.h b/bsp/phytium/aarch64/configs/e2000d_rtsmart.h index d20b661fbb..4b8c32c9aa 100644 --- a/bsp/phytium/aarch64/configs/e2000d_rtsmart.h +++ b/bsp/phytium/aarch64/configs/e2000d_rtsmart.h @@ -29,7 +29,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch64/configs/e2000d_rtthread.h b/bsp/phytium/aarch64/configs/e2000d_rtthread.h index 76b14cfc28..052dfdbd55 100644 --- a/bsp/phytium/aarch64/configs/e2000d_rtthread.h +++ b/bsp/phytium/aarch64/configs/e2000d_rtthread.h @@ -28,7 +28,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch64/configs/e2000q_rtsmart.h b/bsp/phytium/aarch64/configs/e2000q_rtsmart.h index 7b4988e9a1..06660b7a34 100644 --- a/bsp/phytium/aarch64/configs/e2000q_rtsmart.h +++ b/bsp/phytium/aarch64/configs/e2000q_rtsmart.h @@ -29,7 +29,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/phytium/aarch64/configs/e2000q_rtthread.h b/bsp/phytium/aarch64/configs/e2000q_rtthread.h index 556c088f1f..4dd6b1f99d 100644 --- a/bsp/phytium/aarch64/configs/e2000q_rtthread.h +++ b/bsp/phytium/aarch64/configs/e2000q_rtthread.h @@ -28,7 +28,7 @@ #define RT_KSERVICE_USING_STDLIB #define RT_KPRINTF_USING_LONGLONG -#define RT_DEBUG +#define RT_USING_DEBUG /* Inter-Thread communication */ diff --git a/bsp/renesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md b/bsp/renesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md index ea434834bb..c965cfaf36 100644 --- a/bsp/renesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md +++ b/bsp/renesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md @@ -362,7 +362,7 @@ The guidelines consist of project configuration, ENV configuration, and IDE conf #### 4.1.2 ENV Configuration - The system tick is set as 1000 (The macro: RT_TICK_PER_SECOND) -- Enable asserting in Debug options (The macro: RT_DEBUG) +- Enable asserting in Debug options (The macro: RT_USING_DEBUG) - The stack size of the system idle thread is set to be 256 (The macro: IDLE_THREAD_STACK_SIZE) - Enable component auto initialization (The macro: RT_USING_COMPONENTS_INIT) - Enable the `user main` option (The macro: RT_USING_USER_MAIN) diff --git a/bsp/renesas/docs/RA系列BSP制作教程.md b/bsp/renesas/docs/RA系列BSP制作教程.md index 90785a9bd0..06daf5eeb9 100644 --- a/bsp/renesas/docs/RA系列BSP制作教程.md +++ b/bsp/renesas/docs/RA系列BSP制作教程.md @@ -367,7 +367,7 @@ RA 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 IDE #### 4.1.2 ENV 配置 - 系统心跳统一设置为 1000(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md b/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md index b5e84671d0..b57dfda12a 100644 --- a/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md +++ b/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md @@ -217,7 +217,7 @@ The specifications of making STM32 BSP are mainly divided into three aspects: en #### 4.1.2 ENV configuration - The system heartbeat is uniformly set to 1000 (Macro: RT_TICK_PER_SECOND) -- The assertion in the debugging option needs to be turned on in the BSP (macro: RT_DEBUG) +- The assertion in the debugging option needs to be turned on in the BSP (macro: RT_USING_DEBUG) - The system idle thread stack size is uniformly set to 256 (Macro: IDLE_THREAD_STACK_SIZE) - Turn on automatic component initialization (Macro: RT_USING_COMPONENTS_INIT) - Need to enable the user main option (Macro: RT_USING_USER_MAIN) diff --git a/bsp/stm32/docs/STM32系列BSP制作教程.md b/bsp/stm32/docs/STM32系列BSP制作教程.md index 91eca7e3a0..fc32ecdcdc 100644 --- a/bsp/stm32/docs/STM32系列BSP制作教程.md +++ b/bsp/stm32/docs/STM32系列BSP制作教程.md @@ -265,7 +265,7 @@ STM32 BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 #### 4.1.2 ENV 配置 - 系统心跳统一设置为 1000(宏:RT_TICK_PER_SECOND) -- BSP 中需要打开调试选项中的断言(宏:RT_DEBUG) +- BSP 中需要打开调试选项中的断言(宏:RT_USING_DEBUG) - 系统空闲线程栈大小统一设置为 256(宏:IDLE_THREAD_STACK_SIZE) - 开启组件自动初始化(宏:RT_USING_COMPONENTS_INIT) - 需要开启 user main 选项(宏:RT_USING_USER_MAIN) diff --git a/components/drivers/core/dm.c b/components/drivers/core/dm.c index cf5465b89c..20c2fca1d3 100644 --- a/components/drivers/core/dm.c +++ b/components/drivers/core/dm.c @@ -27,7 +27,7 @@ INIT_EXPORT(rti_secondary_cpu_end, "7.end"); void rt_dm_secondary_cpu_init(void) { -#if RT_DEBUG_INIT +#if RT_DEBUGING_INIT int result; const struct rt_init_desc *desc; @@ -45,7 +45,7 @@ void rt_dm_secondary_cpu_init(void) { (*fn_ptr)(); } -#endif /* RT_DEBUG_INIT */ +#endif /* RT_DEBUGING_INIT */ } #endif /* RT_USING_SMP */ diff --git a/components/mm/mm_page.c b/components/mm/mm_page.c index 53df6a4e28..51104fbf71 100644 --- a/components/mm/mm_page.c +++ b/components/mm/mm_page.c @@ -85,7 +85,7 @@ static struct rt_mem_obj mm_page_mapper = { .hint_free = hint_free, }; -#ifdef RT_DEBUG_PAGE_LEAK +#ifdef RT_DEBUGING_PAGE_LEAK static volatile int enable; static rt_page_t _trace_head; #define TRACE_ALLOC(pg, size) _trace_alloc(pg, __builtin_return_address(0), size) @@ -556,7 +556,7 @@ static void *_do_pages_alloc(rt_uint32_t size_bits, size_t flags) { alloc_buf = page_to_addr(p); - #ifdef RT_DEBUG_PAGE_LEAK + #ifdef RT_DEBUGING_PAGE_LEAK level = rt_hw_interrupt_disable(); TRACE_ALLOC(p, size_bits); rt_hw_interrupt_enable(level); diff --git a/components/mm/mm_page.h b/components/mm/mm_page.h index e5386640dc..99cb5a804e 100644 --- a/components/mm/mm_page.h +++ b/components/mm/mm_page.h @@ -34,7 +34,7 @@ #define PAGE_ANY_AVAILABLE 0x1ul -#ifdef RT_DEBUG_PAGE_LEAK +#ifdef RT_DEBUGING_PAGE_LEAK #define DEBUG_FIELD { \ /* trace list */ \ struct rt_page *tl_next; \ diff --git a/documentation/basic/basic.md b/documentation/basic/basic.md index 547eeab57f..8b5e930c8a 100644 --- a/documentation/basic/basic.md +++ b/documentation/basic/basic.md @@ -577,9 +577,9 @@ Configuration is mainly done by modifying the file under project directory - rtc #define RT_USING_OVERFLOW_CHECK /* Define this macro to enable debug mode, if not defined, close. */ -#define RT_DEBUG +#define RT_USING_DEBUG /* When debug mode is enabled: Define this macro to enable the print component initialization information, if not defined, close. */ -#define RT_DEBUG_INIT +#define RT_DEBUGING_INIT /* Defining this macro means the use of the hook function is started, if not defined, close. */ #define RT_USING_HOOK diff --git a/include/rtdbg.h b/include/rtdbg.h index 4eb544aecb..10331edc0e 100644 --- a/include/rtdbg.h +++ b/include/rtdbg.h @@ -36,13 +36,13 @@ extern "C" { #endif -/* the debug log will force enable when RT_DEBUG macro is defined */ -#if defined(RT_DEBUG) && !defined(DBG_ENABLE) +/* the debug log will force enable when RT_USING_DEBUG macro is defined */ +#if defined(RT_USING_DEBUG) && !defined(DBG_ENABLE) #define DBG_ENABLE #endif -/* it will force output color log when RT_DEBUG_COLOR macro is defined */ -#if defined(RT_DEBUG_COLOR) && !defined(DBG_COLOR) +/* it will force output color log when RT_DEBUGING_COLOR macro is defined */ +#if defined(RT_DEBUGING_COLOR) && !defined(DBG_COLOR) #define DBG_COLOR #endif diff --git a/include/rtdef.h b/include/rtdef.h index 9562c410f5..c0f1cb1f24 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -271,7 +271,7 @@ typedef __gnuc_va_list va_list; typedef int (*init_fn_t)(void); #ifdef _MSC_VER #pragma section("rti_fn$f",read) - #ifdef RT_DEBUG_INIT + #ifdef RT_DEBUGING_INIT struct rt_init_desc { const char* level; @@ -297,7 +297,7 @@ typedef int (*init_fn_t)(void); {__rti_level_##fn, fn }; #endif #else - #ifdef RT_DEBUG_INIT + #ifdef RT_DEBUGING_INIT struct rt_init_desc { const char* fn_name; diff --git a/include/rtthread.h b/include/rtthread.h index 4c0de6a511..69cec5992b 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -18,7 +18,7 @@ * 2021-11-14 Meco Man add rtlegacy.h for compatibility * 2022-06-04 Meco Man remove strnlen * 2023-05-20 Bernard add rtatomic.h header file to included files. - * 2023-06-30 ChuShicheng Move RT_DEBUG_CONTEXT_CHECK from the rtdebug.h + * 2023-06-30 ChuShicheng move debug check from the rtdebug.h */ #ifndef __RT_THREAD_H__ @@ -718,24 +718,19 @@ rt_size_t rt_strlen(const char *src); void rt_show_version(void); -#ifdef RT_DEBUG +#ifdef RT_USING_DEBUG extern void (*rt_assert_hook)(const char *ex, const char *func, rt_size_t line); void rt_assert_set_hook(void (*hook)(const char *ex, const char *func, rt_size_t line)); void rt_assert_handler(const char *ex, const char *func, rt_size_t line); -/* Turn on this to enable context check */ -#ifndef RT_DEBUG_CONTEXT_CHECK -#define RT_DEBUG_CONTEXT_CHECK 1 -#endif - #define RT_ASSERT(EX) \ if (!(EX)) \ { \ rt_assert_handler(#EX, __FUNCTION__, __LINE__); \ } +#ifdef RT_DEBUGING_CONTEXT /* Macro to check current context */ -#if RT_DEBUG_CONTEXT_CHECK #define RT_DEBUG_NOT_IN_INTERRUPT \ do \ { \ @@ -806,19 +801,14 @@ while (0) #define RT_DEBUG_NOT_IN_INTERRUPT #define RT_DEBUG_IN_THREAD_CONTEXT #define RT_DEBUG_SCHEDULER_AVAILABLE(need_check) -#endif - -#else /* RT_DEBUG */ - +#endif /* RT_DEBUGING_CONTEXT */ +#else #define RT_ASSERT(EX) -#define RT_DEBUG_NOT_IN_INTERRUPT -#define RT_DEBUG_IN_THREAD_CONTEXT -#define RT_DEBUG_SCHEDULER_AVAILABLE(need_check) -#endif /* RT_DEBUG */ +#endif /* RT_USING_DEBUG */ #ifdef RT_USING_FINSH #include -#endif +#endif /* RT_USING_FINSH */ /**@}*/ @@ -826,4 +816,4 @@ while (0) } #endif -#endif +#endif /* __RT_THREAD_H__ */ diff --git a/libcpu/Kconfig b/libcpu/Kconfig index c50571eda2..0a667f6281 100644 --- a/libcpu/Kconfig +++ b/libcpu/Kconfig @@ -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 diff --git a/libcpu/arm/sep4020/sep4020.h b/libcpu/arm/sep4020/sep4020.h index bb8effbff0..b5654794b1 100644 --- a/libcpu/arm/sep4020/sep4020.h +++ b/libcpu/arm/sep4020/sep4020.h @@ -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) \ { \ diff --git a/libcpu/sim/win32/startup.c b/libcpu/sim/win32/startup.c index 583b93205b..ba2871eae6 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; -#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); diff --git a/libcpu/unicore32/sep6200/sep6200.h b/libcpu/unicore32/sep6200/sep6200.h index 773b505a02..4b9eab6d79 100644 --- a/libcpu/unicore32/sep6200/sep6200.h +++ b/libcpu/unicore32/sep6200/sep6200.h @@ -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) \ { \ diff --git a/src/Kconfig b/src/Kconfig index b869559952..28e54fc711 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -198,28 +198,29 @@ menu "kservice optimization" endmenu -menuconfig RT_DEBUG +menuconfig RT_USING_DEBUG bool "Enable debugging features" default y -if RT_DEBUG + if RT_USING_DEBUG + config RT_DEBUGING_COLOR + bool "Enable color debugging log" + default y - config RT_DEBUG_COLOR - bool "Enable color debugging log" - default n + config RT_DEBUGING_CONTEXT + bool "Enable debugging of environment and context check" + default y - config RT_DEBUG_INIT - bool "Enable debugging of components initialization" - default n + config RT_DEBUGING_INIT + bool "Enable debugging of components initialization" + default y - if ARCH_MM_MMU - config RT_DEBUG_PAGE_LEAK + config RT_DEBUGING_PAGE_LEAK bool "Enable page leaking tracer" + depends on ARCH_MM_MMU default n endif -endif - menu "Inter-Thread communication" config RT_USING_SEMAPHORE @@ -260,17 +261,16 @@ endmenu menu "Memory Management" - if ARCH_MM_MMU - config RT_PAGE_MAX_ORDER - int "Max order of pages allocatable by page allocator" - default 11 - help - For example, A value of 11 means the maximum chunk of contiguous memory - allocatable by page system is 2^(11 + ARCH_PAGE_BITS - 1) Bytes. - Large memory requirement can consume all system resource, and should - consider reserved memory instead to enhance system endurance. - Max order should at least satisfied usage by huge page. - endif + config RT_PAGE_MAX_ORDER + int "Max order of pages allocatable by page allocator" + default 11 + depends on ARCH_MM_MMU + help + For example, A value of 11 means the maximum chunk of contiguous memory + allocatable by page system is 2^(11 + ARCH_PAGE_BITS - 1) Bytes. + Large memory requirement can consume all system resource, and should + consider reserved memory instead to enhance system endurance. + Max order should at least satisfied usage by huge page. config RT_USING_MEMPOOL bool "Using memory pool" diff --git a/src/components.c b/src/components.c index af74954d76..c9a25c76dc 100644 --- a/src/components.c +++ b/src/components.c @@ -84,7 +84,7 @@ INIT_EXPORT(rti_end, "6.end"); */ void rt_components_board_init(void) { -#ifdef RT_DEBUG_INIT +#ifdef RT_DEBUGING_INIT int result; const struct rt_init_desc *desc; for (desc = &__rt_init_desc_rti_board_start; desc < &__rt_init_desc_rti_board_end; desc ++) @@ -100,7 +100,7 @@ void rt_components_board_init(void) { (*fn_ptr)(); } -#endif /* RT_DEBUG_INIT */ +#endif /* RT_DEBUGING_INIT */ } /** @@ -108,7 +108,7 @@ void rt_components_board_init(void) */ void rt_components_init(void) { -#ifdef RT_DEBUG_INIT +#ifdef RT_DEBUGING_INIT int result; const struct rt_init_desc *desc; @@ -126,7 +126,7 @@ void rt_components_init(void) { (*fn_ptr)(); } -#endif /* RT_DEBUG_INIT */ +#endif /* RT_DEBUGING_INIT */ } #endif /* RT_USING_COMPONENTS_INIT */ diff --git a/src/kservice.c b/src/kservice.c index 7e750b52e1..9a8e89f4f2 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -1987,7 +1987,7 @@ int __rt_ffs(int value) #define __on_rt_assert_hook(ex, func, line) __ON_HOOK_ARGS(rt_assert_hook, (ex, func, line)) #endif -#ifdef RT_DEBUG +#ifdef RT_USING_DEBUG /* RT_ASSERT(EX)'s hook */ void (*rt_assert_hook)(const char *ex, const char *func, rt_size_t line); @@ -2036,6 +2036,6 @@ void rt_assert_handler(const char *ex_string, const char *func, rt_size_t line) } } RTM_EXPORT(rt_assert_handler); -#endif /* RT_DEBUG */ +#endif /* RT_USING_DEBUG */ /**@}*/ diff --git a/src/object.c b/src/object.c index d1815f7e23..afcd4d8509 100644 --- a/src/object.c +++ b/src/object.c @@ -353,7 +353,7 @@ void rt_object_init(struct rt_object *object, const char *name) { rt_base_t level; -#ifdef RT_DEBUG +#ifdef RT_USING_DEBUG struct rt_list_node *node = RT_NULL; #endif struct rt_object_information *information; @@ -365,7 +365,7 @@ void rt_object_init(struct rt_object *object, information = rt_object_get_information(type); RT_ASSERT(information != RT_NULL); -#ifdef RT_DEBUG +#ifdef RT_USING_DEBUG /* check object type to avoid re-initialization */ /* enter critical */