Error while Compiling

please help to overcome this error

fork/exec C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++.exe: Access is denied.

Compilation error: fork/exec C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++.exe: Access is denied.

Hi

it probably would help us help you if you were to provide a bit more context.

  • which IDE?
  • what are you trying to compile (do you get that with the default template sketch?)
  • what boards did you install and select?
  • which OS?

...

I have moved your Topic to Programming Questions....Please try not to post in Uncategorised again, If you are unsure about the categories refer to this guide or to the stickies for each category.

Thank You.

Arduino IDE 2.1.1
board using: ESP8266
trying to run the example code

/*
  ESP8266 Blink by Simon Peter
  Blink the blue LED on the ESP-01 module
  This example code is in the public domain

  The blue LED on the ESP-01 module is connected to GPIO1
  (which is also the TXD pin; so we cannot use Serial.print() at the same time)

  Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);  // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, LOW);  // Turn the LED on (Note that LOW is the voltage level
  // but actually the LED is on; this is because
  // it is active low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

when I select Tools>Board "Generic ESP8266 Module" the code of post 4 compiles OK

in the Arduino IDE select File>Preferences and enable "Verbose output during Compiling and upload" then attempt to compile and upload your program again
if there are still problems upload the error messages as text

check the rights on

C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++.exe

does it exist? do you have rights for it?

how to check the rights for it

this is the error msg which I am receiving after "verbose output during compiling and upload"

FQBN: esp8266:esp8266:generic
Using board 'generic' from platform in folder: C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2
Using core 'esp8266' from platform in folder: C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2

"C:\\Users\\ankush\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\ankush\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2/tools/mkbuildoptglobals.py" "C:\\Program Files\\Arduino IDE\\resources\\app\\node_modules\\arduino-ide-extension\\build" 10607 "C:\\Users\\ankush\\AppData\\Local\\Temp\\arduino\\sketches\\888ACDDC926341A6C768D107C81760AE" "C:\\Users\\ankush\\AppData\\Local\\Temp\\arduino\\sketches\\888ACDDC926341A6C768D107C81760AE/core/build.opt" "C:\\Users\\ankush\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2023628-2676-1v5gcgz.c5px\\Blink/Blink.ino.globals.h" "C:\\Users\\ankush\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\cores\\esp8266/CommonHFile.h"

fork/exec C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3.exe: Access is denied.

Compilation error: fork/exec C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3.exe: Access is denied.

seems your installation is incorrect, you don't have the right to execute xtensa-lx106-elf-g++.exe nor python3.exe...

I'd clean up the installation and start again from scratch. starting by downloading the IDE from the Arduino web site, adding the boards definition you are interested in and using the IDE to perform the board installation.

still not working

xtensa-lx106-elf-g++: fatal error: cannot execute 'c:/users/ankush/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/../libexec/gcc/xtensa-lx106-elf/10.3.0/cc1plus.exe': CreateProcess: No such file or directory
compilation terminated.
fork/exec C:\Users\ankush\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++.exe: Access is denied.
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

The IDE cannot find or is not authorized to execute some programs.

Until you fix this you are stuck

I don’t use windows so I can’t be of much help unfortunately on what would be in your way

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