How do I redirect debug messages to the serial port? (debugging 91c96 lan ISR routines on pxa255, PB 4.2)

WinCE_Newbie_at_no_email.com
Date: 12/17/04


Date: Fri, 17 Dec 2004 16:34:21 -0500

I'm modifying the SMSC 91c96 driver for our custom pxa255 board. I'd
like to get some debug information out of the ISR routines. There's
only one ethernet chip on the board, so I have to use the serial port
for printing debug information. The hardware design is based on the
Intel Lubbock board. Debugging over the ethernet/vmini link has been
working for other hardware/driver features.

I'm trying to find a way to either redirect the RETAILMSG/DEBUGMSG
text output, or just send text debug messages to the Xscale serial
port. I've been googling and reading for the past few days and haven't
found a working solution yet.

I have a serial cable that I've tested that works with ActiveSync. The
bootloader menu I/O also works with the cable and HyperTerminal. The
driver is the 91c96 driver from SMSC dated March 2003.

Here is what I've tried, based on previous posts in this newsgroup (a
Google search of Groups of microsoft.public.windowsce.platbuilder):

1) Retail Build with KITL turned off. Someone reported that the debug
messages would be redirected to the serial port if KITL was disabled.
I tried this with HyperTerminal set to a variety of baud rates, but no
serial text appeared. HyperTerminal was initially set to 38,400 N-8-1,
no hardware flow control. Were those the right settings for what the
Kernel debugger sets the serial port to? Do I need to make another
call to set up the serial port for debug message output?

2) Debug Build with KITL turned off, Kernel Debugging turned off (and
in a later build, turned on). No serial text appeared. I also tried
OutputDebugString("Serial Output Test") with this build and nothing
appeared on the serial port.

3) Debug Build with KITL turned off, Kernel Debugging turned off (and
in a later buld, turned on) with the following registry settings in
Platform.reg:

[HKEY_LOCAL_MACHINE\Drivers\Console]
    "OutputTo"=dword:1 ;; Redirects CMD to COM1
    "COMSpeed"=dword:9600 ;; Speed of serial connection
(38,400bps, dword is in hex)

No serial output in that case either. That looked like something meant
for x86, but I thought I'd try it.

4) There was a suggestion to include the ethernet debugging libraries
into the build, to expose the serial debug routines. What .lib files
should be included if I were to try this? I assume they'd be included
in platform.bib. Would that be correct?
 I tried to use EdbgOutputDebugString and OEMWriteDebugString but not
surprisingly the IDE reported unresolved external link errors.

Does anyone have a working method of printing out debug information
from an ISR over the Xscale serial port?

Thanks in advance.



Relevant Pages

  • Re: ethernet driver debugging
    ... on my board we have only one ethernet port.the serial port is used ... and kernel debugger enabled to dubug the ethernet driver. ... what apllication can i write to debug the ethernet driver. ...
    (microsoft.public.windowsce.embedded)
  • Debugging over serial port in CE6?
    ... debug over the serial port vs. the ethernet? ... options and I've booted up a debug variant from USB flash. ... However, these instructions indicate debugging over ethernet, but I think ... Platform Builder just sits idly while trying to connect to target. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Ecos, LwIP, PPP and GPRS
    ... the modem has an IP stack built in. ... FTP is the most important right now. ... >>while printing the messages over another serial port. ... >Can you modify the debug output to go to a memory buffer instead of the ...
    (comp.arch.embedded)
  • Re: COM3 on X86 Platfom
    ... registry and match the BIOS. ... Are you using a serial port for debug? ... I checked them with a registry ... Build a debug image and set a breakpoint in the Init function of the ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Serial port Debug messages
    ... It isn't necessarily so common that you would want debug output going to a ... So of course if opening the serial port changes the baud ... then the debug port will not work as desired. ... The debug output uses OEMWriteDebugString, ...
    (microsoft.public.windowsce.platbuilder)