IRMP-org / IRMP

Infrared Multi Protocol Decoder
GNU General Public License v3.0
267 stars 43 forks source link

Compile Fail with ESP32 core 3.x #94

Closed tweisberger closed 2 months ago

tweisberger commented 2 months ago

If you have handling problems or questions, consider to open a discussion https://github.com/IRMP-org/IRMP/discussions instead of an issue.

Bug Report

Board

IDE

IR-Protocol

Example to reproduce the issue

Version

Please delete all unchecked lines above :-)

Pin(s) used for IR-receive, if not default

Current behavior

Using any of the demos as is.

[...]
/Users/user/Documents/Arduino/libraries/IRMP/src/IRTimer.hpp:269:5: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
  269 |     timerAlarmEnable(sReceiveAndSendInterruptTimer);
      |     ^~~~~~~~~~~~~~~~
      |     timerAlarm
/Users/user/Documents/Arduino/libraries/IRMP/src/IRTimer.hpp: In function 'void disableIRTimerInterrupt()':
/Users/user/Documents/Arduino/libraries/IRMP/src/IRTimer.hpp:671:9: error: 'timerAlarmDisable' was not declared in this scope
  671 |         timerAlarmDisable(sReceiveAndSendInterruptTimer);
      |         ^~~~~~~~~~~~~~~~~
/Users/user/Documents/Arduino/libraries/IRMP/src/IRTimer.hpp: In function 'void enableIRTimerInterrupt()':
/Users/user/Documents/Arduino/libraries/IRMP/src/IRTimer.hpp:753:9: error: 'timerAlarmEnable' was not declared in this scope
  753 |         timerAlarmEnable(sReceiveAndSendInterruptTimer);
[...]

IRMP_compile_error.txt

Compilation failure

Expected behavior

Compiles and runs

Additional context

ArminJo commented 2 months ago

I cannot reproduce it

tweisberger commented 2 months ago

@ArminJo What version of the ESP32 core are you using?

For me: 3.0.0-rc1, in Arduino IDE 2.3.2

Using board 'lolin_s3_mini' from platform in folder: /Users/user/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0-rc1
Using core 'esp32' from platform in folder: /Users/user/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0-rc1

It works with ESP 8266, but not with ESP32. In IRTimer.hpp, line 265, there is a function call timerBegin(3, 80, true); This is an error, since function in the Arduino library: packages/esp32/hardware/esp32/3.0.0-rc1/cores/esp32/esp32-hal-timer.h:

hw_timer_t * timerBegin(uint32_t frequency);
tweisberger commented 2 months ago

This appears to be an issue when using the Espressif ESP32 3.0.0 core, I downgraded to 2.0.16, and it now works. I would argue that this is an issue for users using 3.0.0, which the Arduino IDE automatically selects, even though it is still in RC phase.