Ok, I had a look on the post and the wifi example.
Figured that I dont need to be in arduino, as I could switch to espidf and still use arduino libraries if i have arduino as a component. By this, espidf would cleanly recompile the idf which results in using cmake build process and allowing menuconfig.
Unfortunately i dont get anything to work:
I did setup a new project with espidf as sdk. Copied my files into the new folder and change the plaformio.ini to this:
[env:lolin32]
platform = espressif32
board = lolin32
framework = espidf, arduino
lib_deps =
milesburton/DallasTemperature@^3.9.1
lbernstone/Tone32@^1.0.0
thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays @ ^4.3.0
check_tool=clangtidy
check_flags =
clangtidy: --checks=-*,cert-*,clang-analyzer-* --fix
platform_packages =
; use a special branch
framework-arduinoespressif32 @ https://github.com/marcovannoord/arduino-esp32.git#idf-release/v4.0
But if I try to compile I get cmake errors. See below:
Reading CMake configuration...
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Configuring incomplete, errors occurred!
See also "C:/Users/David/Documents/PlatformIO/Projects/Sprudelcontrol_final/.pio/build/lolin32-COM-debug-crash-dump/CMakeFiles/CMakeOutput.log".
See also "C:/Users/David/Documents/PlatformIO/Projects/Sprudelcontrol_final/.pio/build/lolin32-COM-debug-crash-dump/CMakeFiles/CMakeError.log".
CMake Error at CMakeLists.txt:2 (include):
include could not find load file:
C:\Users\David\.platformio\packages\framework-espidf@3.40001.200521/tools/cmake/project.cmake
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_C_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
If I remove arduino from the platformio.ini then the cmake errors disappear but I see errors that it cannot find some of the libraries dependencies. I assume those are the arduino libraries not specifically listed in the libdeps of platformio.ini.
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Compiling .pio\build\lolin32-COM-debug-crash-dump\src\main.o
Generating LD script .pio\build\lolin32-COM-debug-crash-dump\esp32_out.ld
Generating partitions .pio\build\lolin32-COM-debug-crash-dump\partitions.bin
src/main.c:2:10: fatal error: Wire.h: No such file or directory
**************************************************************
* Looking for Wire.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:Wire.h"
* Web > https://registry.platformio.org/search?q=header:Wire.h
*
**************************************************************
#include <Wire.h>
^~~~~~~~
compilation terminated.
Compiling .pio\build\lolin32-COM-debug-crash-dump\app_trace\app_trace.o
Compiling .pio\build\lolin32-COM-debug-crash-dump\app_trace\app_trace_util.o
Compiling .pio\build\lolin32-COM-debug-crash-dump\app_trace\host_file_io.o
Compiling .pio\build\lolin32-COM-debug-crash-dump\app_trace\gcov\gcov_rtio.o
Compiling .pio\build\lolin32-COM-debug-crash-dump\app_update\esp_ota_ops.o
*** [.pio\build\lolin32-COM-debug-crash-dump\src\main.o] Error 1
==================================================================================================================================== [FAILED] Took 10.44 seconds ====================================================================================================================================
Environment Status Duration
---------------------------- -------- ------------
lolin32-COM-debug-crash-dump FAILED 00:00:10.439
Any ideas what I do wrong?