u-boot 2011.09 開啟debug 調試


 

以前做過,現在剛才又想不起來了,這個錯誤非常的嚴重。

在這里記一下。

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 調試信息開啟。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM