首页 > 其他 > 详细

u-boot 2011.09 开启debug 调试

时间:2016-10-08 13:28:34      阅读:112      评论:0      收藏:0      [点我收藏+]

 

以前做过,现在刚才又想不起来了,这个错误非常的严重。

在这里记一下。

debug 调试信息的开启在 include/common.h

有如下宏定义:

 1 #ifdef  DEBUG                                                                   
 2 #define debug(fmt,args...)  printf (fmt ,##args)                                
 3 #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);         
 4 #else                                                                           
 5 #define debug(fmt,args...)                                                      
 6 #define debugX(level,fmt,args...)                                               
 7 #endif  /* DEBUG */                                                             
 8                                                                                 
 9 #ifdef DEBUG                                                                    
10 # define _DEBUG 1                                                               
11 #else                                                                           
12 # define _DEBUG 0                                                               
13 #endif                                    

 

 

所以,我们如果想开启u-boot  的debug 调试信息,只需要在这里加一个宏定义:

#define DEBUG

 

到此,我们u-boot 的debug 调试信息开启。

 

u-boot 2011.09 开启debug 调试

原文:http://www.cnblogs.com/chenfulin5/p/5938029.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!