Error compiling for M5Stack Core2 in Arduino IDE
-
hi there
I'm facing a similar problem of:Re: Error compiling for board M5Stack-Paper.
I'm on Arduino 1.8.13, on a Win10 machine. I followed the procedure described in https://docs.m5stack.com/en/arduino/arduino_core2_development so using board definition at https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
I'm on board version 1.0.7 bundled with xtensa
"version": "1.22.0-80-g6c4433a-5.2.0",
"name": "xtensa-esp32-elf-gcc"I'm trying to compile rtc_wakeup example and get exactly same error reported in the linked topic.
"C:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/config" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/app_trace" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/app_update" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/asio" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/bootloader_support" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/bt" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/coap" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/console" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/driver" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp-tls" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp32" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp_adc_cal" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp_event" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp_http_client" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp_http_server" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp_https_ota" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp_ringbuf" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/ethernet" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/expat" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/fatfs" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/freemodbus" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/freertos" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/heap" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/idf_test" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/jsmn" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/json" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/libsodium" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/log" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/lwip" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/mbedtls" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/mdns" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/micro-ecc" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/mqtt" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/newlib" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/nghttp" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/nvs_flash" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/openssl" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/protobuf-c" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/protocomm" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/pthread" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/sdmmc" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/smartconfig_ack" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/soc" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/spi_flash" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/spiffs" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/tcp_transport" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/tcpip_adapter" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/ulp" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/vfs" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/wear_levelling" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/wifi_provisioning" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/wpa_supplicant" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/xtensa-debug-module" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp-face" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp32-camera" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/esp-face" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10813 -DARDUINO_M5STACK_Core2 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="M5STACK_Core2"" "-DARDUINO_VARIANT="m5stack_core2"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4\cores\esp32" "-IC:\userdata\Program Files\arduino-windows\portable\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4\variants\m5stack_core2" "C:\Users\michelepa\AppData\Local\Temp\arduino_build_353905\sketch\rtc_wakeup.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for bits/c++config.h: []
ResolveLibrary(bits/c++config.h)
-> candidates: []
In file included from c:\userdata\program files\arduino-windows_portable_\arduino-1.8.13\portable\packages\m5stack\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:60:0,
from C:\userdata\Program Files\arduino-windows_portable_\arduino-1.8.13\portable\packages\m5stack\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142,
from C:\Users\michelepa\AppData\Local\Temp\arduino_build_353905\sketch\rtc_wakeup.ino.cpp:1:
c:\userdata\program files\arduino-windows_portable_\arduino-1.8.13\portable\packages\m5stack\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\utility:68:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
exit status 1 -
SOLVED... thanks to https://github.com/arduino/arduino-cli/issues/1002
It was just a "Win10 too long path" issue