Re: Debug serial port



Hi Bruce,

I met the same problem as Dongquan.Z. and i am using a XScale PXA255 as
well. i modified the settings what you mentioned, but it seemed that the
serial port still couldn't be used when i tried to make a connection to an
external modem in windows ce. there is no debug message output from winCE via
the hyperterminal if i connect the board to PC's hyperterminal. it seems that
the serial port has been closed. am i right?

btw, Dongquan.Z, have you solved it as what Bruce said?

Many thanks!

Best regards,

Shu Wei

"Bruce Eitman (eMVP)" wrote:

> Looking at the XSC1BD BSP, you just need to define PRODUCT_SERIAL_ENABLED to
> disable serial debug output. Yes, that seems backward but what it does is
> enable the standard serial port and disable the debug port. You define
> PRODUCT_SERIAL_ENABLED by clearing the environment variable BSP_NOSERIAL
>
> set BSP_NOSERIAL=
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
>
> "Dongquan.Z" <dongquan@xxxxxxxxxxxxxxxxx> wrote in message
> news:eXslq58%23EHA.2192@xxxxxxxxxxxxxxxxxxxxxxx
> > The following is the code from the debug.c file:
> >
> >
> > void OEMInitDebugSerialKernel (void)
> > {
> > volatile GEN_UART *pDebugUartPort;
> > PDRIVER_GLOBALS pDriverGlobals;
> > volatile GPIO_REGS *pGPIO_REGS;
> > static BOOL DebugEtherPresent;
> >
> > pDriverGlobals =
> (PDRIVER_GLOBALS)DRIVER_GLOBALS_PHYSICAL_MEMORY_START;
> > pDebugUartPort=(volatile GEN_UART *)DEBUG_PORT_ADDRESS;
> > pGPIO_REGS = (volatile GPIO_REGS *)GPIO_BASE_U_VIRTUAL;
> >
> > //
> > // This UART initialization needs to be tested...
> > //
> > // Ensuring UART and interrupts are off before configuring
> > // even though LCR and IER reset values are 0x0.
> > pDebugUartPort->lcr = 0x0; // clearing DLAB
> > pDebugUartPort->ier_dlh = 0x0; // IER_DLH = 0x0
> >
> > // Set the Baud Rate (Divisor low = DEBUG_BAUD_38400)
> > // Divisor latches are at offsets 0 and 1, which are
> > // receive/transmit data and ier registers.
> > pDebugUartPort->lcr = 0x80; // Access Divisor
> > pDebugUartPort->thr_rbr_dll = DEBUG_BAUD_38400; // low byte divisor
> > pDebugUartPort->ier_dlh = 0x00; // high byte divisor
> > pDebugUartPort->lcr = 0x0; // clearing DLAB
> >
> > //Setting UART properties to 8N1
> > pDebugUartPort->lcr = 0x3; // 8 bits, 1 stop, no parity. Also
> > LCR DLAB bit = 0
> >
> > pDebugUartPort->iir_fcr=0x01; // Enable FIFO
> > pDebugUartPort->iir_fcr=0x07; // Clear Rx,Tx FIFOs
> >
> > // Don't enable UART, place in polled mode
> > // UART is not enabled till GPIO pins are configured also.
> > // We don't have to configure INTC_REGS to use IRQ and enable
> interrupt
> > // as UART is used in polling mode only.
> > pDebugUartPort->ier_dlh = 0x0;
> >
> > //Ensuring loop back test mode is off
> > //even though MCR reset value is 0x0.
> > pDebugUartPort->mcr = 0x0; //UART is in normal mode.
> >
> >
> > // Configuring GPIO pins for FFUART
> > if(DEBUG_PORT_ADDRESS == FFUART_BASE_U_VIRTUAL)
> > {
> > //Initialize GPIO pins
> > //Write 0 on GPIO pins 39, 40 and 41 before configuring them as
> > outputs.
> > pGPIO_REGS->GPCR_y |= (GPIO_39 | GPIO_40 | GPIO_41);
> >
> > //Configure direction of GPIO pins 34, 35, 36, 37 and 38 as input
> > //and GPIO pins 39, 40 and 41 as output
> > pGPIO_REGS->GPDR_y &= (~GPIO_34 & ~GPIO_35 & ~GPIO_36 & ~GPIO_37 &
> > ~GPIO_38);
> > pGPIO_REGS->GPDR_y |= (GPIO_39 | GPIO_40 | GPIO_41);
> >
> > //Configure GPIO pins 34, 35, 36, 37 and 38 for Alt_fn1. And pins
> > 39, 40 and 41 for Alt_fn2.
> > pGPIO_REGS->GAFR0_y |= ( GPIO_34_AF1_FFRXD | GPIO_35_AF1_CTS |
> > GPIO_36_AF1_DCD |
> > GPIO_37_AF1_DSR | GPIO_38_AF1_RI |
> > GPIO_39_AF2_FFTXD | GPIO_40_AF2_DTR |
> > GPIO_41_AF2_RTS);
> > }
> > else if(DEBUG_PORT_ADDRESS == BTUART_BASE_U_VIRTUAL)
> > {
> > //Configuring GPIO pins for BTUART
> > //Initialize GPIO pins
> > //Write 0 on GPIO pins 43 and 45 before configuring them as outputs.
> > pGPIO_REGS->GPSR_y |= (GPIO_43 | GPIO_45);
> >
> > //Configure direction of GPIO pins 42 and 44 as input
> > //and GPIO pins 43 and 45 as output
> > pGPIO_REGS->GPDR_y &= (~GPIO_42 & ~GPIO_44);
> > pGPIO_REGS->GPDR_y |= (GPIO_43 | GPIO_45);
> >
> > //Configure GPIO pins 42 and 44 for Alt_fn1. And pins 43 and 45 for
> > Alt_fn2.
> > pGPIO_REGS->GAFR0_y |= ( GPIO_42_AF1_BTRXD | GPIO_44_AF1_CTS |
> > GPIO_43_AF2_BTTXD | GPIO_45_AF2_RTS);
> > }
> >
> > //UART is enabled here
> > pDebugUartPort->ier_dlh = 0x40; //Enabling UART
> >
> > } // OEMInitDebugSerialKernel ()
> >
> >
> > void OEMInitDebugSerial(void)
> > {
> >
> >
> > // Do the real work. Separated out so that output is not forced on
> > resume.
> > // We don't want to change state.
> >
> >
> > OEMInitDebugSerialKernel ();
> >
> > OEMWriteDebugString(TEXT("\r\n"));
> >
> OEMWriteDebugString(TEXT("**************************************************
> ****\r\n"));
> >
> OEMWriteDebugString(TEXT("**************************************************
> ****\r\n"));
> >
> OEMWriteDebugString(TEXT("**************************************************
> ****\r\n"));
> >
> OEMWriteDebugString(TEXT("**************************************************
> ****\r\n"));
> >
> OEMWriteDebugString(TEXT("**************************************************
> ****\r\n"));
> > OEMWriteDebugString(TEXT(DEBUG_OUT_STRING));
> >
> > } // OEMInitDebugSerial()
> >
> >
> > I modified the following code line:
> >
> > //UART is enabled here
> > pDebugUartPort->ier_dlh = 0x40; //Enabling UART
> >
> > to
> >
> > //UART is enabled here
> > pDebugUartPort->ier_dlh = 0x0; //Enabling UART
> >
> > but the ce system can not boot,and the PB output window display:
> >
> > Waiting for connecting to the kernal debuger!
> >
> >
> > Please help me!
> >
> >
> > Thanks
> >
> >
> >
> > "Bruce Eitman (eMVP)" <beitmannospam@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> дÈëÏûÏ¢ÐÂÎÅ:Ob%23QHbk%23EHA.2180@xxxxxxxxxxxxxxxxxxxxxxx
> > > Pretty much the same way. That link shows two things to do:
> > >
> > > 1. Turn off using the UART in the kernel (look for debug.c)
> > > 2. Add the com port into the registry so that users can access it.
> > >
> > > It is your platform, you can do this any way that meets your needs. You
> > > could do it based on an environment variable/macro, hard code it ...
> > >
> > > --
> > > Bruce Eitman (eMVP)
> > > Senior Engineer
> > > beitman AT applieddata DOT net
> > >
> > > Applied Data Systems
> > > www.applieddata.net
> > > An ISO 9001:2000 Registered Company
> > > Microsoft WEP Gold-level Member
> > >
> > >
> > > "Dongquan.Z" <dongquan@xxxxxxxxxxxxxxxxx> wrote in message
> > > news:uAPXpsd%23EHA.3368@xxxxxxxxxxxxxxxxxxxxxxx
> > >> Thank you very much!
> > >>
> > >> But, My platform is a Xscale PXA255£¬for such a platform, How to
> disable
> > > the
> > >> debug serial port?
> > >>
> > >>
> > >>
> > >> Best Regards!
> > >>
> > >>
> > >> "Bill T" <btheisen@xxxxxxxx>
> > > дÈëÏûÏ¢ÐÂÎÅ:%23uRvNQ06EHA.2572@xxxxxxxxxxxxxxxxxxxxxxx
> > >> > Check out this link:
> > >> >
> > >
> http://msdn.microsoft.com/embedded/community/community/tips/ce/disable/default.aspx
> > >> >
> > >> > "Dongquan.Z" <dongquan@xxxxxxxxxxxxxxxxx> wrote in message
> > >> > news:e1gNckv6EHA.1452@xxxxxxxxxxxxxxxxxxxxxxx
> > >> >> Hi, Everyone
> > >> >>
> > >> >> How to modify the OAL codes to make the serial port can't be used by
> > > the
> > >> >> kernal.
> > >> >>
> > >> >> I want to make the Serial Port COM1 as a headless device's output!
> > >> >>
> > >> >>
> > >> >> Thanks
> > >> >>
> > >> >> Dongquan.Z
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>
>
.



Relevant Pages

  • Re: disable debug messages coming on serial port
    ... Are you connected via serial for debugging? ... beitman AT applieddata DOT net ... Applied Data Systems ... > I want to keep debugging on but want to use serial port for my ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Debug serial port
    ... it made USB occupy the serial port. ... dial-up prgram via the modem, ... >> void OEMInitDebugSerialKernel ... >>> beitman AT applieddata DOT net ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Creating a Workspace from the Command-Line
    ... beitman AT applieddata DOT net ... Applied Data Systems ... you run CEBUILD, the platform project will be rebuilt from clean. ... Wince ARMV4I Test CCX9C Development Environment for SA ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Creating a Workspace from the Command-Line
    ... beitman AT applieddata DOT net ... Applied Data Systems ... The platform you are trying use was last used in conjunction ... Wince ARMV4I Test CCX9C Development Environment for SA ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Serial Programming trouble
    ... You want to also flag that with O_NONBLOCK. ... Closes the serial port ... void close_port{ ... void send_string(char* sp, int* fd) ...
    (comp.os.linux.misc)

Quantcast