I ran PlatformIO update for my ESP8266 project, which updated Espressif8266 to v3.0.0 (and maybe other stuff that I didn’t notice at the time). Now, when I do a PIO Init, I get the following errors for all my targets:
CMake Error at CMakeLists.txt:33 (add_executable):
C_STANDARD is set to invalid value '17'
This references the following line at the bottom of the CMakeLists.txt file:
I’ve never really understood what the Z_DUMMY_TARGET is.
I tried re-creating my project from scratch in a new directory and invalidating CLion caches, but I still get the same error.
Is anyone else having this problem, or can someone offer some advice on how I can resolve it?
I also downloaded CMake 3.21.x and it works now. I also had to modify a setting for it to work properly.
open File | Settings | Languages & Frameworks | C/C++ | Clangd* and append ,–target=riscv32 to the end of clangd diagnostics options.
Arduino-ESP8266 using C17 with CLion by default not having a CMake version that supports this C language version is not something that can be fixed by PlatformIO, but rather CLion. Can you open a bug report in https://youtrack.jetbrains.com/issues/CPP?