Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples for ESP32-SBC-FabGL don't compile (e.g. SpaceInvaders) - multiple errors #2

Closed
Andy2No opened this issue Jul 26, 2024 · 4 comments

Comments

@Andy2No
Copy link

Andy2No commented Jul 26, 2024

[ EDIT: This applies to the FabGL examples for the Olimex ESP32-SBC-FabGL in general. I gave details and an error log for the SpaceInvaders.ino example because that's the first one I tried. This also applies to the PC Emulator and related examples, which is specifically part of this repo rather than the Olimex FabGL repo:

https://github.com/OLIMEX/ESP32-SBC-FabGL/tree/main/SOFTWARE

Possibly the solution would be an update to the documentation, explaining how to compile these examples now that Espressif Systems ESP32 Arduino boards support v3.0.x has apparently broken compatibility. As mentioned below, I can see that uninstalling it, then installing v2.0.17 is an option, but I'm not clear what board/module type to choose in the Tools->Board menu, since specific support for the ESP32-SBC-FabGL board was only added in v3.0.x and was not present in v2.0.17. Anyone new to this product, and ESP32s in general, would face the same issue. ]

In trying to compile the SpaceInvaders FabGL example in Arduino 1.8.19, I get multiple errors. Possibly this is because it's not compatible with ESP Espessif board support v3.0.2, which is the current version.

I started trying to use the main FabGL library, having followed instructions to install that. I
realised earlier I should have been using Olimex's own fork (https://github.com/OLIMEX/FabGL/tree/master), so I installed that instead, but that hasn't got me any further.

In order to get the SpaceInvaders.ino example (https://github.com/OLIMEX/FabGL/tree/master/examples/VGA/SpaceInvaders) to compile past a certain point, I had to add some missing files, which I've taken from a pending pull request I found in the main FabGL library (now a year old) to add support for the ESP32-SBC-FabGL. I copied these files into the project folder:

wiiNunchuk.h, wiiNunchuk.cpp, CH32V003.h, CH32V003.cpp

I got them from here:

fdivitto/FabGL#338

I now get the errors below, which seem to suggest that your example and possibly FabGL fork aren't compatible with ESP 3.0.2 - and it seems neither is the main FabGL library. The one I bought came with SpaceInvaders isntalled, so I know it's possible, but I can't find any clues how to get it to compile, specifically which versions to use. I tried ESP v2.0.17 in the boards manager, but that removed support for the ESP32-SBC-FabGL board. I'm now wondering if it's still even possible to compile FabGL examples, justifying the FabGL part of the name.

Here are the error messages. Let me know if you need the full compilation log:

D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp: In function 'void fabgl::configureGPIO(gpio_num_t, gpio_mode_t)':
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:203:19: error: 'GPIO_PIN_MUX_REG' was not declared in this scope; did you mean 'GPIO_PIN19_REG'?
  203 |   PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
      |                   ^~~~~~~~~~~~~~~~
      |                   GPIO_PIN19_REG
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:203:43: error: 'PIN_FUNC_GPIO' was not declared in this scope
  203 |   PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
      |                                           ^~~~~~~~~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp: In member function 'void fabgl::uiApp::killTimer(fabgl::uiTimerHandle)':
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:948:50: error: invalid conversion from 'fabgl::uiTimerHandle' {aka 'void*'} to 'TimerHandle_t' {aka 'tmrTimerControl*'} [-fpermissive]
  948 |   auto dest = (uiEvtHandler *) pvTimerGetTimerID(handle);
      |                                                  ^~~~~~
      |                                                  |
      |                                                  fabgl::uiTimerHandle {aka void*}
In file included from D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:28:
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:395:47: note:   initializing argument 1 of 'void* pvTimerGetTimerID(TimerHandle_t)'
  395 | void * pvTimerGetTimerID( const TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;
      |                           ~~~~~~~~~~~~~~~~~~~~^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:44: error: no matching function for call to 'std::pair<fabgl::uiEvtHandler*, tmrTimerControl*>::pair(fabgl::uiEvtHandler*&, void*&)'
  949 |   m_timers.remove(uiTimerAssoc(dest, handle));
      |                                            ^
In file included from c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_algobase.h:64,
                 from c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\specfun.h:45,
                 from c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\cmath:1935,
                 from c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\math.h:36,
                 from C:\Users\andy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32/esp32-hal.h:30,
                 from C:\Users\andy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32/Arduino.h:36,
                 from D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.h:51,
                 from D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:34:
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:297:9: note: candidate: 'template<class _U1, class _U2>  requires  _S_constructible<_U1, _U2>() constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U2 = _U1; _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  297 |         pair(pair<_U1, _U2>&& __p)
      |         ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:297:9: note:   template argument deduction/substitution failed:
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:44: note:   mismatched types 'std::pair<_T1, _T2>' and 'fabgl::uiEvtHandler*'
  949 |   m_timers.remove(uiTimerAssoc(dest, handle));
      |                                            ^
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:288:9: note: candidate: 'template<class _U1, class _U2>  requires  _S_constructible<const _U1&, const _U2&>() constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U2 = _U1; _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  288 |         pair(const pair<_U1, _U2>& __p)
      |         ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:288:9: note:   template argument deduction/substitution failed:
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:44: note:   mismatched types 'const std::pair<_T1, _T2>' and 'fabgl::uiEvtHandler*'
  949 |   m_timers.remove(uiTimerAssoc(dest, handle));
      |                                            ^
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:279:9: note: candidate: 'template<class _U1, class _U2>  requires  _S_constructible<_U1, _U2>() constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U2 = _U1; _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  279 |         pair(_U1&& __x, _U2&& __y)
      |         ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:279:9: note:   template argument deduction/substitution failed:
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:279:9: note: constraints not satisfied
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h: In substitution of 'template<class _U1, class _U2>  requires  _S_constructible<_U1, _U2>() constexpr std::pair<fabgl::uiEvtHandler*, tmrTimerControl*>::pair(_U1&&, _U2&&) [with _U1 = fabgl::uiEvtHandler*; _U2 = tmrTimerControl*]':
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:44:   required from here
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:279:2:   required by the constraints of 'template<class _T1, class _T2> template<class _U1, class _U2>  requires  _S_constructible<_U1, _U2>() constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&)'
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:277:45: note: the expression '_S_constructible<_U1, _U2>() [with _U1 = fabgl::uiEvtHandler*&; _U2 = void*&; _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]' evaluated to 'false'
  277 |         requires (_S_constructible<_U1, _U2>())
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:217:9: note: candidate: 'template<class ... _Args1, unsigned int ..._Indexes1, class ... _Args2, unsigned int ..._Indexes2> constexpr std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {_Args1 ...}; unsigned int ..._Indexes1 = {_Indexes1 ...}; _Args2 = {_Args2 ...}; unsigned int ..._Indexes2 = {_Indexes2 ...}; _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  217 |         pair(tuple<_Args1...>&, tuple<_Args2...>&,
      |         ^~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:203:3: error: 'PIN_FUNC_SELECT' was not declared in this scope
  203 |   PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
      |   ^~~~~~~~~~~~~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:217:9: note:   template argument deduction/substitution failed:
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:44: note:   mismatched types 'std::tuple<_UTypes ...>' and 'fabgl::uiEvtHandler*'
  949 |   m_timers.remove(uiTimerAssoc(dest, handle));
      |                                            ^
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:200:9: note: candidate: 'template<class ... _Args1, class ... _Args2> constexpr std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>) [with _Args1 = {_Args1 ...}; _Args2 = {_Args2 ...}; _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  200 |         pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
      |         ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:200:9: note:   template argument deduction/substitution failed:
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:44: note:   mismatched types 'std::tuple<_UTypes ...>' and 'void*'
  949 |   m_timers.remove(uiTimerAssoc(dest, handle));
      |                                            ^
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:269:7: note: candidate: 'constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) requires  _S_constructible<const _T1&, const _T2&>() [with _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]' (near match)
  269 |       pair(const _T1& __x, const _T2& __y)
      |       ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:269:7: note:   conversion of argument 2 would be ill-formed:
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:949:38: error: invalid conversion from 'fabgl::uiTimerHandle' {aka 'void*'} to 'tmrTimerControl*' [-fpermissive]
  949 |   m_timers.remove(uiTimerAssoc(dest, handle));
      |                                      ^~~~~~
      |                                      |
      |                                      fabgl::uiTimerHandle {aka void*}
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:228:7: note: candidate: 'constexpr std::pair<_T1, _T2>::pair() requires (is_default_constructible_v<_T1>) && (is_default_constructible_v<_T2>) [with _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  228 |       pair()
      |       ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:228:7: note:   candidate expects 0 arguments, 2 provided
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:196:17: note: candidate: 'constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  196 |       constexpr pair(pair&&) = default;         ///< Move constructor
      |                 ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:196:17: note:   candidate expects 1 argument, 2 provided
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:195:17: note: candidate: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = fabgl::uiEvtHandler*; _T2 = tmrTimerControl*]'
  195 |       constexpr pair(const pair&) = default;    ///< Copy constructor
      |                 ^~~~
c:\users\andy\appdata\local\arduino15\packages\esp32\tools\esp-x32\2302\xtensa-esp32-elf\include\c++\12.2.0\bits\stl_pair.h:195:17: note:   candidate expects 1 argument, 2 provided
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:950:14: error: invalid conversion from 'fabgl::uiTimerHandle' {aka 'void*'} to 'TimerHandle_t' {aka 'tmrTimerControl*'} [-fpermissive]
  950 |   xTimerStop(handle, portMAX_DELAY);
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:558:29: note: in definition of macro 'xTimerStop'
  558 |     xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0U, NULL, ( xTicksToWait ) )
      |                             ^~~~~~
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:1344:48: note:   initializing argument 1 of 'BaseType_t xTimerGenericCommand(TimerHandle_t, BaseType_t, TickType_t, BaseType_t*, TickType_t)'
 1344 | BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
      |                                  ~~~~~~~~~~~~~~^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp: In static member function 'static bool fabgl::FileBrowser::format(fabgl::DriveType, int)':
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:1180:21: error: invalid conversion from 'int' to 'const esp_task_wdt_config_t*' [-fpermissive]
 1180 |   esp_task_wdt_init(45, false);
      |                     ^~
      |                     |
      |                     int
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:951:16: error: invalid conversion from 'fabgl::uiTimerHandle' {aka 'void*'} to 'TimerHandle_t' {aka 'tmrTimerControl*'} [-fpermissive]
  951 |   xTimerDelete(handle, portMAX_DELAY);
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:678:29: note: in definition of macro 'xTimerDelete'
  678 |     xTimerGenericCommand( ( xTimer ), tmrCOMMAND_DELETE, 0U, NULL, ( xTicksToWait ) )
      |                             ^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:1180:20: error: too many arguments to function 'esp_err_t esp_task_wdt_init(const esp_task_wdt_config_t*)'
 1180 |   esp_task_wdt_init(45, false);
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:39:
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/esp_system/include/esp_task_wdt.h:47:11: note: declared here
   47 | esp_err_t esp_task_wdt_init(const esp_task_wdt_config_t *config);
      |           ^~~~~~~~~~~~~~~~~
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:1344:48: note:   initializing argument 1 of 'BaseType_t xTimerGenericCommand(TimerHandle_t, BaseType_t, TickType_t, BaseType_t*, TickType_t)'
 1344 | BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
      |                                  ~~~~~~~~~~~~~~^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp: In member function 'void fabgl::uiApp::suspendCaret(bool)':
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:993:20: error: invalid conversion from 'fabgl::uiTimerHandle' {aka 'void*'} to 'TimerHandle_t' {aka 'tmrTimerControl*'} [-fpermissive]
  993 |         xTimerStop(m_caretTimer, 0);
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:558:29: note: in definition of macro 'xTimerStop'
  558 |     xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0U, NULL, ( xTicksToWait ) )
      |                             ^~~~~~
In file included from D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:33:
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/fatfs/src/ff.h:408:25: error: invalid conversion from 'int' to 'const MKFS_PARM*' [-fpermissive]
  408 | #define FM_ANY          0x07
      |                         ^~~~
      |                         |
      |                         int
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:1200:21: note: in expansion of macro 'FM_ANY'
 1200 |     if (f_mkfs(drv, FM_ANY, 16 * 1024, buffer, FF_MAX_SS) != FR_OK) {
      |                     ^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:1200:32: error: invalid conversion from 'int' to 'void*' [-fpermissive]
 1200 |     if (f_mkfs(drv, FM_ANY, 16 * 1024, buffer, FF_MAX_SS) != FR_OK) {
      |                             ~~~^~~~~~
      |                                |
      |                                int
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:1344:48: note:   initializing argument 1 of 'BaseType_t xTimerGenericCommand(TimerHandle_t, BaseType_t, TickType_t, BaseType_t*, TickType_t)'
 1344 | BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
      |                                  ~~~~~~~~~~~~~~^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:1200:40: error: invalid conversion from 'void*' to 'UINT' {aka 'unsigned int'} [-fpermissive]
 1200 |     if (f_mkfs(drv, FM_ANY, 16 * 1024, buffer, FF_MAX_SS) != FR_OK) {
      |                                        ^~~~~~
      |                                        |
      |                                        void*
D:\Documents\Arduino\libraries\FabGL-master\src\fabui.cpp:999:21: error: invalid conversion from 'fabgl::uiTimerHandle' {aka 'void*'} to 'TimerHandle_t' {aka 'tmrTimerControl*'} [-fpermissive]
  999 |         xTimerStart(m_caretTimer, 0);
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:515:29: note: in definition of macro 'xTimerStart'
  515 |     xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCount() ), NULL, ( xTicksToWait ) )
      |                             ^~~~~~
D:\Documents\Arduino\libraries\FabGL-master\src\fabutils.cpp:1200:15: error: too many arguments to function 'FRESULT f_mkfs(const TCHAR*, const MKFS_PARM*, void*, UINT)'
 1200 |     if (f_mkfs(drv, FM_ANY, 16 * 1024, buffer, FF_MAX_SS) != FR_OK) {
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h:1344:48: note:   initializing argument 1 of 'BaseType_t xTimerGenericCommand(TimerHandle_t, BaseType_t, TickType_t, BaseType_t*, TickType_t)'
 1344 | BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
      |                                  ~~~~~~~~~~~~~~^~~~~~
C:\Users\andy\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32/include/fatfs/src/ff.h:331:9: note: declared here
  331 | FRESULT f_mkfs (const TCHAR* path, const MKFS_PARM* opt, void* work, UINT len); /* Create a FAT volume */
      |         ^~~~~~
"C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2302/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/flags/cpp_flags" -w -Os -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_ESP32_SBC_FABGL -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_SBC_FABGL\"" "-DARDUINO_VARIANT=\"esp32-sbc-fabgl\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32-sbc-fabgl:JTAGAdapter=default,PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none,ZigbeeMode=default\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/flags/defines" "-ID:\\Documents\\Arduino\\^ESP_Olimex_ESP32-SBC-FabGL\\SpaceInvadersIncluded" -iprefix "C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/include/" "@C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/flags/includes" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/qio_qspi/include" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\cores\\esp32" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\esp32-sbc-fabgl" "-ID:\\Documents\\Arduino\\libraries\\FabGL-master\\src" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\SPI\\src" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\WiFi\\src" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\Network\\src" "@C:\\arduino-output/build_opt.h" "@C:\\arduino-output/file_opts" "D:\\Documents\\Arduino\\libraries\\FabGL-master\\src\\terminal.cpp" -o "C:\\arduino-output\\libraries\\FabGL-master\\terminal.cpp.o"
"C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2302/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/flags/cpp_flags" -w -Os -DF_CPU=240000000L -DARDUINO=10819 -DARDUINO_ESP32_SBC_FABGL -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_SBC_FABGL\"" "-DARDUINO_VARIANT=\"esp32-sbc-fabgl\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32-sbc-fabgl:JTAGAdapter=default,PSRAM=enabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none,ZigbeeMode=default\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/flags/defines" "-ID:\\Documents\\Arduino\\^ESP_Olimex_ESP32-SBC-FabGL\\SpaceInvadersIncluded" -iprefix "C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/include/" "@C:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/flags/includes" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32/qio_qspi/include" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\cores\\esp32" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\esp32-sbc-fabgl" "-ID:\\Documents\\Arduino\\libraries\\FabGL-master\\src" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\SPI\\src" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\WiFi\\src" "-IC:\\Users\\andy\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\Network\\src" "@C:\\arduino-output/build_opt.h" "@C:\\arduino-output/file_opts" "D:\\Documents\\Arduino\\libraries\\FabGL-master\\src\\terminfo.cpp" -o "C:\\arduino-output\\libraries\\FabGL-master\\terminfo.cpp.o"
Using library FabGL-master at version 1.0.9 in folder: D:\Documents\Arduino\libraries\FabGL-master 
Using library SPI at version 2.0.0 in folder: C:\Users\andy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\SPI 
Using library WiFi at version 2.0.0 in folder: C:\Users\andy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\WiFi 
Using library Network at version 1.0.0 in folder: C:\Users\andy\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Network 
exit status 1
Error compiling for board OLIMEX ESP32-SBC-FABGL.
@Andy2No Andy2No changed the title SpaceInvaders example for ESP32-SBC-FabGL doesn't compile - multiple errors Examples for ESP32-SBC-FabGL don't compile (e.g. SpaceInvaders) - multiple errors Aug 1, 2024
@DanKoloff
Copy link
Contributor

DanKoloff commented Aug 1, 2024

Did you stumble upon this:

https://olimex.wordpress.com/2023/08/01/esp32-sbc-fabgl-how-to-work-with-the-expander-module-gpios-from-fabgl-library-and-apps/

and then this:

https://github.com/MrSoxAndShoes/esp32-sbc-fabgl-quick-start

Use older version pre-3.0.0 and compile for generic ESP32 board from the selector, doesn't need to be ESP32-SBC-FabGL. As described in "5. Configure the board" here:

https://github.com/MrSoxAndShoes/esp32-sbc-fabgl-quick-start

Use the versions that MrSoxAndShoes used.

Also it is not clear if all examples worked, we've tested some of them, some of them might not have worked at all.

@Andy2No
Copy link
Author

Andy2No commented Aug 1, 2024

Thanks very much, DanKoloff. I'm now able to compile the PC Emulator with those settings, and the v2.0.11 of ESP32 boards support recommended there. I'll try it out later.

The main pieces that were missing from what I've been able to find in this repo were:

Espressif 2.0.11
Select the "ESP32 Dev Module" board (Tools > Board > esp32 > ESP32 Dev Module)

The Espressif 2.0.11 part being which board support package to select in the Arduino IDE boards manager, and the second part being which board type to choose, when compiling one of the examples (including the PC emulator).

I'd like to suggest that this needs to be added to the documentation for this board, perhaps to the readme pages of the two repos - this one, specifically about this board, and the one for the Olimex fork of FabGL (https://github.com/OLIMEX/FabGL). Perhaps added to the product page on the Olimex website too, and ideally to the manual.

It seems this problem has been around since at least the release of Espressif 3.0.x, though I'm not clear when that was. The existing documentation was no doubt fine at the time of release, but the fact that Espressif chose to break support for software written for their earlier versions, means it's no longer enough.

FWIW, in Arduino 1.8.19, it seems necessary to uninstall Espressif 3.0.2 (the current version) before installing 2.0.11. Possibly it keeps both, otherwise, but shows the greater version number, which is a bit confusing.

@DanKoloff
Copy link
Contributor

Thank you for the feedback. Some resources were updated, how-to was added in the README here:

https://github.com/OLIMEX/FabGL/blob/master/README.md

and the manual was also updated:

https://github.com/OLIMEX/ESP32-SBC-FabGL/blob/main/DOCUMENTS/ESP32-SBC-FabGL.pdf

@Andy2No
Copy link
Author

Andy2No commented Aug 2, 2024

You're welcome, @DanKoloff .

Yes, that should do it. I think the advice to set;

Partition Scheme: Huge APP

was just for the PC Emulator, but I've tried compiling the SpaceInvaders.ino example with those settings and it works fine, so maybe it doesn't matter for the other examples. I'll try some more of them soon.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants