I'm just migrating to the Arduino CLI and trying to build a sketch for the ESP32-CAM via CLI. Core package installed (esp32:esp32) and board attached as esp32cam or esp32wrover but I get a build error due to compilation fatal error:
c:\users\luca\...\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. Error during build: exit status 1
This is probably due a missing include folder (i.e. xtensa-esp32-elf at the same location as the utility above) in the build tool.
The error can be replicated by compiling the "Examples/ESP32/Camera/CameraWebServer" in the Arduino IDE and setting the board as esp32cam esp32wrover or any ESP32 board with external PSRAM:
arduino-cli compile -n -v -b esp32:esp32:esp32cam
NOTE: Here using the dry-run flag for testing.
Trying to compile for a generic ESP32 board instead the compilation terminates successfully but using 156% of program storage. Strange behavior while using Arduino IDE the same sketch compiles without errors with and without PSRAM.
Can anyone confirm this issue?
An other more generic question. In Ardiuno IDE some target boards have compile-time options like "ESP32 Wrover Module" to change flash frequency, partition scheme, etc. Is there a way to pass this options to Arduino CLI too? Probably using the "--build-properties strings" flag but I cannot find any reference to the strings format and option names.