Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
智驾
rt-thread
提交
244b903e
R
rt-thread
项目概览
智驾
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
244b903e
编写于
7月 21, 2023
作者:
mysterywolf
提交者:
GitHub
7月 22, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805)
上级
52d3637f
变更
34
隐藏空白更改
内联
并排
Showing
34 changed file
with
93 addition
and
103 deletion
+93
-103
.github/workflows/action.yml
.github/workflows/action.yml
+1
-1
bsp/Infineon/docs/PSOC6系列BSP制作教程.md
bsp/Infineon/docs/PSOC6系列BSP制作教程.md
+1
-1
bsp/efm32/startup.c
bsp/efm32/startup.c
+1
-1
bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md
bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md
+1
-1
bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md
bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md
+1
-1
bsp/imxrt/docs/IMXRT系列BSP制作教程.md
bsp/imxrt/docs/IMXRT系列BSP制作教程.md
+1
-1
bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md
bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md
+1
-1
bsp/phytium/aarch32/configs/e2000d_rtsmart.h
bsp/phytium/aarch32/configs/e2000d_rtsmart.h
+1
-1
bsp/phytium/aarch32/configs/e2000d_rtthread.h
bsp/phytium/aarch32/configs/e2000d_rtthread.h
+1
-1
bsp/phytium/aarch32/configs/e2000q_rtsmart.h
bsp/phytium/aarch32/configs/e2000q_rtsmart.h
+1
-1
bsp/phytium/aarch32/configs/e2000q_rtthread.h
bsp/phytium/aarch32/configs/e2000q_rtthread.h
+1
-1
bsp/phytium/aarch64/configs/e2000d_rtsmart.h
bsp/phytium/aarch64/configs/e2000d_rtsmart.h
+1
-1
bsp/phytium/aarch64/configs/e2000d_rtthread.h
bsp/phytium/aarch64/configs/e2000d_rtthread.h
+1
-1
bsp/phytium/aarch64/configs/e2000q_rtsmart.h
bsp/phytium/aarch64/configs/e2000q_rtsmart.h
+1
-1
bsp/phytium/aarch64/configs/e2000q_rtthread.h
bsp/phytium/aarch64/configs/e2000q_rtthread.h
+1
-1
bsp/renesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md
...enesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md
+1
-1
bsp/renesas/docs/RA系列BSP制作教程.md
bsp/renesas/docs/RA系列BSP制作教程.md
+1
-1
bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md
bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md
+1
-1
bsp/stm32/docs/STM32系列BSP制作教程.md
bsp/stm32/docs/STM32系列BSP制作教程.md
+1
-1
components/drivers/core/dm.c
components/drivers/core/dm.c
+2
-2
components/mm/mm_page.c
components/mm/mm_page.c
+2
-2
components/mm/mm_page.h
components/mm/mm_page.h
+1
-1
documentation/basic/basic.md
documentation/basic/basic.md
+2
-2
include/rtdbg.h
include/rtdbg.h
+4
-4
include/rtdef.h
include/rtdef.h
+2
-2
include/rtthread.h
include/rtthread.h
+8
-18
libcpu/Kconfig
libcpu/Kconfig
+12
-12
libcpu/arm/sep4020/sep4020.h
libcpu/arm/sep4020/sep4020.h
+3
-3
libcpu/sim/win32/startup.c
libcpu/sim/win32/startup.c
+4
-4
libcpu/unicore32/sep6200/sep6200.h
libcpu/unicore32/sep6200/sep6200.h
+3
-3
src/Kconfig
src/Kconfig
+23
-23
src/components.c
src/components.c
+4
-4
src/kservice.c
src/kservice.c
+2
-2
src/object.c
src/object.c
+2
-2
未找到文件。
.github/workflows/action.yml
浏览文件 @
244b903e
...
...
@@ -269,7 +269,7 @@ jobs:
-
"
microchip/same70"
-
"
smartfusion2"
-
"
maxim/max32660-evsys"
-
"
efm32"
#
- "efm32"
-
RTT_BSP
:
"
mips"
RTT_TOOL_CHAIN
:
"
sourcery-mips"
SUB_RTT_BSP
:
...
...
bsp/Infineon/docs/PSOC6系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/efm32/startup.c
浏览文件 @
244b903e
...
...
@@ -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
...
...
bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/imxrt/docs/IMXRT系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/phytium/aarch32/configs/e2000d_rtsmart.h
浏览文件 @
244b903e
...
...
@@ -29,7 +29,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch32/configs/e2000d_rtthread.h
浏览文件 @
244b903e
...
...
@@ -28,7 +28,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch32/configs/e2000q_rtsmart.h
浏览文件 @
244b903e
...
...
@@ -29,7 +29,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch32/configs/e2000q_rtthread.h
浏览文件 @
244b903e
...
...
@@ -28,7 +28,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch64/configs/e2000d_rtsmart.h
浏览文件 @
244b903e
...
...
@@ -29,7 +29,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch64/configs/e2000d_rtthread.h
浏览文件 @
244b903e
...
...
@@ -28,7 +28,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch64/configs/e2000q_rtsmart.h
浏览文件 @
244b903e
...
...
@@ -29,7 +29,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/phytium/aarch64/configs/e2000q_rtthread.h
浏览文件 @
244b903e
...
...
@@ -28,7 +28,7 @@
#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_
USING_
DEBUG
/* Inter-Thread communication */
...
...
bsp/renesas/docs/Building_a_BSP_for_the_RA_Series_Dev_Board.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/renesas/docs/RA系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
bsp/stm32/docs/STM32系列BSP制作教程.md
浏览文件 @
244b903e
...
...
@@ -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)
...
...
components/drivers/core/dm.c
浏览文件 @
244b903e
...
...
@@ -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_DEBUG
ING
_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_DEBUG
ING
_INIT */
}
#endif
/* RT_USING_SMP */
...
...
components/mm/mm_page.c
浏览文件 @
244b903e
...
...
@@ -85,7 +85,7 @@ static struct rt_mem_obj mm_page_mapper = {
.
hint_free
=
hint_free
,
};
#ifdef RT_DEBUG_PAGE_LEAK
#ifdef RT_DEBUG
ING
_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_DEBUG
ING
_PAGE_LEAK
level
=
rt_hw_interrupt_disable
();
TRACE_ALLOC
(
p
,
size_bits
);
rt_hw_interrupt_enable
(
level
);
...
...
components/mm/mm_page.h
浏览文件 @
244b903e
...
...
@@ -34,7 +34,7 @@
#define PAGE_ANY_AVAILABLE 0x1ul
#ifdef RT_DEBUG_PAGE_LEAK
#ifdef RT_DEBUG
ING
_PAGE_LEAK
#define DEBUG_FIELD { \
/* trace list */
\
struct rt_page *tl_next; \
...
...
documentation/basic/basic.md
浏览文件 @
244b903e
...
...
@@ -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_DEBUG
ING
_INIT
/* Defining this macro means the use of the hook function is started, if not defined, close. */
#define RT_USING_HOOK
...
...
include/rtdbg.h
浏览文件 @
244b903e
...
...
@@ -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_DEBUG
ING
_COLOR macro is defined */
#if defined(RT_DEBUG
ING
_COLOR) && !defined(DBG_COLOR)
#define DBG_COLOR
#endif
...
...
include/rtdef.h
浏览文件 @
244b903e
...
...
@@ -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_DEBUG
ING
_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_DEBUG
ING
_INIT
struct
rt_init_desc
{
const
char
*
fn_name
;
...
...
include/rtthread.h
浏览文件 @
244b903e
...
...
@@ -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 <finsh.h>
#endif
#endif
/* RT_USING_FINSH */
/**@}*/
...
...
@@ -826,4 +816,4 @@ while (0)
}
#endif
#endif
#endif
/* __RT_THREAD_H__ */
libcpu/Kconfig
浏览文件 @
244b903e
...
...
@@ -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 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 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
endif
config ARCH_ARM_ARM9
...
...
libcpu/arm/sep4020/sep4020.h
浏览文件 @
244b903e
...
...
@@ -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) \
{ \
...
...
libcpu/sim/win32/startup.c
浏览文件 @
244b903e
...
...
@@ -81,7 +81,7 @@ struct rt_init_tag
{
const
char
*
level
;
init_fn_t
fn
;
#ifdef RT_DEBUG_INIT
#ifdef RT_DEBUG
ING
_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_DEBUG
ING
_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_DEBUG
ING
_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_DEBUG
ING
_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
);
...
...
libcpu/unicore32/sep6200/sep6200.h
浏览文件 @
244b903e
...
...
@@ -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) \
{ \
...
...
src/Kconfig
浏览文件 @
244b903e
...
...
@@ -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_DEBU
G_INIT
bool "Enable debugging of components initialization"
default n
config RT_DEBUGIN
G_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"
...
...
src/components.c
浏览文件 @
244b903e
...
...
@@ -84,7 +84,7 @@ INIT_EXPORT(rti_end, "6.end");
*/
void
rt_components_board_init
(
void
)
{
#ifdef RT_DEBUG_INIT
#ifdef RT_DEBUG
ING
_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_DEBUG
ING
_INIT */
}
/**
...
...
@@ -108,7 +108,7 @@ void rt_components_board_init(void)
*/
void
rt_components_init
(
void
)
{
#ifdef RT_DEBUG_INIT
#ifdef RT_DEBUG
ING
_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_DEBUG
ING
_INIT */
}
#endif
/* RT_USING_COMPONENTS_INIT */
...
...
src/kservice.c
浏览文件 @
244b903e
...
...
@@ -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 */
/**@}*/
src/object.c
浏览文件 @
244b903e
...
...
@@ -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 */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录