hello this is my first post here and i have a really strange bug.
I don’t understand why but my platformIO is completely broken and i can’t compile anything using the toolchain-xtensa32 . The compilation still works fine for Arduino cards.
When i try to create an empty project for any esp32 i get random empty files created with strange names like @
,
or pX
. i also get the error
unable to resolve configuration with the compilerPath
"C:/Users/username/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe".
Using "cl.exe" instead
and when i check the folder i see that the file xtensa-esp32-elf-gcc.exe
is actually 0 bytes. I tried to reinstall the toolchain multiple times and this file will always eventually end up being 0 bytes. Even when i have this file actually existing it still won’t compile a simple hello world with Serial.println()
, the error i usually get are things like
c:\users\username\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\no-rtti\bits\gthr-default.h:
In function 'int __gthread_mutex_timedlock(__gthread_mutex_t*, const __gthread_time_t*)':
c:\users\username\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\no-rtti\bits\gthr-default.h:781:12:
error: 'pthread_mutex_timedlock' was not declared in this scope
return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
^~~~~~~~
C:\Users\username\.platformio\packages\framework-arduinoespressif32\cores\esp32\StreamString.cpp:26:8: error: 'StreamString' has not been declared size_t StreamString::write(const uint8_t *data, size_t size) {
^~~~~~~~~~~~
C:\Users\username\.platformio\packages\framework-arduinoespressif32\cores\esp32\StreamString.cpp: In function 'size_t write(const uint8_t*, size_t)':
C:\Users\username\.platformio\packages\framework-arduinoespressif32\cores\esp32\StreamString.cpp:28:37: error: 'length' was not declared in this scope
const unsigned int newlen = length() + size;
ect...
i also tried to install manually another version of the toolchain-xtensa (the 8.4.0) but the xtensa-esp32-elf-gcc.exe
still end up being turned into a 0 byte file. I don’t have any antivirus other than the default windows one.
This problem even happen on older project that were compiling perfectly fine before
i think that the zeroing of the file happens when i open a project folder and platformIO “load tasks” or “rebuild intelisens index”
if anyone has any idea of what’s happening and how i could make platformIO work again i would be very grateful.
ps : english is not my first language, sorry if it’s hard to understand something