Menu

Compilation error

2025-08-28
2025-08-29
  • Thomas Westerhoff

    I usually use Arduino IDE 2.x. I downloaded 1.8.19 specifically for this project and installed it in parallel.
    I installed the libraries as described in the instructions. However, I am still getting a compiler error. How can I resolve this?

    C:\Users\tho52849\Documents\Arduino\VSKFocuser\myfp2esp32_318\driver_board.cpp: In member function 'void DRIVER_BOARD::initmove(bool, long int)':
    driver_board.cpp:976:25: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
      976 |   movetimer = timerBegin(1, 80, true);
          |               ~~~~~~~~~~^~~~~~~~~~~~~
    In file included from C:\Users\tho52849\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0\cores\esp32/esp32-hal.h:98,
                     from C:\Users\tho52849\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0\cores\esp32/Arduino.h:44,
                     from C:\Users\tho52849\Documents\Arduino\VSKFocuser\myfp2esp32_318\driver_board.cpp:61:
    C:\Users\tho52849\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
       35 | hw_timer_t *timerBegin(uint32_t frequency);
          |             ^~~~~~~~~~
    driver_board.cpp:978:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t*, void (*)())'
      978 |   timerAttachInterrupt(movetimer, &onTimer, true);
          |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\tho52849\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
       50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
          |      ^~~~~~~~~~~~~~~~~~~~
    driver_board.cpp:983:3: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
      983 |   timerAlarmWrite(movetimer, curspd, true);
          |   ^~~~~~~~~~~~~~~
          |   timerWrite
    driver_board.cpp:984:3: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
      984 |   timerAlarmEnable(movetimer);
          |   ^~~~~~~~~~~~~~~~
          |   timerAlarm
    C:\Users\tho52849\Documents\Arduino\VSKFocuser\myfp2esp32_318\driver_board.cpp: In member function 'void DRIVER_BOARD::end_move()':
    driver_board.cpp:1084:3: error: 'timerAlarmDisable' was not declared in this scope
     1084 |   timerAlarmDisable(movetimer);
          |   ^~~~~~~~~~~~~~~~~
    Mehrere Bibliotheken wurden für "WiFiServer.h" gefunden
     Benutzt: C:\Users\tho52849\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0\libraries\WiFi
     Nicht benutzt: C:\Users\tho52849\AppData\Local\Programs\Arduino IDE 1.8.19\libraries\WiFi
    exit status 1
    too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
    
     
  • brownrb

    brownrb - 2025-08-29

    C:\Users\tho52849\Documents\Arduino\VSKFocuser\myfp2esp32_318\driver_board.cpp: In member function 'void DRIVER_BOARD::initmove(bool, long int)':
    driver_board.cpp:976:25: error: too many arguments to function 'hw_timer_t* timerBegin(uint32_t)'
    976 | movetimer = timerBegin(1, 80, true);

    You have the wrong esp32 core defined. You will need to remove that core and install an earlier version. What probably happened is that you got a message in Arduino IDE about new libraries or new xxxx, and you clicked "update" which then replaced everything with new versions

    regards
    Robert

    and avoid using the "Update" warning messsage box that Arduino IDE shows till you have the controller done and dusted.

     

Log in to post a comment.