Espressif32 compiler problem

I am new to this forum and I don’t know if I wrote in the right place.
I am an embedded developer and I have used PlatformIO up to now without problems even in important projects
I updated PlatformIO to the current version yesterday and I am no longer able to compile the projects made previously.
I use PlatformIO Core 6.0.0 Home 3.4.1.
The same project compiled on another machine with Core 5.2.2 and Home 3.4.1 compiles without problems.
Does anyone have any ideas to help me

1 Like

This is typical error :
Compiling .pio\build\esp32dev\src\RTC_software\syncr_select.cpp.o
Compiling .pio\build\esp32dev\src\application_lib\MFC_setup.cpp.o
unknown OSError exception code 22 - ‘C:\Windows\System32\cmd.exe’: Invalid argument
*** [.pio\build\esp32dev\src\RTC_software\FSK_sync.cpp.o] Error 127
unknown OSError exception code 22 - ‘C:\Windows\System32\cmd.exe’: Invalid argument
*** [.pio\build\esp32dev\src\RTC_software\GPS_sync.cpp.o] Error 127
unknown OSError exception code 22 - ‘C:\Windows\System32\cmd.exe’: Invalid argument
*** [.pio\build\esp32dev\src\RTC_software\NTP_sync.cpp.o] Error 127
unknown OSError exception code 22 - ‘C:\Windows\System32\cmd.exe’: Invalid argument
*** [.pio\build\esp32dev\src\RTC_software\RTC_sync.cpp.o] Error 127

Are you sure this issue was caused by PlatformIO Core 6.0? Do you use the unversioned platform in the platformio.ini file?

Could you try to replace

[env:esp32dev]
platform = espressif32

to

[env:esp32dev]
platform = espressif32 @ ^3

Does it work now?

This is my Platformio.ini
[env:esp32dev]
platform = espressif32@3.2.1
board = esp32dev
framework = arduino

Could you manually remove the .pio folder from a project and restart a build?

Possible antivirus interference same as in Error: Can not remove temporary directory - #17 by Oomek?

Maybe the PIO core 6.0 “binary” isn’t yet whitelisted somewhere and this causes some starting problems…

I tried to remove the .pio folder and restart the rebuild. Nothing has changed

I check this thing, because I have also noticed a strong slowdown in activities. The strange thing is that I have a similar machine with the previous version of Platform IO and it doesn’t have these problems.
Both machines are with Win10, I7 core, 16GB RAM and SSD,
but there are different performances of the order of 10X
To complete the information my antivirus on both machines is BitDefender

Yeah that’s a known culprit of “weird things happen”.

Does deactivating that change anything?

There are no changes between PlatformIO Core 5 & 6 regarding build logic. It is the same. Please check your machine’s setup.

Does deactivating that change anything? No

Let me know what I need to check specifically and I will do it

Please share FULL CONTENTS of the platformio.ini file. Use the “code” icon above to format INI code.

Ok, now I’m out of the office and I don’t have the PC that’s having problems. This afternoon as soon as I got back I shared the platformio.ini

Here is my platform IO

;PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
;platform = espressif32 @ 3.2.1
platform = espressif32 @ ^3
board = esp32dev
framework = arduino

;[env:myenv]
; set frequency to 160MHz
board_build.f_cpu = 160000000L

upload_speed = 115200
monitor_speed = 115200

; upload_port = COM4
upload_port = COM7

Your config looks good to me.

  1. Close VSCode.
  2. Navigate to C:\Users\%your_user_name% and remove .platformio folder.
  3. Start VSCode.

Does it work now?

No, nothing has changed
First she wrote:
[5/18/2022, 15:58:40] Cannot solve configuration with compilerPath “C: /Users/adria/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe” . Alternatively, “cl.exe” will be used.
[5/18/2022, 15:58:40] Cannot solve configuration with compilerPath “C: /Users/adria/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe” . Alternatively, “cl.exe” will be used.
then he rebuilt the folder c: \ user % your_user_name% … platformio
in the end the compilation produced the usual error

Just checking you did the same setting there too?

Does C:/Users/adria/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe exist now?

Though it may be a long shot, does uninstalling BitDefender temporarily solve the problem?

Before i moved to MacOs i was using Windows. I always fighted to reduce the amount of resources the Antivirus program was taken during compile. All my Virus exclude attempts (folders, programs, tasks) where most of time gone when Windows did an update. Since it was an old PC the 30% processor time what the virus scanner used was an terrible performance hit. I tried different Anti-Virus all where more or less a pain.
Uninstalling BitDefender does not help, since the Microsoft Antivirus Solution will get active if the 3rd Party AntiVirus Solution is removed.

Good morning everyone,
I solved the compilation problems …
After a series of unsuccessful tests with the disabling of
Bitdefender I did a series of cross-checks between
the machine that works and the one with the problems.
Both machines have an I7 with 16GB of RAM and SSD.
They have the same version of Win10 with the same updates.

It made no sense.
I have analyzed the applications recently installed on the
two machines and I found that on the machine it was giving problems
I found a copy of RAV Antivirus installed.
I removed it and everything was fine including the problems
of slowness.

Bitdefender had nothing to do with it as it is installed on
both machines.

Thanks everyone for the suggestions.

1 Like