How to fix this error

IDE: VScode


Operating system: Windows 11

Board: esp32doit-devkit-v1

*** [.pio\build\esp32dev\sections.ld] Error 1

Error: Nothing to build

Uploading stage has failed, see errors above. Use pio test -vvv option to enable verbose output.

Platform.Ini file:


platform = espressif32

board = esp32doit-devkit-v1

framework = espidf

upload_port = COM7


Edit: For more details, there was no dangerous functions or any errors. My port is com7 and yes, my USB cable isn’t only for charging. However, when I test run it, it said there was nothing to build. I followed all the tutorials and solutions on stackoverflow and youtube yet none works.

Is there any reliable way of fixing this?

Why’s there an empty [env:env1]?

Can you upload the exact project you’re having problems with?