avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc pat


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750
Date: Tue, 6 Sep 2005 15:33:31 +0200
User-agent: Mutt/1.4.2.1i

As Bernard Fouché wrote:

(about [not] malloc()ing the FP conversion buffer)

> >Of course, if there's consensus among the users that this is not
> >needed, and an additional 40 bytes on the stack are no big deal for
> >the floating-point versions, we could easily drop that completely, and
> >always allocate the buffer on the stack.

> Looking at malloc compiled code, it seems that malloc.c needs 6
> bytes of .data (reported by avr-size) and will use also 2 bytes on
> the stack when called (two registers pushed). So the net loss is
> only 32 bytes when the floating point buffer is allocated from the
> stack. ...

> I would drop the call 
> to malloc/free.

OK.

> >I agree there'd better be macros for this, but how to name them?
> >
> >#define _FDEV_ERR (-1)
> >#define _FDEV_EOF (-2)
> >
> >Sounds OK?

> Since they start with '_', no problem

> >...  But you're right, the initializer macro
> >you've been been proposing also has some merit, so I'll add that one,
> >too.

> its main merit is to save flash space if there is __do_copy_data().

Sure.  I added FDEV_SETUP_STREAM().

> I like all these changes, now what about the other users?

I've update the doc preview

http://www.sax.de/~joerg/avr-libc-user-manual/

twidemo has now also been changed to use the new stdio interface.  I
also ran some basic test cases that prove this is all working.

-- 
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]