I am trying to compile my blink_demo sketch and upload it to my DOIT ESP32 DEVKIT V1 module. I never make it past compile.
As part of the compile error messages shown below, reference is made to "programdata\matlab\supportpackages\r2017b". I have uninstalled and removed all MATLAB programs and files from my PC, but this sketch still will not compile.
Does someone out there have a simple, straightforward fix, with simple steps to follow, to solve this problem? I have tried to fix this problem myself and have reached no solution.
" In file included from c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:60:0,"
"c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-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
Error compiling for board DOIT ESP32 DEVKIT V1.
// Blink Demo
// ledPin refers to ESP32 GPIO 23
const int ledPin = 23;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin ledPin as an output.
pinMode(ledPin, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
It appears that the compiler is trying to locate your arduino.h file from some MATLAB directory rather than the typical C:\Program Files (x86)\Arduino... location
I have been aware of the related MATLAB directory issue causing compilation failure. That's why I uninstalled all MATLAB files, and MATLAB folders on my PC.
I haven't figured out how to tell the compiler to ignore looking into other folders for the c++ file.
I was able to compile this sketch. I solved this problem by finding the offending Setup statement in the Preferences Text file associated with this sketch: "settings.path=C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\arduinoide.instrset\idepkgs"
I commented the statement out. Now the sketch compiles.