Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Compiler warnings for Snooze library

  1. #1

    Compiler warnings for Snooze library

    Hello,

    I use Arduino 1.6.5r5 and Teensyduino 1.42 (on Windows 10) and get following compiler warnings regarding used Snooze lib:


    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:396:0: warning: "LLWU_PE1_WUPE0" redefined
    #define LLWU_PE1_WUPE0(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE1_WUPE0_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1461:0: note: this is the location of the previous definition
    #define LLWU_PE1_WUPE0(n) ((uint8_t)((n) & 0x03)) // Wakeup Pin Enable For LLWU_P0
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:399:0: warning: "LLWU_PE1_WUPE1" redefined
    #define LLWU_PE1_WUPE1(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE1_WUPE1_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1462:0: note: this is the location of the previous definition
    #define LLWU_PE1_WUPE1(n) ((uint8_t)(((n) & 0x03) << 2)) // Wakeup Pin Enable For LLWU_P1
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:402:0: warning: "LLWU_PE1_WUPE2" redefined
    #define LLWU_PE1_WUPE2(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE1_WUPE2_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1463:0: note: this is the location of the previous definition
    #define LLWU_PE1_WUPE2(n) ((uint8_t)(((n) & 0x03) << 4)) // Wakeup Pin Enable For LLWU_P2
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:405:0: warning: "LLWU_PE1_WUPE3" redefined
    #define LLWU_PE1_WUPE3(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE1_WUPE3_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1464:0: note: this is the location of the previous definition
    #define LLWU_PE1_WUPE3(n) ((uint8_t)(((n) & 0x03) << 6)) // Wakeup Pin Enable For LLWU_P3
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:409:0: warning: "LLWU_PE2_WUPE4" redefined
    #define LLWU_PE2_WUPE4(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE2_WUPE4_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1466:0: note: this is the location of the previous definition
    #define LLWU_PE2_WUPE4(n) ((uint8_t)((n) & 0x03)) // Wakeup Pin Enable For LLWU_P4
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:412:0: warning: "LLWU_PE2_WUPE5" redefined
    #define LLWU_PE2_WUPE5(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE2_WUPE5_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1467:0: note: this is the location of the previous definition
    #define LLWU_PE2_WUPE5(n) ((uint8_t)(((n) & 0x03) << 2)) // Wakeup Pin Enable For LLWU_P5
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:415:0: warning: "LLWU_PE2_WUPE6" redefined
    #define LLWU_PE2_WUPE6(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE2_WUPE6_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1468:0: note: this is the location of the previous definition
    #define LLWU_PE2_WUPE6(n) ((uint8_t)(((n) & 0x03) << 4)) // Wakeup Pin Enable For LLWU_P6
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:418:0: warning: "LLWU_PE2_WUPE7" redefined
    #define LLWU_PE2_WUPE7(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE2_WUPE7_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1469:0: note: this is the location of the previous definition
    #define LLWU_PE2_WUPE7(n) ((uint8_t)(((n) & 0x03) << 6)) // Wakeup Pin Enable For LLWU_P7
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:422:0: warning: "LLWU_PE3_WUPE8" redefined
    #define LLWU_PE3_WUPE8(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE3_WUPE8_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1471:0: note: this is the location of the previous definition
    #define LLWU_PE3_WUPE8(n) ((uint8_t)((n) & 0x03)) // Wakeup Pin Enable For LLWU_P8
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:425:0: warning: "LLWU_PE3_WUPE9" redefined
    #define LLWU_PE3_WUPE9(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE3_WUPE9_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1472:0: note: this is the location of the previous definition
    #define LLWU_PE3_WUPE9(n) ((uint8_t)(((n) & 0x03) << 2)) // Wakeup Pin Enable For LLWU_P9
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:428:0: warning: "LLWU_PE3_WUPE10" redefined
    #define LLWU_PE3_WUPE10(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE3_WUPE10_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1473:0: note: this is the location of the previous definition
    #define LLWU_PE3_WUPE10(n) ((uint8_t)(((n) & 0x03) << 4)) // Wakeup Pin Enable For LLWU_P10
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:431:0: warning: "LLWU_PE3_WUPE11" redefined
    #define LLWU_PE3_WUPE11(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE3_WUPE11_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1474:0: note: this is the location of the previous definition
    #define LLWU_PE3_WUPE11(n) ((uint8_t)(((n) & 0x03) << 6)) // Wakeup Pin Enable For LLWU_P11
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:435:0: warning: "LLWU_PE4_WUPE12" redefined
    #define LLWU_PE4_WUPE12(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE4_WUPE12_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1476:0: note: this is the location of the previous definition
    #define LLWU_PE4_WUPE12(n) ((uint8_t)((n) & 0x03)) // Wakeup Pin Enable For LLWU_P12
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:438:0: warning: "LLWU_PE4_WUPE13" redefined
    #define LLWU_PE4_WUPE13(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE4_WUPE13_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1477:0: note: this is the location of the previous definition
    #define LLWU_PE4_WUPE13(n) ((uint8_t)(((n) & 0x03) << 2)) // Wakeup Pin Enable For LLWU_P13
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:441:0: warning: "LLWU_PE4_WUPE14" redefined
    #define LLWU_PE4_WUPE14(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE4_WUPE14_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1478:0: note: this is the location of the previous definition
    #define LLWU_PE4_WUPE14(n) ((uint8_t)(((n) & 0x03) << 4)) // Wakeup Pin Enable For LLWU_P14
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:11:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\kinetis_ext.h:444:0: warning: "LLWU_PE4_WUPE15" redefined
    #define LLWU_PE4_WUPE15(x) ((uint8_t)(((uint8_t)(x))<<LLWU_PE4_WUPE15_SHIFT))
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1479:0: note: this is the location of the previous definition
    #define LLWU_PE4_WUPE15(n) ((uint8_t)(((n) & 0x03) << 6)) // Wakeup Pin Enable For LLWU_P15


    It seems there are double definitions.
    Paul can you check this please and give advice how to react.


    Thanks and best regards

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,413
    Maybe help if you mentioned/included what source files are actually giving you these errors and for what processor...

    I tried building the example button_hold_wakeup and I did not see such warnings....

    However sleep_usb_serial (T3.6) failed to build:
    s
    Code:
    leep_usb_serial: In function 'void loop()':
    sleep_usb_serial:60: error: 'time' was not declared in this scope
       while (!Serial && time < 1000) {

  3. #3
    It is on teensy 3.2.

    Source files are unfortunatly to huge to post here.

    Another strange behavior is, I get this warnings if I complile only the fist time after starting ARDUNIO.

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,413
    Note: I am not sure what is going on? With your error messages:
    Code:
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.h:10:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze \utility\mcg.c:18:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:1479:0: note: this is the location of the previous definition
    #define LLWU_PE4_WUPE15(n) ((uint8_t)(((n) & 0x03) << 6)) // Wakeup Pin Enable For LLWU_P15
    Example this last one... On my machine the files: ...teensy\avr\libraries\Snooze \utility\mcg.h and \teensy\avr\libraries\Snooze \utility\mcg.c

    Do not exist. Wondering if maybe they are some detritus from some previous releases? Not sure how far back? I did not see these files either up on:
    https://github.com/duff2013/Snooze/tree/master/utility

    As for first time only.... There is probably a message saying it is using the previously built library... on subsequent builds.

    What would I do in cases like this? I would probably delete the Teensy install and then reinstall with latest release... Or as a test install Arduino 1.8.5 at some other directory and then install Teensyduino over that install and see if there are any differences.

  5. #5
    Example this last one... On my machine the files: ...teensy\avr\libraries\Snooze \utility\mcg.h and \teensy\avr\libraries\Snooze \utility\mcg.c

    Do not exist. Wondering if maybe they are some detritus from some previous releases? Not sure how far back? I did not see these files either up on:
    https://github.com/duff2013/Snooze/tree/master/utility
    I think you are right with this.
    I will delete and reinstall Tennsyduino.

    Thanks

  6. #6
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    969
    Quote Originally Posted by larry_berlin View Post
    I think you are right with this.
    I will delete and reinstall Tennsyduino.

    Thanks
    Can you also install the latest Snooze(v6.3.2) -> https://github.com/duff2013/Snooze

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •