The Esp.cpp file cannot be found when platformio compiles

I have been troubled by this problem for a long time. I hope someone can help me. Thank you.

Please show the content of your platformio.ini.

Please use pre-formatted text instead of a screensot.

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino

I have already send the text to you, and I would really appreciated if you can give me a reply.

Yes, but I need time to analyze, think and write an answer

Please use pre-formatted next time for better reading.


There is something strange about the path:

It looks like your username contains special characters. This can cause problems.

Which of the two paths exists on your hard disk (a or b)?
a) C:/Users/lcxz/...
b) C:/Users/l'c'x'z/...

I’m using path b, I’ll try modifying it

What is the suffix of the configuration file related to the first line of path?

ESP.cpp.o is the binary output from the compiler when it compiles ESP.cpp

Good afternoon, how to modify the location of the “.platformio” file during installation?

As per documentation: Environment variables — PlatformIO latest documentation

  • Close VS Code
  • Set the global environment variable “PLATFORMIO_CORE_DIR” to the desired directory.
  • Start VS Code and open your project
  • Wait until PlatformIO has completed all tasks (reinstallation in the desired directory)

If required: Delete the old files

Thank you, the problem has been solved and the program can be compiled and burned perfectly!!! :grinning:

1 Like