谢谢各位的关注。
WINCE500\PLATFORM\smdk2440\KERNEL\HAL目录下的debug.c文件下是这样的
#define NODEBUG 0 //close UART1 used as dbug ouput. add by lyc 2007/1/12
void OEMInitDebugSerial(void)
{
volatile UART1reg *s2440UART1 = (UART1reg *)UART1_BASE;
volatile IOPreg *s2440IOP = (IOPreg *)IOP_BASE;
#if NODEBUG // add by lyc 2007/1/12
return;
#endif
// UART1 (TXD1 & RXD1) used for debug serial.
//
// Configure port H for UART.
//440IOP->rGPHCON &= ~((3 << 8) | (3 << 10)); // Configure GPH2 and GHP3 for UART1 Tx and Rx, respectively.
s2440IOP->rGPHCON |= ((2 << 8) | (2 << 10)); //
s2440IOP->rGPHUP |= (1 << 4) | (1 << 5); // Disable pull-up on TXD1 and RXD1.
// Configure UART.
//
s2440UART1->rUFCON = 0x0; // Disable the FIFO (TODO: do we need to enable the FIFO?)
s2440UART1->rUMCON = 0x0; // Disable AFC.
s2440UART1->rULCON = 0x3; // Normal mode, N81.
s2440UART1->rUCON = 0x245; // Rx pulse interrupt, Tx level interrupt, Rx error status interrupt enabled.
s2440UART1->rUBRDIV = ( (int)(S2440PCLK/16.0/UART1BaudRate + 0.5) -1 ); // Set up baudrate (38400).
}
刚刚发现volatile UART1reg *s2440UART1 = (UART1reg *)UART1_BASE;中的“UART1_BASE”应为“UART0_BASE”,但我改为“UART0_BASE”重新编译后既然没有办法进入桌面。现在更加郁闷了。