[En-Nut-Discussion] Runtime library dependencies
harald.kipp at egnite.de
Fri Sep 28 14:50:03 CEST 2012
On 28.09.2012 14:03, Uwe Bonnes wrote:
> _delay_loop_2 is implemented in avr-libc/include/util/delay_basic.h like
> _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
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
Which one is reasonable?
This email is without line breaks, following
Is this the format you have problems with?
More information about the En-Nut-Discussion