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

Thread: arduino compile error

  1. #1
    Junior Member
    Join Date
    Jun 2016
    Posts
    2

    arduino compile error

    anybody know this:

    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:3315:52: error: expression cannot be used as a function
    #define CMT_CMD3 (*(volatile uint8_t *)0x40062008) // CMT Modulator Data Register Space High
    ^
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\IRremoteInt.h:523:2: note: in expansion of macro 'CMT_CMD3'
    CMT_CMD3 = 0; \
    ^
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp:120:2: note: in expansion of macro 'TIMER_CONFIG_NORMAL'
    TIMER_CONFIG_NORMAL();

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,108
    Which version of the Arduino IDE? Which version of Teensyduino? Which Teensy? Which version of the IRremote library (the versions I have do not have an irRecv.cpp file in them)?
    Post your code.

    Pete

  3. #3
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,665
    Perhaps something downloaded from Github, the "-master" in the name indicates this..
    booker, pls give us the link. With minimal-info, we can not help.

  4. #4
    Junior Member
    Join Date
    Jun 2016
    Posts
    2

    Angry Board: Teensy 3.2 arduino 1.65 Teensy Loader 1.28,

    Quote Originally Posted by Frank B View Post
    Perhaps something downloaded from Github, the "-master" in the name indicates this..
    booker, pls give us the link. With minimal-info, we can not help.
    Teensy 2.0 ++ worken. but Teensy 3.2 cant.

    https://github.com/z3t0/Arduino-IRremote

    C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=128 -DARDUINO=10605 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Users\booker\Documents\Arduino\libraries\Ardui no-IRremote-master r:\TEMP\build314569609374591732.tmp\IRrecord.cpp -o r:\TEMP\build314569609374591732.tmp\IRrecord.cpp.o
    IRrecord.ino: In function 'void storeCode(decode_results*)':
    IRrecord.ino:48:7: warning: unused variable 'count' [-Wunused-variable]
    C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=128 -DARDUINO=10605 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Users\booker\Documents\Arduino\libraries\Ardui no-IRremote-master -IC:\Users\booker\Documents\Arduino\libraries\Ardui no-IRremote-master\utility C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irPronto.cpp -o r:\TEMP\build314569609374591732.tmp\IRremote\irPro nto.cpp.o
    C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=128 -DARDUINO=10605 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Users\booker\Documents\Arduino\libraries\Ardui no-IRremote-master -IC:\Users\booker\Documents\Arduino\libraries\Ardui no-IRremote-master\utility C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp -o r:\TEMP\build314569609374591732.tmp\IRremote\irRec v.cpp.o
    In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:34:0,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:33,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:15,
    from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
    from C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\IRremoteInt.h:24,
    from C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\IRremote.h:24,
    from C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp:1:
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp: In member function 'void IRrecv::enableIRIn()':
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:3315:52: error: expression cannot be used as a function
    #define CMT_CMD3 (*(volatile uint8_t *)0x40062008) // CMT Modulator Data Register Space High
    ^
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\IRremoteInt.h:524:2: note: in expansion of macro 'CMT_CMD3'
    CMT_CMD3 = 0; \
    ^
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp:120:2: note: in expansion of macro 'TIMER_CONFIG_NORMAL'
    TIMER_CONFIG_NORMAL();
    ^
    In file included from C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\IRremote.h:24:0,
    from C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp:1:
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\IRremoteInt.h:473:10: warning: unused variable 'tmp' [-Wunused-variable]
    uint8_t tmp = CMT_MSC; \
    ^
    C:\Users\booker\Documents\Arduino\libraries\Arduin o-IRremote-master\irRecv.cpp:125:2: note: in expansion of macro 'TIMER_RESET'
    TIMER_RESET;
    ^
    Error compiling.

  5. #5
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,665
    Ok..

    and why don't you use the version that comes with teensyduino ?
    Just delete your downloaded library and try the examples of irremote that come with the installer..

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,173
    If anyone's still watching this thread, I've fixed the IRremote errors and added support for any clock speed 8 MHz or higher. Things should now work with 72 MHz speed.

    https://github.com/PaulStoffregen/Arduino-IRremote

    Please let me know how this works for you, if you try it?

Posting Permissions

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