Fatal error: pins_arduino.h: No such file or directory

I have tried to compile a program already tested before and I am not able, it always gives error. I’m not an expert on this and I don’t know how to continue, I don’t know if it has to do with a recent update of the espressif32 library, I would appreciate an idea to follow.

Executing task in folder Configura GPS T-Bean: C:\Users\mator.platformio\penv\Scripts\pio.exe run
Processing ttgo-t-beam (platform: espressif32; board: ttgo-t-beam; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (3.1.0) > TTGO T-Beam
HARDWARE: ESP32 240MHz, 1.25MB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:- framework-arduinoespressif32 3.10005.210223 (1.0.5)- tool-esptoolpy 1.30000.201119 (3.0.0)- toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 31 compatible libraries
Scanning dependencies…
Dependency Graph
|-- <AXP202X_Library> 1.1.3
| |-- 1.0.1
|-- 1.0.1
Building in release mode
Compiling .pio\build\ttgo-t-beam\libb40\Wire\Wire.cpp.o
Archiving .pio\build\ttgo-t-beam\lib417\libAXP202X_Library.a
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\HardwareSerial.cpp:20:26: fatal error: pins_arduino.h: No such file or directory* Looking for pins_arduino.h dependency? Check our library registry!** CLI > platformio lib search “header:pins_arduino.h”* Web > PlatformIO Registry
compilation terminated.
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-sigmadelta.c.o
*** [.pio\build\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o] Error 1
C:\Users\mator.platformio\packages\framework-arduinoespressif32\libraries\Wire\src\Wire.cpp: In member function ‘bool TwoWire::begin(int, int, uint32_t)’:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\libraries\Wire\src\Wire.cpp:77:26: error: ‘SDA’ was not declared in this scope
sdaPin = SDA; //use Default Pin
^
C:\Users\mator.platformio\packages\framework-arduinoespressif32\libraries\Wire\src\Wire.cpp:94:26: error: ‘SCL’ was not declared in this scope
sclPin = SCL; // use Default pin
^
*** [.pio\build\ttgo-t-beam\libb40\Wire\Wire.cpp.o] Error 1
============================================================================================= [FAILED] Took 5.49 seconds =============================================================================================
The terminal process “C:\Users\mator.platformio\penv\Scripts\pio.exe ‘run’” terminated with exit code: 1. <

pltformio.ini
[env:ttgo-t-beam]
platform = espressif32
board = ttgo-t-beam
framework = arduino
lib_deps = lewisxhe/AXP202X_Library@^1.1.3

Not reproducable.

Processing ttgo-t-beam (platform: espressif32; board: ttgo-t-beam; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/ttgo-t-beam.html
PLATFORM: Espressif 32 (3.0.0) > TTGO T-Beam
HARDWARE: ESP32 240MHz, 1.25MB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10004.210126 (1.0.4)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <AXP202X_Library> 1.1.3
|   |-- <Wire> 1.0.1
Building in release mode
Compiling .pio\build\ttgo-t-beam\src\user_main.cpp.o
Compiling .pio\build\ttgo-t-beam\lib816\Wire\Wire.cpp.o
Compiling .pio\build\ttgo-t-beam\lib75c\AXP202X_Library\axp20x.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\main.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\ttgo-t-beam\lib816\libWire.a
Indexing .pio\build\ttgo-t-beam\lib816\libWire.a
Archiving .pio\build\ttgo-t-beam\lib75c\libAXP202X_Library.a
Indexing .pio\build\ttgo-t-beam\lib75c\libAXP202X_Library.a
Archiving .pio\build\ttgo-t-beam\libFrameworkArduino.a
Indexing .pio\build\ttgo-t-beam\libFrameworkArduino.a
Linking .pio\build\ttgo-t-beam\firmware.elf
Building .pio\build\ttgo-t-beam\firmware.bin
Retrieving maximum program size .pio\build\ttgo-t-beam\firmware.elf
Checking size .pio\build\ttgo-t-beam\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   1.1% (used 14756 bytes from 1310720 bytes)
Flash: [==        ]  19.5% (used 255919 bytes from 1310720 bytes)
esptool.py v3.0
=========================== [SUCCESS] Took 7.51 seconds ===========================

Please remove the folder C:\Users\mator\.platformio\packages\framework-arduinoespressif32 and retry building.

1 Like

Thanks for the help ,I have deleted the folder , everything seems the same has been created again but.

Executing task in folder Configura GPS T-Bean: C:\Users\mator.platformio\penv\Scripts\pio.exe run
Processing ttgo-t-beam (platform: espressif32; board: ttgo-t-beam; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.10005.0
Unpacking [####################################] 100%
Tool Manager: framework-arduinoespressif32 @ 3.10005.210223 has been installed!
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (3.1.0) > TTGO T-Beam
HARDWARE: ESP32 240MHz, 1.25MB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: - framework-arduinoespressif32 3.10005.210223 (1.0.5)- tool-esptoolpy 1.30000.201119 (3.0.0)- toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 31 compatible libraries
Scanning dependencies…
Dependency Graph
|-- <AXP202X_Library> 1.1.3
| |-- 1.0.1
|-- 1.0.1
Building in release mode
Compiling .pio\build\ttgo-t-beam\src\main.cpp.o
Compiling .pio\build\ttgo-t-beam\libb40\Wire\Wire.cpp.o
Compiling .pio\build\ttgo-t-beam\lib417\AXP202X_Library\axp20x.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\IPv6Address.cpp.o
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\HardwareSerial.cpp:20:26: fatal error: pins_arduino.h: No such file or directory* Looking for pins_arduino.h dependency? Check our library registry!** CLI > platformio lib search “header:pins_arduino.h”* Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o] Error 1
In file included from src\main.cpp:1:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:185:26: fatal error: pins_arduino.h: No such file or director* Looking for pins_arduino.h dependency? Check our library registry!* CLI > platformio lib search “header:pins_arduino.h”* Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\src\main.cpp.o] Error 1
In file included from C:\Users\mator.platformio\packages\framework-arduinoespressif32\libraries\Wire\src\Wire.cpp:33:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:185:26: fatal error: pins_arduino.h: No such file or directory
Looking for pins_arduino.h dependency? Check our library registry! CLI > platformio lib search “header:pins_arduino.h”
Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\libb40\Wire\Wire.cpp.o] Error 1
In file included from .pio\libdeps\ttgo-t-beam\AXP202X_Library\src\axp20x.h:43:0,
from .pio\libdeps\ttgo-t-beam\AXP202X_Library\src\axp20x.cpp:39:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:185:26: fatal error: pins_arduino.h: No such file or directory****** Looking for pins_arduino.h dependency? Check our library registry!
CLI > platformio lib search “header:pins_arduino.h”
Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\lib417\AXP202X_Library\axp20x.cpp.o] Error 1
In file included from C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\Esp.cpp:15:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\Arduino.h:185:26: fatal error: pins_arduino.h: No such file or directory
Looking for pins_arduino.h dependency? Check our library registry!
CLI > platformio lib search “header:pins_arduino.h”
Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\FrameworkArduino\Esp.cpp.o] Error 1
In file included from C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\FunctionalInterrupt.cpp:22:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\Arduino.h:185:26: fatal error: pins_arduino.h: No such file or directory
Looking for pins_arduino.h dependency? Check our library registry!
CLI > platformio lib search “header:pins_arduino.h”
Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\FrameworkArduino\FunctionalInterrupt.cpp.o] Error 1
In file included from C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\IPAddress.cpp:20:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:185:26: fatal error: pins_arduino.h: No such file or directory
Looking for pins_arduino.h dependency? Check our library registry!
CLI > platformio lib search “header:pins_arduino.h”
Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\FrameworkArduino\IPAddress.cpp.o] Error 1
In file included from C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32\IPv6Address.cpp:15:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:185:26: fatal error: pins_arduino.h: No such file or directory
Looking for pins_arduino.h dependency? Check our library registry!
CLI > platformio lib search “header:pins_arduino.h”
Web > PlatformIO Registry
compilation terminated.
*** [.pio\build\ttgo-t-beam\FrameworkArduino\IPv6Address.cpp.o] Error 1
============================================================================================= [FAILED] Took 15.31 seconds =============================================================================================The terminal process “C:\Users\mator.platformio\penv\Scripts\pio.exe ‘run’” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.<

Try deleting C:\Users\mator\.platformio\.cache plus

that again.

1 Like

Thank you very much for your interest, it seems to be the same, I have deleted the two folders and it does not seem to look better .

Executing task in folder Configura GPS T-Bean: C:\Users\mator.platformio\penv\Scripts\pio.exe run
Processing ttgo-t-beam (platform: espressif32; board: ttgo-t-beam; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (3.1.0) > TTGO T-Beam
HARDWARE: ESP32 240MHz, 1.25MB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: - framework-arduinoespressif32 3.10005.210223 (1.0.5) - tool-esptoolpy 1.30000.201119 (3.0.0)- toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 31 compatible libraries
Scanning dependencies…
Dependency Graph
|-- <AXP202X_Library> 1.1.3
| |-- 1.0.1
|-- 1.0.1
Building in release mode
Compiling .pio\build\ttgo-t-beam\src\main.cpp.o
Compiling .pio\build\ttgo-t-beam\libb40\Wire\Wire.cpp.o
Compiling .pio\build\ttgo-t-beam\lib417\AXP202X_Library\axp20x.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\ttgo-t-beam\FrameworkArduino\IPv6Address.cpp.o
In file included from src\main.cpp:1:0:
C:\Users\mator.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:185:26: fatal error: pins_arduino.h: No such file or director
etc…

Make sure you temporarily disable your antivirus so it can’t interfere, close VSCode, remove the whole C:\Users\mator\.platformio\ folder, then restart VSCode and wait for the reinstall to finish.

Thank you for your time , but not, the same answer. now I have a lot of problems reinstalling, all similar to these

And also this in output:

[1/3/2021 21:46:41] No se puede resolver la configuración con compilerPath: “C:/Users/mator/.platformio/packages/toolchain-xtensa32@2.50200.97/bin/xtensa-esp32-elf-gcc.exe”

[1/3/2021 21:46:41] No se puede resolver la configuración con compilerPath: “C:/Users/mator/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc.exe”

I have seen that in the include paht refers to the folder:

…"C:/Users/mator/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/nimble

but this folder " nimble" does not exist,

I looked at github and there is no such folder :
(GitHub - espressif/arduino-esp32: Arduino core for the ESP32)

And also the folder :

“C:/Users/mator/.platformio/packages/framework-arduinoespressif32/variants/t-beam”,

is missing " t-bean" but exist “tbean” folder :

“C:/Users/mator/.platformio/packages/framework-arduinoespressif32/variants/tbeam”,

In the first case as not exist I do not know what to do, in the second case could be changed?.

Some idea?

This indeed wrong and has been fixed in the latest PR (Fix issue #502 by cyberman54 · Pull Request #505 · platformio/platform-espressif32 · GitHub). See docs on how to use the upstream version, then that error should be gone.

As for the others: Yeah these warnings can be ignored.

thanks, it’s solved , thanks, it’s solved, I’ve changed the platformio.ini and it compiled fine without errors. :+1:

[env:ttgo-t-beam]
platform = GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO
board = ttgo-t-beam
framework = arduino
lib_deps = lewisxhe/AXP202X_Library@^1.1.3

Regarding the warning for referencing the non-existent folder nimble, see Cannot find nimble since espressif32 update a few days ago, a fix is on the way (but as said, non-critical)

1 Like

Hello there,
topic is very old but seems latest update again broke pins_arduino.h
I can see it here
c:\Users\.platformio\packages\framework-arduinoespressif32@3.20004.220825\variants\d1_mini32
but there is no “variants” folder there
c:\Users\.platformio\packages\framework-arduinoespressif32\

Then your folder is corrupted, not PlatformIO’s registry version. Remove c:\Users\.platformio\packages\framework-arduinoespressif32\ fully and rebuild your project.

C:/Users/elior/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory


  • Looking for pins_arduino.h dependency? Check our library registry!
  • CLI > platformio lib search “header:pins_arduino.h”
  • Web > PlatformIO Registry

#include “pins_arduino.h”
^~~~~~~~~~~~~~~~
compilation terminated.
In file included from C:/Users/elior/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:83,
from C:/Users/elior/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36,
from .pio/libdeps/esp32doit-devkit-v1/AsyncTCP-esphome/src/AsyncTCP.cpp:22:
C:/Users/elior/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory
can someone help me fix this error?

@shmiltz.work What’s the content of your platformio.ini ?

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps =
    ottowinter/ESPAsyncWebServer-esphome@^3.1.0
    mobizt/Firebase ESP32 Client@4.3.19
    esphome/ESPAsyncWebServer-esphome@^3.1.0
    adafruit/Adafruit SSD1306@^2.5.7

Your Espressif32 platform may be corrupted.

My recommendation:

  • Close VS Code
  • Delete the folder(s) c:\users\username.platformio\platforms\espressif32*.
  • Restart VS Code
  • Wait until PlatformIO has completed the (re)installation of the Espressif32 Platform and all tasks have been successfully completed.

thank you very much i will try it