This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about the consoles input and read from modem


You originally said your board has 2 serial ports, you could
use one for the GDB connection and the other for input.
You need to include the hardware device driver for the
port you want to use for input, but not for the debug port.

Failing that you can use an Ethernet port for your GDB
connection and free up both serial ports - that's the way
I use my board all the time.  You will need to build a
version of RedBoot with the networking enabled for this
though.

Not sure about using JTAG, I've never tried it.  I think
a search through the message archive should answer this
question though.

Chris

----- Original Message ----- 
From: "xiaoyan wang" <wang_xiaoyan79@yahoo.com>
To: "Andrew Lunn" <andrew.lunn@ascom.ch>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Wednesday, November 27, 2002 2:24 AM
Subject: [ECOS] about the consoles input and read from modem


> Can I use JTEG or Internet to debug and use the serial
> port to input? 
> 
> Do you know anything about the read() function? does
> the eCos support the read() function? it is included
> in unistd.h. In my application code, the processor can
> write to but can not read from the modem. 
> 
> I used read as:
> char *bufPtr;
> char buffer[255];  
> int fd;      
> read(fd, bufPtr, buffer + sizeof(buffer) - bufPtr - 1)
> 
> Thank you for your help.
> Wxy
> 
> --- Andrew Lunn <andrew.lunn@ascom.ch> wrote:
> > You cannot use the serial port for both gdb and
> > serial input to
> > application code.
> > 
> > You either need to use another serial port, or not
> > use gdb. Which
> > ever, use the proper serial driver, not the HAL diag
> > driver.
> > 
> >       Andrew
> > 
> > On Tue, Nov 26, 2002 at 05:14:36AM -0800, xiaoyan
> > wang wrote:
> > > Hi,
> > > I am doing the programming on eCos.But now I need
> > to
> > > input something, I can not find where to input.
> > The
> > > consoles window can not input anything.
> > > 
> > > i use ARM7, one serial port is for remote module,
> > the
> > > other is for debug. When I ran command
> > arm-elf-gdb,
> > > the debug window will be opened. the consoles
> > window
> > > will show the "gdb>",I just can read the "printf"
> > and
> > > can not use "scanf" or "getchar" to input here.
> > Could
> > > you tell me how to input from consoles window?
> > > 
> > > Could you please kindly help me? I am very very
> > > appreciated.
> > > 
> > > 
> > > 
> > > Best Regards
> > > Wang xiaoyan
> > > 
> > > 
> > > 
> > > 
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > now.
> > > http://mailplus.yahoo.com
> > > 
> > > -- 
> > > Before posting, please read the FAQ:
> > http://sources.redhat.com/fom/ecos
> > > and search the list archive:
> > http://sources.redhat.com/ml/ecos-discuss
> > > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> -- 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> 

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]