[Top][All Lists]

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

Fw: [avr-gcc-list] sleep mode error on SM bit

From: Ezio Balbo
Subject: Fw: [avr-gcc-list] sleep mode error on SM bit
Date: Wed, 25 Jun 2003 15:42:03 +0200

Hi Eric,

Thanks to your help,

This is the copiler output from the linux pc:

avr-g++ -g -Wall -fno-exceptions -Os -mmcu=at90s8515    -c -o main.o main.c
main.c: In function `void shutdown()':
main.c:323: error: `SM0' undeclared (first use this function)
main.c:323: error: (Each undeclared identifier is reported only once for
   function it appears in.)
main.c:323: error: `SM1' undeclared (first use this function)
main.c:323: error: `SM2' undeclared (first use this function)
main.c:323: error: parse error before `;' token
main.c:324: error: parse error before `)' token
main.c: At global scope:
main.c:325: error: parse error before `}' token
make: *** [main.o] Error 1
make: Target `all' not remade because of errors.

Compilation exited abnormally with code 2 at Tue Jun 24 23:51:50

and this is the compiler output from the win pc:

avr-g++ -g -Wall -fno-exceptions -Os -mmcu=at90s8515    -c -o main.o main.c
avr-g++ -g -Wall -fno-exceptions -Os -mmcu=at90s8515  -Wl,-Map,main.map -o
main.elf main.o
avr-objdump -h -S main.elf > main.lst
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-objcopy -j .text -j .data -O binary main.elf main.bin
avr-objcopy -j .text -j .data -O srec main.elf main.srec
avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex main.elf
avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O binary main.elf
avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O srec main.elf

> Process Exit Code: 0

My function shutdown():

void shutdown(void)
   VDD_off(); // switch off only the RF device
   io_close(); // configure pin I/O for power down
   enable_external_int (0x80); // enable start switch

in the /usr/avr/include/avr directory
the file sleep.h is not the lastest cvs, but v1.5
/*$Id: sleep.h,v 1.5 2003/01/21 06:16:56 troth Exp $*/

In the WinAVR-20030424 istallation package the  header file is version v1.6
/* $Id: sleep.h,v 1.6 2003/04/07 21:55:17 troth Exp $ */



----- Original Message ----- 
From: <address@hidden>
To: "Ezio Balbo" <address@hidden>; <address@hidden>
Sent: Monday, June 23, 2003 5:38 PM
Subject: Re: [avr-gcc-list] sleep mode error on SM bit

> > Hi,
> > 
> > I have istalled on a linux-mandrake all the rpms binary 
> packages in
> > /usr/avr
> > from http://savannah.nongnu.org/download/avr-
> libc/snapshots/
> > 
> >   a.. avr-binutils- 
> >   b.. avr-gcc-c++- 
> >   c.. avr-gcc- 
> >   d.. avr-libc-docs-20030512cvs-1.i386.rpm 
> >   e.. avr-libc-20030512cvs-1.i386.rpm 
> > and WinAVR-20030424-bin-install on a windows based pc from
> > http://sourceforge.net/project/showfiles.php?
> group_id=68108&release_id=> 155082
> > 
> > In the main file I call the function
> > "set_sleep_mode(SLEEP_MODE_PWR_DOWN)"
> > 
> > ( avr-g++ -g -Wall -fno-exceptions -Os -
> mmcu=at90s8515    -c -o main.o
> > main.c )
> > 
> > I see a compiler error only on the linux pc like this: SM 
> not defined.
> > Can anyone halp me?
> > 
> > Thanks   
> I've verified that the io8515.h file in the current avr-
> libc CVS has the right definitions for the SM and SE bits 
> for the MCUCR register. The sleep.h file in the avr-libc 
> CVS seems to be correct from looking over it, although I 
> haven't tested it myself.
> Could you post the actual compiler output and the code 
> you're using that produces the error?
> And Ted Roth, perhaps you can comment on this? Thanks.
> Eric
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list

reply via email to

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