This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Proper Thread Environment (was Re: SPI usage)
- From: Chuck McManis <ecos at mcmanis dot com>
- To: ECOS Discussion Group <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 28 Feb 2007 22:09:04 -0800
- Subject: Re: [ECOS] Proper Thread Environment (was Re: [ECOS] SPI usage)
- References: <F7620004260C5D4DB836EDBF8CC6872D2FDAA1@neptune.intra.eiaj.ch> <45E2F53A.7090403@mlbassoc.com> <6.1.2.0.2.20070226203615.0447f8b8@192.168.110.40> <45E41ECA.8010405@mlbassoc.com>
Hmm, I'm getting closer, kind of.
At 04:06 AM 2/27/2007, Gary Thomas wrote:
> Your problem is not with the form of your code; it's fine.
The problem has to do with the console device. The default console
device is the debug device, normally provided by RedBoot via the
virtual vector interface. This interface is not interrupt driven,
thus when you ask to read from it, everything comes to a grinding
halt. To avoid this, you need to set up your console stream to
an interrupt driven device, which will require enabling the appropriate
serial driver.
So after much trial and tribulation (why would ANYONE layout a 10 pin IDC
connector for a 9 pin serial port with pin 1 - 1, 2-2, 3-3, etc. It makes
using off the shelf IDC connectors impossible!) I've got a second serial
port on my box that I can talk to.
So how do I make *that* stdin/stdout (or their equivalent) for my
application? I'd like to maintain the flexibility of having the Redboot
serial port which I can connect to and run GDB on.
The documentation for the serial driver is not much help, I'm looking in
the C-library documentation at the moment but if someone knows off the top
of their head, please let me know...
--Chuck
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss