Issues Using ESP32 on Arduino IDE

Hello all, I have been using the Arduino Due on my laptop's Arduino IDE for quite a while now. However, when I recently switched to using an ESP32 (exact board is from here) I couldn't seem to compile anything into it. I downloaded the driver needed using the instructions from this website, and I am able to select a PORT on the IDE as well (PORT5). However when I try to upload code into the ESP32 it throws me an error about a missing file or directory:

Arduino: 1.8.13 (Windows Store (Windows 10), Board: "Node32s, 80MHz, 921600"

In file included from c:\users\bill yen\onedrive - northwestern university\documents\arduinodata\packages\esp32\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:\Users\Bill Yen\OneDrive - Northwestern University\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142,

                 from sketch\WiFiScan.ino.cpp:1:

c:\users\bill yen\onedrive - northwestern university\documents\arduinodata\packages\esp32\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

Error compiling for board Node32s.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I get the same error regardless of whether I even plug the ESP32 into my computer or not, and I do hold down the BOOT button when I upload. Does anyone have any insight on how to fix this and get the missing file in there? I just downloaded the ESP32 board manager thing from this link ( given in the tutorial linked above, so I don't understand why there would be missing files. Any comments or suggestions is greatly appreciated, as I am really new to using ESP32. Thank you all so much!

Please post the full sketch that causes the error

Look at the board. Which ESP module is on the board ? The "ESP-WROOM-32" or "ESP32-S" ?

The json file that you use is okay.
That website randomnerdtutorials is okay.

Your build environment seems to be wrong. You could remove it and download a fresh one.
Go to menu: File / Preferences.
Click at the bottom on the file "preferences.txt".
That opens the hidden arduino15 folder.
Close the Arduino IDE.
Keep the file "preferences.txt" and the file "formatter.conf" if you have that. Remove all the other files and folders.
Start the Arduino IDE.
Go to the Board Manager and download the "esp32" boards.

When deleting all those things in the hidden arduino15 folder, also newer libraries have been deleted. You could als update those libraries in the Library Manager.

Try to select the "DOIT ESP32 DEVKIT V1" board and see if that helps.

This is the correct file for the board manager.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.