Errors occurred while compiling “partitions.bin” and “esp32.cpp.0”

the code is as follows:

#include <Arduino.h>
void setup() {
  // put your setup code here, to run once:
  pinMode(2, OUTPUT); 
  digitalWrite(2, LOW); 

void loop() { 
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH); 
  Serial.println("LED: ON");  
  digitalWrite(2, LOW); 
  Serial.println("LED: OFF");

“C:\Users\GGG.platformio\penv\Scripts\platformio.exe ‘run’” terminated with exit code: 1.

Hi, I’m a new hand in esp32. I’ve tried Arduino IDE to compile the code, but it also failed.
I have searched in various forums, but I can’t find any solution. (T_T)
Is the compiler crashed ? And what should I do.

A package (framework, compiler) may be corrupted. Try a clean reinstallation:

  1. Close VSCode
  2. Delete C:\Users\<user>\.platformio
  3. Reopen VSCode
  4. Wait for PlatformIO to reinstall itself
  5. Upload again

Thanks for your reply. I try it. But it doesn’t work. :sob:

Open a PIO CLI and execute

pio run -v -j1

What’s the last few lines of this output?

as follows:

- IC:/Users/GGG/platformio/packages/framework-arduinoespressif32/variants/esp32 src/main.cpp
**[.pio\build\esp32dev\src\main.cpp.o] Error 1
=====[FAILED] took 11.09 seconds======

What if you move the project to the C: drive?

errors still occur as written above.

Check if Antivirus / Windows Defender interferes.

If you’re out of ideas, please file an issue in

OK. Thank you for providing so many ideas.