[En-Nut-Discussion] WinAVR-20080512 -- same error as 20080411

Thiago A. Corrêa thiago.correa at gmail.com
Wed May 21 16:23:24 CEST 2008


Hi Ole,

   It seams avrlibc defines it as (my simplification):

/* Define internal _SLEEP_MODE_MASK that is no longer public in avrlibc. */
#ifndef _SLEEP_MODE_MASK
#if defined(SM) && !defined(SM0) && !defined(SM1) && !defined(SM2)

#define _SLEEP_MODE_MASK _BV(SM)

#elif !defined(SM) && defined(SM0) && defined(SM1) && !defined(SM2)

#define _SLEEP_MODE_MASK (_BV(SM0) | _BV(SM1))

#elif !defined(SM) && defined(SM0) && defined(SM1) && defined(SM2)

#define _SLEEP_MODE_MASK (_BV(SM0) | _BV(SM1) | _BV(SM2))

#endif
#endif


Perhaps we should use that instead in gcc.h
Looks like _SLEEP_MODE_MASK is still in avrlibc, excet that it's no
longer public. I guess the only clean solution would be to either push
for a get_sleep_mode in avrlibc mailling list or implement one
ourselfs.

On Tue, May 20, 2008 at 5:43 PM, Ole Reinhardt
<ole.reinhardt at embedded-it.de> wrote:
> Hi,
>
>> Running XP (sp3) on a P4 2.8 Ghz, 504 MB RAM.  Installed WinAVR-20080512.  Trying to compile Ethernut-4.4.1 with ethernut21b.conf using WinAVR.
>> I also get the _SLEEP_MODE_MASK undeclared error.
>
> I added the following line to include/arch/avr/gcc.h:
>
> #ifndef _SLEEP_MODE_MASK
> #define _SLEEP_MODE_MASK  (~(_BV(SM0) | _BV(SM1) | _BV(SM2)))
> #endif
>
> This is only a dirty hack. Better one should know how this mask is named
> in newer avrlibc versions. Up to know I don't know a better solution :/
>
> Regards,
>
> Ole Reinhardt
>
>
> --
>  _____________________________________________________________
> |                                                             |
> | Embedded-IT          Hard- und Softwarelösungen             |
> |                                                             |
> | Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
> | Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
> | 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
> | Germany              Web:         http://www.embedded-it.de |
> |                      UstID / VAT:       DE198944716         |
> |_____________________________________________________________|
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>



More information about the En-Nut-Discussion mailing list