avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Compiling avrdude 5.0 on OpenBSD 3.8


From: Joerg Wunsch
Subject: Re: [avrdude-dev] Compiling avrdude 5.0 on OpenBSD 3.8
Date: Wed, 7 Dec 2005 23:28:25 +0100
User-agent: Mutt/1.4.2.1i

As Doug Carter wrote:

> Anyone already done this?

Most likely not.

> After ./configure and during make I get errors probably related
> to missing a header file somewhere:

> avrdude-par.o(.text+0x46): In function `par_setpin':
> /home/dlc/d/avrdude-5.0/par.c:93: undefined reference to
> `ppi_set'

Well, up to avrdude 5.0, the parallel port support really wasn't
configurable.  Basically, it could only compiled on systems it has
been designed for.

I've recently changed that.  The major reason for the change was that
someone asked for Solaris support.  As it wasn't so obvious to me
whether parallel bit-banging on Solaris would be an easy thing to do,
I rather concentrated on the remaining programmer options, and made
parallel port support a configuration option.  It now defaults to
being enabled if your system is known to support it, and to disabled
for unknown systems (so at least the remainder will compile).

So if you'd pick the version from CVS, it should at least compile for
OpenBSD.

Incidentally, I later on got curious about Solaris' ecpp driver, and
managed to support that one as well for parallel bit-banging.


As Eric Weddington wrote:

> There is a regular maintainer of the toolchain for the *FreeBSD*
> platform, Joerg Wunsch.

Oh, avrdude is about the only thing I do *not* maintain. ;-)  Brian
Dean is a long-standing FreeBSD contributor and committer as well,
so he maintains that one himself.

> If you take a look at par.c: ...  at the top of the file, right
> after the set of include files, is a conditional compilation section
> that includes a file depending on which platform is being used to
> build for.

Well, it might take a bit more than just a header file.  That largely
depends on how OpenBSD would handle that kind of requests.  (Remember,
there's no standard that would cover bit-level access to the parallel
port under Unix, so everyone seems to develop their own method.
Before anyone complains about those poor Unixes, there's not even an
option for doing it without being granted full IO port access rights
under Win32.  For the Unixes we support, there's at least native
operating system driver support for bit-level parallel port access, so
no direct IO privileges are needed.)

The way Linux and FreeBSD handle it (by a separate device node,
/dev/ppi* under FreeBSD, /dev/parport* under Linux) is basically the
same, so they share almost the same code in avrdude.  Solaris' ecpp
uses an ioctl on top of the standard parallel-port driver (which is
also used for printing), so I had to restructure the parallel port
code quite a bit to get that supported; it's been more than ``just
crafting the correct header file''.  No idea what OpenBSD might offer
here.  If they offer something at all, chances are good it fits into
one of these models.  If not: don't hesitate to rewrite portions of
the code to make it fit if you're interested in that.  Just submit a
patch to the patch tracker afterwards.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]