public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: Gary Thomas <gthomas@cygnus.co.uk>
Cc: ecos <ecos-discuss@sourceware.cygnus.com>,
	Jonathan Larmour <jlarmour@cygnus.co.uk>
Subject: Re: [ECOS] Ethernet and Serial drivers for Linux target?
Date: Thu, 11 Nov 1999 09:39:00 -0000	[thread overview]
Message-ID: <19991111113938.A29982@visi.com> (raw)
In-Reply-To: <XFMail.991111103157.gthomas@cygnus.co.uk>

On Thu, Nov 11, 1999 at 10:31:57AM -0700, Gary Thomas wrote:

[regarding writing eCos serial/ethernet drivers for Linux target] 

> >> > Has anybody done this?  I assume that all you have to do is to map
> >> > cyg_io_read() and cyg_io_write() into read() and write() calls, and
> >> > map cyg_io_get_config() and cyg_io_set_config() into appropriate
> >> > ioctl() calls?
> >> 
> >> One other issue that no-one else has mentioned is that you can't make calls
> >> to the system read() and write(), ioctl() etc. directly. To do that would
> >> involve linking with glibc, and that would simply not work.
> > 
> > I presume I could grab the source for Linux glibc read() write() and
> > ioctl(), strip out the stuff I don't need, and impliment my own
> > eCos-friendly versions of those calls...
> 
> There is a very simple mapping of functions onto the actual system calls.
> Beware of the glibc code though, it's full of macros that do all of this work :-)

Oh goody.  Macros are the most obsfucating things in most of the C
code I've ever worked on (though darned useful, they can easily get
out of control).  In my "spare time" I'll start looking at Linux
system calls and glibc source code.

> IMHO you should definitely stay away from touching the hardware.
> Let Linux do it for you.

Agreed. I'd like to be able to use several different types of serial
boards on the Linux target, and I really don't want to have to write a
new driver for each one.  The ARM target will be limited to just one
or two different types of UARTS.

-- 
Grant Edwards
Principal Engineer
Comtrol Corporation

  reply	other threads:[~1999-11-11  9:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-10 12:38 Grant Edwards
1999-11-10 16:40 ` Gary Thomas
1999-11-11  4:44 ` [ECOS] " Bart Veer
1999-11-11  9:10 ` [ECOS] " Jonathan Larmour
1999-11-11  9:23   ` Grant Edwards
1999-11-11  9:32     ` Gary Thomas
1999-11-11  9:39       ` Grant Edwards [this message]
1999-11-11  9:37     ` [ECOS] " Bart Veer
1999-11-11  9:45       ` Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19991111113938.A29982@visi.com \
    --to=grante@visi.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=gthomas@cygnus.co.uk \
    --cc=jlarmour@cygnus.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).