\platformio.exe ‘run’” terminated with exit code: 1

I got a problem that I cannot compile my ESP32 module (ESP32_DEVKITC_V4 or ESP32S) when I use platformio, but both are workable on Arduino IDE.
the error code on platformio as below,

Auto-detected: COM7
Uploading .pio\build\uno\firmware.hex
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x66
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x66

avrdude done.  Thank you.

*** [upload] Error 1
================================================================================================= [FAILED] Took 103.64 seconds =================================================================================================
The terminal process "C:\Users\John Lin\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.

avrdude is the program to upload to AVR devices, like an Arduino Uno.

You probably just haven’t used the project environment switcher to select the right active project with your ESP32 and have some AVR project currently active…

1 Like