Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » Arduino Compile Error - EepromAbstraction...

Author: jfl
23/11/2021 15:39:31
I'm super-excited to use tcMenu but struggling to get the code to compile for an Arduino Uno WiFi Rev2. Using this library is a quantum leap for me as a relative newbie.

Just to try it out, I have a simple menu with three submenu times (Run, Jog, Setting) - no callback and nothing complicated. When I compile the generated code in the Arduino IDE, multiple errors are flagged. They seem to be with the EepromAbstraction.cpp. Currently, I have 'No EEProm' set in the TCMenu Designer.

Here's a sample of one of the errors:

C:\Users\jfL\Documents\Arduino\libraries\IoAbstraction\src\EepromAbstraction.cpp:10:9: error: 'eeprom_read_byte' was not declared in this scope
return eeprom_read_byte((uint8_t*)position);
^~~~~~~~~~~~~~~~

I'm just lost and I don't know what to do. Any help is greatly appreciated.

Thanks! John

Author: davetcc
23/11/2021 18:56:37
Unfortunately, we don't have one of those boards to hand in order to check why it doesn't compile.

Known working boards are listed at the bottom of this page: https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/

I can see that it is probably still AVR but with a different set of EEPROM functions. If you wanted to test if there are other problems (could be as I've not tried that configuration) you could try changing Arduino/libraries/IoAbstraction/src/EepromAbstraction.h as follows:

Line 100:

Change

#ifdef __AVR__

to the following

#ifdef NEVER_USE_AVR_ON_MK2

It will probably get past this error. But like I say I don't have that board to hand.

Author: jfl
23/11/2021 19:13:15
Thanks for the quick response. I tried your suggestion but still get swamped with compilation error around the EepromAbstraction.

I'll give it a try on a standard Arduino Uno.

Author: davetcc
23/11/2021 19:28:04
To be honest, you're using two boards that are not really that well supported by the platform. The original Uno is right on the edge of what we can support and it only really works with a DfRobot shield for very simple designs. We have a very simple example sketch that we test with Uno, but even that is right on the edge. Uno has so little memory that often the sketch will either not compile or run out of memory at runtime.

These days most people use ESP, SAMD, Nano BLE, or STM32 boards, so we design for those cases. The few that still use AVR tend to use MEGA2560.





Register / Login  |  Desktop view  |  Jump to top of page