Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:
- "microchip/same70"
- "smartfusion2"
- "maxim/max32660-evsys"
- "efm32"
# - "efm32"
- RTT_BSP: "mips"
RTT_TOOL_CHAIN: "sourcery-mips"
SUB_RTT_BSP:
Expand Down
2 changes: 1 addition & 1 deletion bsp/Infineon/docs/PSOC6系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/efm32/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/imxrt/docs/IMXRT系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/lpc55sxx/docs/LPC55Sxx系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch32/configs/e2000d_rtsmart.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch32/configs/e2000d_rtthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch32/configs/e2000q_rtsmart.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch32/configs/e2000q_rtthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch64/configs/e2000d_rtsmart.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch64/configs/e2000d_rtthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch64/configs/e2000q_rtsmart.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
2 changes: 1 addition & 1 deletion bsp/phytium/aarch64/configs/e2000q_rtthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define RT_KSERVICE_USING_STDLIB
#define RT_KPRINTF_USING_LONGLONG
#define RT_DEBUG
#define RT_USING_DEBUG

/* Inter-Thread communication */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/renesas/docs/RA系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bsp/stm32/docs/STM32系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/core/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 */

Expand Down
4 changes: 2 additions & 2 deletions components/mm/mm_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion components/mm/mm_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
4 changes: 2 additions & 2 deletions documentation/basic/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions include/rtdbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions include/rtdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,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;
Expand All @@ -296,7 +296,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;
Expand Down
26 changes: 8 additions & 18 deletions include/rtthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -725,24 +725,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 \
{ \
Expand Down Expand Up @@ -813,24 +808,19 @@ 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 */

/**@}*/

#ifdef __cplusplus
}
#endif

#endif
#endif /* __RT_THREAD_H__ */
24 changes: 12 additions & 12 deletions libcpu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions libcpu/arm/sep4020/sep4020.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
{ \
Expand All @@ -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) \
{ \
Expand Down
Loading