Kitl 中output debug message的function : KITLOutputDebugString( ),
定义在
PUBLIC\COMMON\OAK\INC\e_to_k.h:
#define KITLOutputDebugString EdbgOutputDebugString
而 EdbgOutputDebugString, implement在
PLATFORM\COMMON\BOOT\BLCOMMON\format.c
就是一般的format printing,最终输出是呼叫 OEMWriteDebugByte( )。

这个function 就要每个platform 自己implement了,所以是在OAL中:
OAL\debug.c
这个对底层的string output function 就像一般的embedded system, putchar( )一样,
用最基本的polling 方式output string:
while(TX_NOT_EMPTY);
TX = outchar;
.但是为了怕有时候用来作output的serial port有其它用途 (通常不会友好结果 ),所以整个 OEMWriteDebugByte( ) 内部用#ifdef 包围起来。

OAL\debug.c 内含
• InitDebug
• ReadDebug
• WriteDebug
InitDebug 在对应的hardware (UART) 的 PowerOn, BSPPowerOn function 中呼叫。

所以要改变debug output channel,要修改 oal\debug 的这几个function,还要将InitDebug( )放到该channel hardware 启动的地方,和 BSP PowerOn 的地方。



by [url=http://realchecko.blogspot.com]http://realchecko.blogspot.com[/url]

posted on 2007-12-07 23:46  WindowsCE  阅读(712)  评论(0编辑  收藏  举报