ESP32 Error Compiling

Please help me resolve this issue. I am not able to run a basic blink on ESP32

Alternatives for bits/c++config.h: []
ResolveLibrary(bits/c++config.h)
  -> candidates: []
In file included from c:\programdata\matlab\supportpackages\r2019a\3p.instrset\arduinoide.instrset\idepkgs\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:\ProgramData\MATLAB\SupportPackages\R2019a\3P.instrset\arduinoide.instrset\idepkgs\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:142,

                 from C:\Users\AMISHA~1\AppData\Local\Temp\arduino_build_822121\sketch\testSketch.ino.cpp:1:

c:\programdata\matlab\supportpackages\r2019a\3p.instrset\arduinoide.instrset\idepkgs\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 ESP32 Dev Module.

Hello "amishah0526",

coding with arduino is not as simple as installing a new adress-app on your smartphone and then start adding adresses. It is a lot of fun but it needs a little more knowledge than just how to type on a keyboard.

Whenever questions occur you can ask here in the forum. Though the experienced users don't like a ping-pong-game of short questions which would make it nescessary to ask back for details again and again.

please post the exact name of your ESP32-board.
Some of the ESP32-boards have an LED on board some not.

the error that occured is

fatal error: bits/c++config.h: No such file or directory
The compiler needs a certain file and can't find it.

Without the sketch that you tried to compile it is difficult to say exactly what is happening.

So please if you reply to this message, click on the Safe Draft button which will guide you to the "normal" reply-site. In this site you have a Texteditor with more options.

The button "</>" in the upper left corner is for inserting code.

If you click on it these commands will be inserted "[ code ] [ / code]"

Take your complete code copy it to the clipboard and paste it between the "] x [" where the "x" is located. So we can see how your code looks like.
otherwise we would have to speculate what the exact reason for the error is.

maybe your arduino-installation was made to a non-standard path or the code
looks up the include-file in the wrong place.

Alternative you could load a prewritten example
in ´the upper left corner click on the menu-item "file" in the popped up drop-downmenu click "examples" then click on "2. digital" then click on "BlinkWithoutDelay"

OK I tried it myself
@the leeader of the Arduino-project:
Even this example does NOT compile for an ESP32-Dev-module because a constant "LED_BUILTIN" is not defined. I suggest at least SOME quality-management that at least example should

a.) not beaccessable for other boards
or
b.) making sure that the example compile for each and every single board that can be imported
or
c.) add comments to each example that explains the restrictions of the example when it will work

This whole forum seems to be a evergrowing ineffective FAQ of the same questions again and again
caused for such reasons

here is the corrected sketch that should compile for an ESP32-dev-board

// constants won't change. Used here to set a pin number:
const int ledPin =  2;// LED_BUILTIN;// the number of the LED pin

// Variables will change:
int ledState = LOW;             // ledState used to set the LED

// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0;        // will store last time LED was updated

// constants won't change:
const long interval = 1000;           // interval at which to blink (milliseconds)

void setup() {
  // set the digital pin as output:
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // here is where you'd put code that needs to be running all the time.

  // check to see if it's time to blink the LED; that is, if the difference
  // between the current time and last time you blinked the LED is bigger than
  // the interval at which you want to blink the LED.
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;

    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW) {
      ledState = HIGH;
    } else {
      ledState = LOW;
    }

    // set the LED with the ledState of the variable:
    digitalWrite(ledPin, ledState);
  }
}

best regards

Stefan

@the leeader of the Arduino-project:

Who do you think was responsible for adding support for the board to the Arduino environment ?

StefanL38:
@the leeader of the Arduino-project:
Even this example does NOT compile for an ESP32-Dev-module because a constant "LED_BUILTIN" is not defined. I suggest at least SOME quality-management that at least example should

a.) not beaccessable for other boards
or
b.) making sure that the example compile for each and every single board that can be imported
or
c.) add comments to each example that explains the restrictions of the example when it will work

This whole forum seems to be a evergrowing ineffective FAQ of the same questions again and again
caused for such reasons

here is the corrected sketch that should compile for an ESP32-dev-board

Your complaining in the wrong place.

ESP32 support for the Arduino IDE is nothing to do with '@the leader of the Arduino-project'.

There are lots of volunters in here who do spend their free time helping people, but ESP32 support has nothing to do with the Arduino project team.

@UKHeliBob and srnet:

If this post has a better suited subforum just move it there. I'm interested in quality and want to act like a good example.

Your complaining in the wrong place.

ESP32 support for the Arduino IDE is nothing to do with '@the leader of the Arduino-project'.

There are lots of volunters in here who do spend their free time helping people, but ESP32 support has nothing to do with the Arduino project team.

Aha. So this would mean the arduino-project has a structure where any code-crippler can upload any buggy extensions like buggy cores, buggy libraries , buggy JSON-files for new boards to support etc, etc, and it is up to the community to get it clean?

My basic idea is: the Arduino-IDE should not offer example-sketches to non-arduino-boards. If you switch to another board. The examples should be exclusively provided by a subfolder belonging to that board.

IMHO it makes a big difference if somebody has to switch (back) to Board Arduino-Uno to get access to example-sketches copy to clipboard. switch to some non-original-arduino-board and paste the code into the editor.
Compared to click-down menus and the arduino-IDE loads an example-sketch.

If I switch to another board a lot of things happen in the backround. It takes some seconds until the IDE responds again. This means switching to another board does initiate changes to the IDE-system. These changes are done by the Arduino-IDE-java-code itself. And here the Arduino-project should think over how can we change the structure of adding extensions in a way that developping to a high quality status of the extensions is forced.

The Arduino-IDE could show up a message like "Non-Original board. If you encounter any errors please contact Creator of the board-extensions NAME, COMPANY, EMAIL-ADRESS" to get support.

The Arduino-IDE goes online everytime I use the library-manager. How about some quality certificate that is checked online to make this message disappear or change to something like "additional board from COMPANY-NAME has passed basic quality-requirements still use on your own risk"

Any company that is interested in high quality products will appreciate the feedback to improve quality of it all even more. Companys that are just interested in trhow out rickety hardware will loose attractivity.

I hope behind the complaining you can see my good intent for more quality.

best regards

Stefan

StefanL38:
I hope behind the complaining you can see my good intent for more quality.

So complain to Expressif, who created the ESP32 plugin.

srnet:
So complain to Expressif, who created the ESP32 plugin.

To me it seems you still haven't got the main point:
Who is responsible for the design of the arduino-IDE?
esspressif? surely not.
The design of the Arduino-IDE influences the quality of the contributed extensions.
And I'm trying to make the "Arduino-Team" think about this aspect
The design of the Arduino-IDE influences the quality of the contributed extensions.
How can we improve The design of the Arduino-IDE to improve quality of the extensions?

There is no easy solution to that. But you can start discussing it.

best regards

Stefan