以前做過,現在剛才又想不起來了,這個錯誤非常的嚴重。
在這里記一下。
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 調試信息開啟。
