Compiling Ringo firmware with PlatformIO broken

Hi there,

following the guide for building and modifying the Ringo-Firmware and using the most recent versions of VS Code and PlatformIO on a fresh install I encounter an error when trying to compile the firmware. Unfortunately I cannot attach the log or post it in it’s entirety due to the length, so I posted only the relevant error below. However this can be replicated by doing a fresh install of the required tools on a VM or another PC.

Any idea why this could be happening?

Cheers!

c:\users\malte\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits\basic_string.h: In member function 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) const':
lib/MAKERphone/src/TFT_eSPI/TFT_eSPI.h:374:20: error: expected unqualified-id before '(' token
   #define min(a,b) (((a) < (b)) ? (a) : (b))
                    ^
In file included from lib/MAKERphone/src/MAKERphone.h:34,
                 from src/main.h:4,
                 from src/calendarApp.h:4,
                 from src/calendarApp.cpp:1:

1 Like

Hi @TechMolt,

Thank you so much for reaching out.

We’ll forward your problem to our development team, and they’ll be back with an answer as soon as possible.

Thank you for your patience,
Monika

Hi there,

any update on this?

Hey TechMolt,

I’m Emil from the software department.

There was a recent update to the esp32 core compiler

To fix this try changing this line in your platformio.ini file:

platform = espressif32

to this:

platform = espressif32@1.12.1

PlatformIO downloads the newest esp32 core, and it seems there are some backwards compatibility issues with our code since it’s almost 3 years old. A quick workaround is to use an older version of the esp32 core and version 1.12.1 seems to work fine.

Hope this helps!