[En-Nut-Discussion] Runtime library dependencies

Harald Kipp harald.kipp at egnite.de
Fri Sep 28 14:50:03 CEST 2012


Hi Uwe,

On 28.09.2012 14:03, Uwe Bonnes wrote:
 
> _delay_loop_2 is implemented in avr-libc/include/util/delay_basic.h like
> void
> _delay_loop_2(uint16_t __count)
> {
>         __asm__ volatile (
>                 "1: sbiw %0,1" "\n\t"
>                 "brne 1b"
>                 : "=w" (__count)
>                 : "0" (__count)
>         );
> }
> 
> can we perhaps pull that code in, so we resolve the avr-libc dependacy? Or
> somebody clean-room reimplement it if the avr-libc license doesn't fit? Or
> we ask Marek Michalkiewicz and Joerg Wunsch for another license?

Btw. I was recently surprised reading the BSD license in avr-libc. From memory it had been LPGL. Was I wrong or did they change the license?

> Such a small and clean delay loop reliefs us from a lot of #ifdef cruft....

I agree, but you overlook, that it's not just a question of the run time lib. Inline assembly is highly compiler specific too. Anyway, it's so simple that it should be easily ported even to compilers like ImageCraft, where inline assembly is poorly supported.


> What headers does ImageCraft provide? I think recent changes (by me) also
> depend on a lot of probably avr-libc specific 

The main problem was, that you used

#ifdef __AVR__

instead of

#ifdef __AVR_LIBC_VERSION__

in os/timer.c. I fixed that.


> B.t.w: Can you ask you mailer to break the lines resonable?

I can do both, with or without line breaks. Thanks to

http://addons.mozilla.org/de/thunderbird/addon/toggle-word-wrap/

Which one is reasonable?

This email is without line breaks, following

http://stuff.mit.edu/afs/sipb/contrib/linux/Documentation/email-clients.txt

Is this the format you have problems with?

Regards,

Harald




More information about the En-Nut-Discussion mailing list