bugAVR C Runtime Library - Bugs: bug #35197, sleep.h _BV defined as __BV in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35197: sleep.h _BV defined as __BV in AT90S8515 section

Submitter:  Bingo <bingo>
Submitted:  Fri 30 Dec 2011 09:56:47 AM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  libc code
Status:  Fixed Assigned to:  None
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.1 Fixed Release:  None

Mon 16 Jan 2012 11:44:53 AM UTC, comment #1: 

Thanks!

Dmitry Xmelkov <dmix>
Group administrator
Fri 30 Dec 2011 09:56:47 AM UTC, original submission:  

In avr/sleep.h , below section , at line 209.
_BV is defined as __BV  (double underscore)


#elif defined(_AVR_AT90S2313_) \
|| defined(_AVR_AT90S2323_) \
|| defined(_AVR_AT90S2333_) \
|| defined(_AVR_AT90S2343_) \
|| defined(_AVR_AT43USB320_) \
|| defined(_AVR_AT43USB355_) \
|| defined(_AVR_AT90S4414_) \
|| defined(_AVR_AT90S4433_) \
|| defined(_AVR_AT90S8515_) \
|| defined(_AVR_ATtiny22_)

    #define SLEEP_MODE_IDLE         0
    #define SLEEP_MODE_PWR_DOWN     _BV(SM)

    #define set_sleep_mode(mode) \
    do { \
        _SLEEP_CONTROL_REG = ((_SLEEP_CONTROL_REG & ~__BV(SM)) | (mode)); \
    } while(0)


The __BV results in errors like this:

elm-chan/utctime/stime/test2.c:134: undefined
reference to `__BV'
collect2: ld returned 1 exit status
make: * [test2.elf] Error 1


/Bingo

Bingo <bingo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dmix (Posted a comment)
  • -email is unavailable- added by bingo (Submitted the item)
  •  

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-16 dmix CategoryLibrary Header
        StatusNone Fixed
        Percent Complete0% 100%
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code