SylixOS 内核调试

xiaoxiao2021-02-28  41

1、printk()是最常用的,可以在内核态中打印响应调试信息;

2、部分内核代码中无法使用printk()打印信息时就需要用到_DebugFormat(),申明如下:

_DebugFormat(level, fmt, ...)

level可选值如下:

#define __LOGMESSAGE_LEVEL          0x1                                 /*  系统运行状态信息            */ #define __ERRORMESSAGE_LEVEL        0x2                                 /*  系统故障信息                */ #define __BUGMESSAGE_LEVEL          0x4                                 /*  操作系统 BUG 信息           */

#define __PRINTMESSAGE_LEVEL        0x8                                 /*  直接打印输出信息            */

#define __ALL_LEVEL                 0xf                                 /*  所有类型                    */

_DebugFormat可向串口或屏幕打印调试信息

 

3、VOID  bspDebugMsg (CPCHAR  pcMsg)

转载请注明原文地址: https://www.6miu.com/read-2632725.html

最新回复(0)