You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to compile IRrecvDumpV3 with Espressif Arduino 3.0.0 alpha is generating this compile errors
The Timer API has changed. Arduino 3.0.0 is based on IDF 5.1. We (Tasmota crew) tried to adopt to the new API
It does compile, but it seems there are now timing issues. The recognition result are terrible.
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In function 'void gpio_intr()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:218:10: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
218 | params.rawlen++;
| ~~~~~~~^~~~~~
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:362:21: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
362 | timer = timerBegin(_timer_num, 80, true);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:84,
from /Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
from /Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.h:10,
from /Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:6:
/Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-timer.h:35:14: note: declared here
35 | hw_timer_t * timerBegin(uint32_t frequency);
| ^~~~~~~~~~
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:371:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
371 | timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE);
| ^~~~~~~~~~~~~~~
| timerWrite
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())'
375 | timerAttachInterrupt(timer, &read_timeout, false);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/hans/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t * timer, void (*userFunc)(void));
| ^~~~~~~~~~~~~~~~~~~~
Compiling .pio/build/esp32dev/lib0e3/src/IRutils.cpp.o
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::disableIRIn()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::pause()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:416:3: error: 'gpio_intr_disable' was not declared in this scope; did you mean 'esp_intr_disable'?
416 | gpio_intr_disable((gpio_num_t)params.recvpin);
| ^~~~~~~~~~~~~~~~~
| esp_intr_disable
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::resume()':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
Archiving .pio/build/esp32dev/libcbb/libESPmDNS.a
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:430:3: error: 'gpio_intr_enable' was not declared in this scope; did you mean 'esp_intr_enable'?
430 | gpio_intr_enable((gpio_num_t)params.recvpin);
| ^~~~~~~~~~~~~~~~
| esp_intr_enable
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::crudeNoiseFilter(decode_results*, uint16_t)':
/Volumes/T7-Mac/IRremoteESP8266/src/IRrecv.cpp:506:37: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
506 | results->rawbuf[offset - 1] += addition;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
Indexing .pio/build/esp32dev/libcbb/libESPmDNS.a
*** [.pio/build/esp32dev/lib0e3/src/IRrecv.cpp.o] Error 1
@tonhuisman Platform 2023.10.10 uses the code base of Arduino 3.0.0 alpha1 release.
Every other(platform) builds before are not relevant. The are WiP builds and do not align with anything official.
Platform 2023.10.03 is NOT Arduino 3.0.0! it is Arduino core 2.0.14
@tonhuisman Now the fun starts, it does compile now with your open PR. Try to receive something.
EDIT: Does not work. Crashes. In earlier build it did not crash. So more work
Not sure if that's to blame on my work, as I just copied the mods made at Tasmota 😄
It crashes at calling timerAlarm, so I'd expect that to crash on Tasmota as well when using Arduinoe 3.0, but as Tasmota is still using Arduino 2,0.14 it'll probably work as before...
It crashes with Tasmota too. Earlier WiP builds (before alpha1) did not crash.
Don't know if the introduced a bug or more changes where done which needs adopting.
But the non crashing are not useable either since most of the time decoding fails.
Ground work / investigation needs to be done.
I've applied the latest fixes by @s-hadinger and also added an extra NULL-check so it won't crash and burn when disableIRIn() is called multiple times.
I'm also getting the same error on the ESP32 38-pin Development Board. Is there any update regarding this issue? What should I do? Could you please guide me on this problem?
In function 'void gpio_intr()':
error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm
In member function 'void IRrecv::enableIRIn(bool)':
error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
362 | timer = timerBegin(_timer_num, 80, true);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
note: declared here
35 | hw_timer_t *timerBegin(uint32_t frequency);
| ^~~~~~~~~~
error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
371 | timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE);
| ^~~~~~~~~~~~~~~
| timerWrite
error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())'
375 | timerAttachInterrupt(timer, &read_timeout, false);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
| ^~~~~~~~~~~~~~~~~~~~
In member function 'void IRrecv::disableIRIn()':
error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
In member function 'void IRrecv::pause()':
error: 'gpio_intr_disable' was not declared in this scope; did you mean 'esp_intr_disable'?
416 | gpio_intr_disable((gpio_num_t)params.recvpin);
| ^~~~~~~~~~~~~~~~~
| esp_intr_disable
In member function 'void IRrecv::resume()':
error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
error: 'gpio_intr_enable' was not declared in this scope; did you mean 'esp_intr_enable'?
430 | gpio_intr_enable((gpio_num_t)params.recvpin);
| ^~~~~~~~~~~~~~~~
| esp_intr_enable
Using library IRremoteESP8266 at version 2.8.6
exit status 1
Compilation error: exit status 1
I tested #2040 (maybe I should have gone with the smaller/simpler #2144?). But I can confirm that #2040 works great with my ESP32S3 and Arduino esp32 3.1.0.
If #2144 is better for me to provide feedback, I'm happy to test that one also.
i am using arduino 2.3.6 and IRremoteESP8266 v2.8.6 but it show the same error:
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In function 'void gpio_intr()':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:362:21: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
362 | timer = timerBegin(_timer_num, 80, true);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/esp32-hal.h:98,
from C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/Arduino.h:45,
from c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.h:10,
from c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:6:
C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~~~~~
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:371:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
371 | timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE);
| ^~~~~~~~~~~~~~~
| timerWrite
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void (*)())'
375 | timerAttachInterrupt(timer, &read_timeout, false);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::disableIRIn()':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::resume()':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
You will need the source code from this PR to successfully compile with Arduino 3.x / IDF 5.x.
Please read back earlier comments (some may be slightly hidden) on what to do, it's been mentioned a few times before... 🤔
Activity
NiKiZe commentedon Oct 6, 2023
Can you be more specific? What exactly don't work?
Jason2866 commentedon Oct 7, 2023
Trying to compile
IRrecvDumpV3
with Espressif Arduino 3.0.0 alpha is generating this compile errorsThe Timer API has changed. Arduino 3.0.0 is based on IDF 5.1. We (Tasmota crew) tried to adopt to the new API
It does compile, but it seems there are now timing issues. The recognition result are terrible.
Jason2866 commentedon Oct 7, 2023
I made a Platform to use Arduino 3.0.0 alpha1 with Platformio. Just use this for esp32 devices
tonhuisman commentedon Oct 7, 2023
The compilation issues above are already solved in the Tasmota
development
branch and I'm working on patching these in #2040Not yet testing with hardware, just 'making it work' first 😅
tonhuisman commentedon Oct 7, 2023
The
gpio_intr_enable
andgpio_intr_disable
issues are with the 2023.10.10 platform release, and don't occur when using 2023.10.03.Jason2866 commentedon Oct 7, 2023
@tonhuisman Platform 2023.10.10 uses the code base of Arduino 3.0.0 alpha1 release.
Every other(platform) builds before are not relevant. The are WiP builds and do not align with anything official.
Platform 2023.10.03 is NOT Arduino 3.0.0! it is Arduino core 2.0.14
Jason2866 commentedon Oct 7, 2023
@tonhuisman Now the fun starts, it does compile now with your open PR. Try to receive something.
EDIT: Does not work. Crashes. In earlier build it did not crash. So more work
tonhuisman commentedon Oct 7, 2023
Not sure if that's to blame on my work, as I just copied the mods made at Tasmota 😄
It crashes at calling
timerAlarm
, so I'd expect that to crash on Tasmota as well when using Arduinoe 3.0, but as Tasmota is still using Arduino 2,0.14 it'll probably work as before...Jason2866 commentedon Oct 7, 2023
It crashes with Tasmota too. Earlier WiP builds (before alpha1) did not crash.
Don't know if the introduced a bug or more changes where done which needs adopting.
But the non crashing are not useable either since most of the time decoding fails.
Ground work / investigation needs to be done.
s-hadinger commentedon Nov 1, 2023
I have fixed the crash and the timer issues here arendst/Tasmota#19904
tonhuisman commentedon Nov 1, 2023
Thanks!
I'll apply those changes in my PR soon.
tonhuisman commentedon Nov 2, 2023
I've applied the latest fixes by @s-hadinger and also added an extra NULL-check so it won't crash and burn when
disableIRIn()
is called multiple times.avinashboy commentedon May 30, 2024
I'm also getting the same error on the ESP32 38-pin Development Board. Is there any update regarding this issue? What should I do? Could you please guide me on this problem?
30 remaining items
quicksketch commentedon Jan 2, 2025
I tested #2040 (maybe I should have gone with the smaller/simpler #2144?). But I can confirm that #2040 works great with my ESP32S3 and Arduino esp32 3.1.0.
If #2144 is better for me to provide feedback, I'm happy to test that one also.
EgHubs commentedon Mar 15, 2025
Is there any update on this?
2lian commentedon Mar 20, 2025
I runing this branch on my Xiao ESP32-C6 , it works. Thanks!
I'll report back if there are any issues.
AdarWa commentedon Apr 10, 2025
@2lian
How did you manage to get it working with the ESP32-C6 XIAO?
Would you mind sharing your platformio.ini?
carlos0810 commentedon Apr 10, 2025
i am using arduino 2.3.6 and IRremoteESP8266 v2.8.6 but it show the same error:
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In function 'void gpio_intr()':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:246:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
246 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:362:21: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
362 | timer = timerBegin(_timer_num, 80, true);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/esp32-hal.h:98,
from C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/Arduino.h:45,
from c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.h:10,
from c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:6:
C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~~~~~
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:371:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
371 | timerAlarmWrite(timer, MS_TO_USEC(params.timeout), ONCE);
| ^~~~~~~~~~~~~~~
| timerWrite
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:375:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void (*)())'
375 | timerAttachInterrupt(timer, &read_timeout, false);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\mypc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
| ^~~~~~~~~~~~~~~~~~~~
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::disableIRIn()':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:401:3: error: 'timerAlarmDisable' was not declared in this scope
401 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp: In member function 'void IRrecv::resume()':
c:\Users\mypc\Documents\Arduino\libraries\IRremoteESP8266\src\IRrecv.cpp:429:3: error: 'timerAlarmDisable' was not declared in this scope
429 | timerAlarmDisable(timer);
| ^~~~~~~~~~~~~~~~~
tonhuisman commentedon Apr 11, 2025
You will need the source code from this PR to successfully compile with Arduino 3.x / IDF 5.x.
Please read back earlier comments (some may be slightly hidden) on what to do, it's been mentioned a few times before... 🤔