[Top][All Lists]

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

Re: [avr-libc-dev] malloc bug ?

From: Theodore A. Roth
Subject: Re: [avr-libc-dev] malloc bug ?
Date: Mon, 9 Sep 2002 08:50:07 -0700 (PDT)

On Mon, 9 Sep 2002, Joerg Wunsch wrote:

:) As daniel_laptop wrote:
:) > > I think you're right.  Instead, we should probably just include
:) > > <avr/io.h>, and use (char *)SP instead.
:) > Will avr/io.h work in this file (compiled for all divice versions) ?
:) Alas, it doesn't.  While this file is compiled four times for the
:) various devices, this is done using the generic device model name
:) (-mavr2 etc.), which doesn't cause any <avr/ioXXX.h> to be included.
:) Maybe we should add fallback definitions for SP/SPL/SPH and SREG at
:) the end of <avr/io.h>?  Their register numbers are (so far ;-) the
:) same across the entire AVR device line.  I agree with Ted that
:) hardcoding register numbers inside source files is just evil.

One thing I'd like to see happen is the moving of macros common to all
devices into <avr/io.h> instead of duplicating them in all the
<avr/ioXXX.h> files. This would make adding new devices a little less
tedious I think. I started to do this back before the savannah repo was
up, but the patch got way to big and ugly. If we do this, I'd really like
to see lots of small, easily reviewable patches than one big honking

Ted Roth

reply via email to

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