Compile error "xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory"

error:

Dependency Graph
|-- douhenhuid-project-1_inferencing @ 1.0.7
|-- EloquentArduino @ 2.1.3
|-- Wire @ 2.0.0
Building in release mode
Compiling .pio\build\esp32dev\src\main.cpp.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_scale_f32.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_sub_q15.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_sub_q31.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_sub_q7.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_xor_u16.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_xor_u32.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_xor_u8.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BayesFunctions\arm_gaussian_naive_bayes_predict_f16.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BayesFunctions\arm_gaussian_naive_bayes_predict_f32.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_common_tables.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_common_tables_f16.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_const_structs.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_const_structs_f16.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_mve_tables.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_mve_tables_f16.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\ComplexMathFunctions\arm_cmplx_conj_f16.c.o
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\ComplexMathFunctions\arm_cmplx_conj_f32.c.o
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
Compiling .pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\ComplexMathFunctions\arm_cmplx_conj_q15.c.o
*** [.pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_mve_tables.c.o] Error 1
*** [.pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_common_tables_f16.c.o] Error 1
*** [.pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_const_structs_f16.c.o] Error 1
*** [.pio\build\esp32dev\lib92b\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\CommonTables\arm_const_structs.c.o] Error 1
In file included from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/dsp/memory.hpp:38,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/dsp/ei_alloc.h:34,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/dsp/ei_vector.h:34,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/dsp/numpy_types.h:40,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/classifier/ei_classifier_types.h:41,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/classifier/ei_model_types.h:40,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h:38,
                 from C:/Users/DOUBUHUI/Documents/Arduino/libraries/douhenhuid-project-1_inferencing/src/douhenhuid-project-1_inferencing.h:49,
                 from src/main.cpp:7:
c:\users\doubuhui\documents\arduino\libraries\douhenhuid-project-1_inferencing\src\edge-impulse-sdk\porting\ei_classifier_porting.h:310: warning: "EI_PORTING_ARDUINO" redefined
 #define EI_PORTING_ARDUINO        0

c:\users\doubuhui\documents\arduino\libraries\douhenhuid-project-1_inferencing\src\edge-impulse-sdk\porting\ei_classifier_porting.h:279: note: this is the location of the previous definition
 #define EI_PORTING_ARDUINO      1

Compile error when compling following code

#include  <Wire.h>
#include  <eloquent.h>
#include  <eloquent/modules/vl53l5cx/8x8.h>
#include  <eloquent/collections/circular_buffer.h>

// replace this with the library downloaded from Edge Impulse
#include  <douhenhuid-project-1_inferencing.h>
#include  <eloquent/tinyml/edgeimpulse.h>
#include  <eloquent/tinyml/voting/quorum.h>

Eloquent::Collections::FloatCircularBuffer<EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE> buffer;
Eloquent::TinyML::EdgeImpulse::Impulse  impulse(false);
// replace 7 with the number of votes you want to use
// the higher the value, the less noisy the predictions will be
// setting a too high value, though, will make the classifier less responsive
Eloquent::TinyML::Voting::Quorum<7> voting;


void  setup() {
	Serial.begin(115200);
	Wire.begin();
	Wire.setClock(400000);

	// vllcx.highFreq();
	vllcx.truncateLowerThan(30);
	vllcx.truncateHigherThan(400);
	vllcx.scaleToRange(0, 1);

	// a prediction is considered not noisy if it equals
	// at least half of the last N
	voting.atLeastMajority();

	if (!vllcx.begin())
		eloquent::abort(Serial, "vl53l5cx not found");

	Serial.println("vl53l5cx is ok");
	Serial.println("Start collecting data...");
}

void  loop() {
	if (!vllcx.hasNewData() || !vllcx.read() || vllcx.mean() > 0.98)
		// await data is ready or object is in the field of view
		return;

	if (!buffer.push(vllcx.distances, 64))
		// Queue is not full
		return;

	// we are ready to classify the gesture
	uint8_t prediction = impulse.predict(buffer.values);

	if (impulse.getProba() < 0.7)
		// (optional) discard weak predictions
		return;

	if (voting.vote(prediction) < 0)
		// prediction is noisy
		return;

	Serial.print("Predicted label: ");
	Serial.print(impulse.getLabel());
	Serial.print(" with probability ");
	Serial.println(impulse.getProba());

	// debug class probabilities and timings
	//impulse.printTo(Serial);
}

platformio.ini:

  [env:esp32dev] platform = espressif32@5.3.0 board = esp32dev framework = arduino lib_extra_dirs = C:\Users\DOUBUHUI\Documents\Arduino\libraries

successfully compile following code:

#include  <Wire.h>
#include  <eloquent.h>
#include  <eloquent/modules/vl53l5cx/8x8.h>

void  setup() {
	Serial.begin(115200);
	Wire.begin();
	Wire.setClock(400000);

	// vllcx.highFreq();
	vllcx.truncateLowerThan(30);
	vllcx.truncateHigherThan(400);
	vllcx.scaleToRange(0, 1);

	// detect object when at least 10 values out of 64 are below 0.95
	vllcx.detectObjectsWhenNearerThan(0.95, 10);

	if (!vllcx.begin())
		eloquent::abort(Serial, "vl53l5cx not found");

	Serial.println("vl53l5cx is ok");
	Serial.println("Start collecting data...");
	delay(3000);
}

void  loop() {
	if (!vllcx.hasNewData() || !vllcx.read())
		// await data is ready
		return;

	if (!vllcx.hasObjectsNearby())
		// await object in field of view
		return;

	vllcx.printTo(Serial);
}

platform = espressif32@5.3.0

Version 5.3.0 is about 3 years old! The latest official available version is 6.12.0.
If you need the latest available Espressif32 Arduino Framework version, use pioarduino:

platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip

lib_extra_dirs = C:\Users\DOUBUHUI\Documents\Arduino\libraries

Remove this line! This will always lead to issues.
Unlike ArduinoIDE, libraries are not installed globally but per project.

Install the necessary libraries per project.

Thanks for your help! Now I have installed libraries under \Projects\tof.pio\libdeps\esp32dev and use v6.11.0.

[env:esp32dev]
platform = espressif32@6.11.0
board = esp32dev
framework = arduino
lib_deps =
    SparkFun VL53L5CX Arduino Library@^1.0.3
    https://github.com/eloquentarduino/EloquentArduino.git
    douhenhuid-project-1_inferencing

But the error happned again, even in the former successfully compiled code.

xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-ledc.c.o
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory
*** [.pio\build\esp32dev\FrameworkArduino\esp32-hal-bt.c.o] Error 1
*** [.pio\build\esp32dev\FrameworkArduino\esp32-hal-gpio.c.o] Error 1

Did you perform a “clean” ?

Yes I did cleaning. And I deleted .platformio and reinstalled platformio extension but still error

xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory 
xtensa-esp32-elf-gcc: error: CreateProcess: No such file or directory 
*** [.pio\build\esp32dev\libb73\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_add_f32.c.o] Error 1 
*** [.pio\build\esp32dev\libb73\douhenhuid-project-1_inferencing\edge-impulse-sdk\CMSIS\DSP\Source\BasicMathFunctions\arm_add_f64.c.o] Error 1 

And have erroe output from vscode c++ extention:

 [2025/11/11 17:14:50] can not use compilerPath 
setting:“C:/Users/DOUBUHUI/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc.exe”

This zip contains douhenhuid-project-1_inferencing.zip libraryand 2 main cpp code and the platformio.ini, you can try to reproduce the error if that is convenient.

That’s a quite big library!

Try the following file structure and platformio.ini:

.
├── lib
│   └── douhenhuid-project-1_inferencing
│       └── ...
├── src
│   ├── main1.cpp
│   └── main2.cpp
└── platformio.ini

platformio.ini:

[env]
platform = espressif32@6.11.0
board = esp32dev
framework = arduino
lib_deps =
    SparkFun VL53L5CX Arduino Library@^1.0.3
    https://github.com/eloquentarduino/EloquentArduino.git

[env:main1]
build_src_filter = 
  -<*> +<main1.cpp>

[env:main2]
build_src_filter = 
  -<*> +<main2.cpp>

The platformio.ini above gives you 2 different environments. One for main1.cpp and one for main2.cpp.

Result:

Environment    Status    Duration
-------------  --------  ------------
main1          SUCCESS   00:00:10.536
main2          SUCCESS   00:01:23.659

Where is your project located? Maybe you run into windows path limit. The path names and executue commands can grow very quickly during the build process. Place your project in the shortest path possible (C:\tof\).

It turns out that compile successfully on another pc, mabe because I’ve installed Arduino IDE and other Arduino extension on VSCode and mess up the environment .

ArduinoIDE should cause no confilcts. “Other extensions” may be a reason.

If you turn on NTFS Long Paths on the ““non working”” Windows machine and reboot, does it compile the project succesfully? :slight_smile: