Compilation problem

Hi all,

I need your help: I’m totally new to the VSC / PlatformIO environment (although not into programming) but I’m having a weird problem.

I followed a tutorial given to install / configure VSC / PlatformIO for programming my ESP12-E. I’ve created the simple test project “hello world” :

#include <Arduino.h>
#include <Nibble.h>
#include <Display/Display.h>

Display* display;
Sprite* sprite;

void setup() {
  display = Nibble.getDisplay();
  sprite = display->getBaseSprite();
  sprite->setCursor(0, 0);
  sprite->print("Hello world!");

void loop() {
  // put your main code here, to run repeatedly:

But it cannot compile due to many "locked files cause accessed by another process ":

> Executing task in folder NibbleTest1: C:\Users\[...]\.platformio\penv\Scripts\platformio.exe run <

Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 8266 (3.2.0) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
 - framework-arduinoespressif8266 3.30002.0 (3.0.2)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa 2.100300.210717 (10.3.0)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ deep+, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Nibble> 1.0.0
|   |-- <CircuitOS> 1.0.0
|   |   |-- <TFT_eSPI> 2.1.4
|   |   |   |-- <SPI> 1.0
|   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0
|   |   |-- <LittleFS> 0.1.0
|   |-- <TFT_eSPI> 2.1.4
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|-- <CircuitOS> 1.0.0
|   |-- <TFT_eSPI> 2.1.4
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|   |-- <Wire> 1.0
|   |-- <LittleFS> 0.1.0
|-- <TFT_eSPI> 2.1.4
|   |-- <SPI> 1.0
|-- <SPI> 1.0
|-- <Wire> 1.0
Building in release mode
Compiling .pio\build\esp12e\src\main.cpp.o
Generating LD script .pio\build\esp12e\ld\
Compiling .pio\build\esp12e\lib255\SPI\SPI.cpp.o
Le processus ne peut pas acc‚der au fichier car ce fichier est utilis‚ par un autre processus.
Le processus ne peut pas acc‚der au fichier car ce fichier est utilis‚ par un autre processus.
Compiling .pio\build\esp12e\lib19d\TFT_eSPI\TFT_eSPI.cpp.o
*** [.pio\build\esp12e\ld\] Error 1
Le processus ne peut pas acc‚der au fichier car ce fichier est utilis‚ par un autre processus.
*** [.pio\build\esp12e\src\main.cpp.o] Error 1
*** [.pio\build\esp12e\lib19d\TFT_eSPI\TFT_eSPI.cpp.o] Error 1
================================================================================================== [FAILED] Took 16.68 seconds ==================================================================================================Arrêt du processus de terminal "C:\Users\[...]\.platformio\penv\Scripts\platformio.exe 'run'". Code de sortie : 1.

I thought it was a basic problem, but nothing found on communities or webcrawlers (or maybe I’ve not used the right keywords or sites)…
I’ve tried to inactivate my anti-virus but the problem remains.
I’ve also tried on another computer : same issue !

Is there anyone who knows how to fix this problem?
Thanks in advance !

Operating system: Windows 10, latest VSC and PlatformIO Core 5.1.1

Which translates to

The process cannot access the file because it is being used by another process

I have not seen an instance of this error that wasn’t caused by an antivirus blocking execution.



Which one do you have installed?

Hi Max Gerhardt,
Thanks for your answer and the good translation.
I’m actually using Microsoft Defender.
I’ve tried to disable the real time protection to test, but it doesn’t fix the problem, so I’ve searched elsewhere… But your answer tells me to go on for it.
I’ll search for others options in Windows Security, but I’ll need to find how to create an exception only for vsc or PlatformIO executable to keep my security active…
If you have more details on it.

I’ve done this before at e.g. Hang creating new projects. Hang using pio install - #2 by maxgerhardt

As a sanity check you can see if it occurs for other projects too (that use a different compiler). If you follow PlatformIO IDE for VSCode — PlatformIO latest documentation to create a blinky example for an Arduino Uno, does compilation fail in the same way? (Don’t forget to use the project environment switcher to switch to the unoenvironment of the newly created project)

Sorry for being so late in responding, I’ve been a bit overwhelmed lately.
I try to find some free time to do other tests before sending you my feedback…
Actually it’s not solved and it don’t seems to be the AV, so I’m searching.
I will keep you posted as soon as possible!

Hi, I’ve got some news about my problem !
I’ve tried to install Visual Code with PlatformIO on the computer of my wife (with no development softwares) and the compilation is working !
So, it seems that my personal development environment is the origin of my problem…
I’m using Visual Studio 2019 Enterprise with the .NET Framework : have your already heard about problems of compatibility between Visual Code and Visual Studio ?
Any idea is welcome !
Thanks in advance