M5Stack-SD-Updater: M5Stack-SD-Menu compilation error
I try compile new example M5Stack-SD-Menu but I got errors:
In file included from C:\PROGRAMY\arduino_projekty\libraries\M5Stack-SD-Updater\examples\M5Stack-SD-Menu\M5Stack-SD-Menu.ino:75:0:
sketch\joyPSP.h: In function 'void handleJoyPad()':
joyPSP.h:76:14: error: 'class M5SAM' has no member named 'setListID'
M5Menu.setListID(MenuID);
^
joyPSP.h:90:14: error: 'class M5SAM' has no member named 'setListID'
M5Menu.setListID(MenuID);
^
C:\PROGRAMY\arduino_projekty\libraries\M5Stack-SD-Updater\examples\M5Stack-SD-Menu\M5Stack-SD-Menu.ino: In function 'void renderIcon(uint16_t)':
M5Stack-SD-Menu:191:30: error: cannot convert 'FileInfo' to 'uint16_t {aka short unsigned int}' for argument '1' to 'void renderIcon(uint16_t)'
renderIcon(fileInfo[MenuID]);
^
exit status 1
'class M5SAM' has no member named 'setListID'
when I comment out //#define USE_PSP_JOY true then got:
C:\tmp\arduino_modified_sketch_208768\M5Stack-SD-Menu.ino: In function 'void renderIcon(uint16_t)':
M5Stack-SD-Menu:191:30: error: cannot convert 'FileInfo' to 'uint16_t {aka short unsigned int}' for argument '1' to 'void renderIcon(uint16_t)'
renderIcon(fileInfo[MenuID]);
^
exit status 1
cannot convert 'FileInfo' to 'uint16_t {aka short unsigned int}' for argument '1' to 'void renderIcon(uint16_t)'
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- @Reaper7 fixes (see #3) — committed to tobozo/M5Stack-SD-Updater by tobozo 6 years ago
I have only one esp32 dir, because I don’t use arduino installators, boards managers etc C:/PROGRAMY/Arduino is a unzipped copy of arduino ide from arduino.cc->Windows ZIP file for non admin install C:/PROGRAMY/Arduino/hardware/espressif/esp32 clone of arduino-esp32 git repository C:/ PROGRAMY/arduino_projekty is a dir for my sketches (set in Arduino->Preference->Sketchbook location) C:/ PROGRAMY/arduino_projekty/libraries contains my collection of external libs (99% from github) updated by bash script.
but does not matter… important that the problem is solved 😄
Whoops swapping functions order is the thing I should have done in the beginning. Big thanks for pointing that out, now I know those are hinting at best practices, I’m re-enabling warnings everywhere ^^
I have a theory on those inconsistencies with the compiler though. In my home directories I found two installations of the ESP32 SDK on both Windows 10 and Ubuntu.
I suspect the install directories changed over time (moving from ~/.arduinoxxx to ~/Arduino or to the directory set in the preferences.txt), and multiple copies were made. Now the IDE does not know which one to use as all the SDK are visible.
If you look for the “esp32” directories on your hard drive, I bet you’ll find more than one with a subdirectory “tools”.
Although I didn’t have the symptoms you had, I renamed the oldest “ESP32” folders to “ESP32.old” and the path to the compiler changed in the IDE.
Could it be that you had a separate /duplicate version of the SDK using different compiler flags. The M5Stack board used to be in a separate environment before it was merged into the ESP32 boards list, maybe some dotfiles are still there ?
I’ve pushed the changes to the repo anyway, I want to thank you again for finding those anomalies and taking the time to test it, very much appreciated!
whoops I totally forgot I was using a modified M5Sam library, also forgot to PR the changes or even document it … shame on me 👎
there’s the pull request