PDA

View Full Version : arduino compile error



bookerh
06-02-2016, 03:55 PM
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();

el_supremo
06-02-2016, 04:14 PM
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

Frank B
06-02-2016, 04:20 PM
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.

bookerh
06-30-2016, 03:42 PM
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.

Frank B
06-30-2016, 10:07 PM
Ok..

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

PaulStoffregen
08-01-2016, 03:17 PM
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?