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

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

Re: [avr-gcc-list] Releasing an installer of avrgcc3.2 on AVRfreaks.net


From: Marek Michalkiewicz
Subject: Re: [avr-gcc-list] Releasing an installer of avrgcc3.2 on AVRfreaks.net
Date: Tue, 25 Jun 2002 20:23:59 +0200 (CEST)

Hi,

> 2 Floating Point library (libm) does not work if loaded above 64K, this
> because it uses LPM instructions for tables which are also loaded above
> 64K.

Good to know, I'll look into it (should be easy - tables should be in
the .progmem section which is loaded at low addresses (not .text).

> 3. There's a bug in AVRGCC when you have a lot of local variables (R28
> register gets overwritten), this combined with a sizable piece of code.
> (The bug is not easily reproduced.)

If you mean r29, I fixed this in CVS, also in 3.0.x and 3.1.x branches
(as it's a serious bug, and difficult to track down).

> 4. The __ELPM_enhanced__ macro in "INA90.h" for some reason does not
> want to compile. As I recall, some sort of asm error.

I think I'll change it so that the user is responsible for loading RAMPZ,
and the macro is just like "lpm" except it uses "elpm" instead.  The "v"
instead of "r" (typo) is fixed in current avr-libc.

> 5. Be very careful with function pointers to absolute addresses, the
> compiler has the habit of halving your address.

Necessary to fit a pointer in 16 bits on 128K devices, and instructions
are word-aligned anyway.  Not really a bug, just a caveat...

> #define wdt_enable(timeout)                           \
>       __asm__ __volatile__ (                          \
>               "in __tmp_reg__, __SREG__" "\n\t"       \
>               "cli" "\n\t"                            \
>               "wdr" "\n\t"                            \
>               "out %1, %0" "\n\t"                     \
>               "out %1, %0" "\n\t"                     \
>               "out __SREG__, __tmp_reg__" "\n\t"      \
>               : /* no outputs */                      \
>               : "r" ((uint8_t)((timeout) | BV(WDE) |
> BV(WDCE))),   \
>                 "I" (WDTCR)                           \
>               : "r0"                                  \
>       )

If I read the datasheet correctly, the first write to WDTCR must be
done with the WDCE bit set, but the second one with WDCE cleared.

> 3. As far as I understand, this one was reported somehwere in February
> and was fixed. (on the Linux release)

Not just Linux - fixed in the source :)

> I would suggest it's better to apply these changes to the original
> releases (not the AVRfreaks build only)

Agreed - thanks for testing and reporting bugs.

Marek

avr-gcc-list at http://avr1.org



reply via email to

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