Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
1758f577
R
rt-thread
项目概览
2345VOR
/
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,发现更多精彩内容 >>
未验证
提交
1758f577
编写于
7月 14, 2018
作者:
B
Bernard Xiong
提交者:
GitHub
7月 14, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1617 from armink/fix_rtdbg
Fix rtdbg
上级
2c0f31b9
6cd8658d
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
31 addition
and
22 deletion
+31
-22
bsp/allwinner_tina/drivers/drv_gpio.c
bsp/allwinner_tina/drivers/drv_gpio.c
+1
-1
bsp/allwinner_tina/drivers/drv_sdio.c
bsp/allwinner_tina/drivers/drv_sdio.c
+1
-1
bsp/allwinner_tina/drivers/spi/drv_spi.c
bsp/allwinner_tina/drivers/spi/drv_spi.c
+1
-1
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
+1
-1
bsp/imxrt1052-evk/drivers/drv_eth.c
bsp/imxrt1052-evk/drivers/drv_eth.c
+1
-1
bsp/imxrt1052-evk/drivers/drv_eth_fire.c
bsp/imxrt1052-evk/drivers/drv_eth_fire.c
+1
-1
bsp/imxrt1052-evk/drivers/fsl_phy_fire.c
bsp/imxrt1052-evk/drivers/fsl_phy_fire.c
+1
-1
bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c
bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c
+1
-1
bsp/x1000/drivers/mmc/drv_mmc.c
bsp/x1000/drivers/mmc/drv_mmc.c
+1
-1
components/dfs/include/dfs_private.h
components/dfs/include/dfs_private.h
+1
-1
components/drivers/serial/serial.c
components/drivers/serial/serial.c
+1
-1
components/lwp/lwp.c
components/lwp/lwp.c
+1
-1
components/lwp/lwp_mem.c
components/lwp/lwp_mem.c
+1
-1
components/lwp/lwp_syscall.c
components/lwp/lwp_syscall.c
+1
-1
include/rtdbg.h
include/rtdbg.h
+16
-7
src/signal.c
src/signal.c
+1
-1
未找到文件。
bsp/allwinner_tina/drivers/drv_gpio.c
浏览文件 @
1758f577
...
...
@@ -28,7 +28,7 @@
#include "interrupt.h"
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[GPIO]
"
#define DBG_SECTION_NAME "
GPIO
"
#define DBG_LEVEL DBG_WARNING
#define DBG_COLOR
#include <rtdbg.h>
...
...
bsp/allwinner_tina/drivers/drv_sdio.c
浏览文件 @
1758f577
...
...
@@ -33,7 +33,7 @@
#include "drv_clock.h"
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[MMC]
"
#define DBG_SECTION_NAME "
MMC
"
// #define DBG_LEVEL DBG_LOG
// #define DBG_LEVEL DBG_INFO
#define DBG_LEVEL DBG_WARNING
...
...
bsp/allwinner_tina/drivers/spi/drv_spi.c
浏览文件 @
1758f577
...
...
@@ -34,7 +34,7 @@
#define SPI_BUS_MAX_CLK (30 * 1000 * 1000)
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[SPI]
"
#define DBG_SECTION_NAME "
SPI
"
#define DBG_LEVEL DBG_WARNING
#define DBG_COLOR
#include <rtdbg.h>
...
...
bsp/allwinner_tina/drivers/spi/drv_spi_flash.c
浏览文件 @
1758f577
...
...
@@ -27,7 +27,7 @@
#include <rtdevice.h>
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[FLASH]
"
#define DBG_SECTION_NAME "
FLASH
"
#define DBG_LEVEL DBG_LOG
#define DBG_COLOR
#include <rtdbg.h>
...
...
bsp/imxrt1052-evk/drivers/drv_eth.c
浏览文件 @
1758f577
...
...
@@ -42,7 +42,7 @@
//#define ETH_TX_DUMP
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[ETH]
"
#define DBG_SECTION_NAME "
ETH
"
#define DBG_COLOR
#define DBG_LEVEL DBG_INFO
#include <rtdbg.h>
...
...
bsp/imxrt1052-evk/drivers/drv_eth_fire.c
浏览文件 @
1758f577
...
...
@@ -42,7 +42,7 @@
//#define ETH_TX_DUMP
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[ETH]
"
#define DBG_SECTION_NAME "
ETH
"
#define DBG_COLOR
#define DBG_LEVEL DBG_LOG
#include <rtdbg.h>
...
...
bsp/imxrt1052-evk/drivers/fsl_phy_fire.c
浏览文件 @
1758f577
...
...
@@ -26,7 +26,7 @@
#include <rtthread.h>
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[PHY]
"
#define DBG_SECTION_NAME "
PHY
"
#define DBG_COLOR
#define DBG_LEVEL DBG_LOG
#include <rtdbg.h>
...
...
bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c
浏览文件 @
1758f577
...
...
@@ -29,7 +29,7 @@
#include "realview.h"
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[PL041]
"
#define DBG_SECTION_NAME "
PL041
"
// #define DBG_LEVEL DBG_LOG
// #define DBG_LEVEL DBG_INFO
#define DBG_LEVEL DBG_WARNING
...
...
bsp/x1000/drivers/mmc/drv_mmc.c
浏览文件 @
1758f577
...
...
@@ -34,7 +34,7 @@
#define PIO_THRESHOLD 64
/* use pio mode if data length < PIO_THRESHOLD */
#define DEBUG_ENABLE
#define DEBUG_SECTION_NAME "
[SDIO]
"
#define DEBUG_SECTION_NAME "
SDIO
"
#define DEBUG_LEVEL DBG_INFO
// #define DEBUG_LEVEL DBG_LOG
#define DEBUG_COLOR
...
...
components/dfs/include/dfs_private.h
浏览文件 @
1758f577
...
...
@@ -4,7 +4,7 @@
#include <dfs.h>
// #define DBG_ENABLE
#define DBG_SECTION_NAME "
[ DFS]
"
#define DBG_SECTION_NAME "
DFS
"
#define DBG_COLOR
#define DBG_LEVEL DBG_LOG
#include <rtdbg.h>
...
...
components/drivers/serial/serial.c
浏览文件 @
1758f577
...
...
@@ -43,7 +43,7 @@
// #define DEBUG_ENABLE
#define DEBUG_LEVEL DBG_LOG
#define DBG_SECTION_NAME "
[UART]
"
#define DBG_SECTION_NAME "
UART
"
#define DEBUG_COLOR
#include <rtdbg.h>
...
...
components/lwp/lwp.c
浏览文件 @
1758f577
...
...
@@ -32,7 +32,7 @@
#include "lwp.h"
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[LWP]
"
#define DBG_SECTION_NAME "
LWP
"
#define DBG_COLOR
#define DBG_LEVEL DBG_WARNING
#include <rtdbg.h>
...
...
components/lwp/lwp_mem.c
浏览文件 @
1758f577
...
...
@@ -26,7 +26,7 @@
#include <lwp.h>
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[LWPMEM]
"
#define DBG_SECTION_NAME "
LWPMEM
"
#define DBG_COLOR
#define DBG_LEVEL DBG_WARNING
#include <rtdbg.h>
...
...
components/lwp/lwp_syscall.c
浏览文件 @
1758f577
...
...
@@ -27,7 +27,7 @@
#include <lwp_syscall.h>
#define DBG_ENABLE
#define DBG_SECTION_NAME "
[LWP_CALL]
"
#define DBG_SECTION_NAME "
LWP_CALL
"
#define DBG_COLOR
#define DBG_LEVEL DBG_WARNING
#include <rtdbg.h>
...
...
include/rtdbg.h
浏览文件 @
1758f577
...
...
@@ -32,7 +32,7 @@
* In your C/C++ file, enable/disable DEBUG_ENABLE macro, and then include this
* header file.
*
* #define DBG_SECTION_NAME "
[ MOD]
"
* #define DBG_SECTION_NAME "
MOD
"
* #define DBG_ENABLE // enable debug macro
* #define DBG_LEVEL DBG_INFO
* #include <rtdbg.h> // must after of DEBUG_ENABLE or some other options
...
...
@@ -81,10 +81,14 @@
* WHITE 37
*/
#ifdef DBG_COLOR
#define _DBG_COLOR(n) rt_kprintf("\033["#n"m")
#define _DBG_COLOR(n) rt_kprintf("\033["#n"m")
#define _DBG_LOG_HDR(lvl_name, color_n) \
rt_kprintf("\033["#color_n"m["lvl_name"/"DBG_SECTION_NAME"] ")
#else
#define _DBG_COLOR(n)
#endif
#define _DBG_LOG_HDR(lvl_name, color_n) \
rt_kprintf("["lvl_name"/"DBG_SECTION_NAME"] ")
#endif
/* DBG_COLOR */
/*
* static debug routine
...
...
@@ -94,12 +98,13 @@
{ \
switch(level) \
{ \
case DBG_ERROR: _DBG_COLOR(31); break; \
case DBG_WARNING: _DBG_COLOR(33); break; \
case DBG_INFO: _DBG_COLOR(32); break; \
case DBG_ERROR: _DBG_LOG_HDR("E", 31); break; \
case DBG_WARNING: _DBG_LOG_HDR("W", 33); break; \
case DBG_INFO: _DBG_LOG_HDR("I", 32); break; \
case DBG_LOG: _DBG_LOG_HDR("D", 0); break; \
default: break; \
} \
rt_kprintf(
DBG_SECTION_NAME fmt, ##__VA_ARGS__);
\
rt_kprintf(
fmt, ##__VA_ARGS__);
\
_DBG_COLOR(0); \
}
...
...
@@ -131,17 +136,21 @@
rt_kprintf("\n"); \
}
#define dbg_raw(...) rt_kprintf(__VA_ARGS__);
#else
#define dbg_log(level, fmt, ...)
#define dbg_here
#define dbg_enter
#define dbg_exit
#define dbg_log_line(level, ...)
#define dbg_raw(...)
#endif
#define LOG_D(...) dbg_log_line(DBG_LOG , __VA_ARGS__)
#define LOG_I(...) dbg_log_line(DBG_INFO , __VA_ARGS__)
#define LOG_W(...) dbg_log_line(DBG_WARNING, __VA_ARGS__)
#define LOG_E(...) dbg_log_line(DBG_ERROR , __VA_ARGS__)
#define LOG_RAW(...) dbg_raw(__VA_ARGS__)
#endif
/* RT_DBG_H__ */
src/signal.c
浏览文件 @
1758f577
...
...
@@ -35,7 +35,7 @@
#endif
// #define DBG_ENABLE
#define DBG_SECTION_NAME "
[SIGN]
"
#define DBG_SECTION_NAME "
SIGN
"
#define DBG_COLOR
#define DBG_LEVEL DBG_LOG
#include <rtdbg.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录