Skip to content

Build Error: "'xtensa-esp32-elf-g++' is not recognized as an internal or external command" on PlatformIO #307

@DreamerDeLy

Description

@DreamerDeLy

PROBLEM DESCRIPTION

When building the project for the esp32dev board, the following error is encountered:

Compiling .pio\build\esp32dev\lib576\Network\NetworkClient.cpp.o
'xtensa-esp32-elf-g++' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\esp32dev\lib576\Network\NetworkEvents.cpp.o
'xtensa-esp32-elf-g++' is not recognized as an internal or external command,
operable program or batch file.
Compiling .pio\build\esp32dev\lib576\Network\NetworkInterface.cpp.o
*** [.pio\build\esp32dev\lib576\Network\NetworkClient.cpp.o] Error 1
*** [.pio\build\esp32dev\lib576\Network\NetworkEvents.cpp.o] Error 1
'xtensa-esp32-elf-g++' is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\esp32dev\lib576\Network\NetworkInterface.cpp.o] Error 1

Troubleshooting Already Attempted:

  • Reinstalled the ESP32 toolchain.
  • Tried different versions of the ESP32 platform package.
  • Added the toolchain folder to the system PATH.

TO REPRODUCE

  1. Use the following configuration in platformio.ini:
[env:esp32dev]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
; platform = espressif32
board = esp32dev
framework = arduino
  1. Run the build using PlatformIO.

EXPECTED BEHAVIOUR

The project should compile successfully without errors related to the missing compiler (xtensa-esp32-elf-g++).

ADDITIONAL CONTEXT

PlatformIO system info.

PlatformIO Core             6.1.18
Python                      3.11.7-final.0
System Type                 windows_amd64
Platform                    Windows-10
File System Encoding        utf-8
Locale Encoding             cp1251
PlatformIO Core Directory   C:\Users\dream\.platformio
PlatformIO Core Executable  C:\Users\dream\.platformio\penv\Scripts\platformio.exe
Python Executable           C:\Users\dream\.platformio\penv\Scripts\python.exe
Global Libraries            0
Development Platforms       4
Tools & Toolchains          13

Metadata

Metadata

Assignees

No one assigned

    Labels

    Windows issueIssue is caused from WindowsduplicateThis issue or pull request already existsfor referenceexplains a function or behaviourwont/can't fixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions