Adding pins_arduino.h to a project

I am new to Platform.io . I am trying to compile a project and I keep getting a build error the “pins_arduino.h” can’t be found. I use the Library search and nothing resembling pins_arudino.h . I did find it on Github but I don’t know how to add it to the project…
Thanks
Mike

pins_arduino.h is inherent for the pin definitions of a variant / board, such as in ESP32. It should be built-in. Not finding it means there is an underlying problem, you’re not supposed to add it yourself.

Please post your whole PlatformIO project, or at least the platformio.ini file.

Thanks for the reply… I feel pretty stupid… I can’t upload the platformio.ini file because I keep getting an error. File has to be .jpg, png etc. Not sure how to get around that.
tnx
Mike

You can use Github, Dropbox, Google Drive etc. to upload project files, or just put the text content inside your reply post inside a code block.

grafik

I hope that this works… not only a noob , but an old noob :slight_smile:
tnx for the help.
Mike

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = ttgo-t-beam-v1

[env]
platform = espressif32 @ 6.3.1
framework = arduino
lib_ldf_mode = deep+
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
lib_deps = 
	adafruit/Adafruit BusIO@^1.14.1
	adafruit/Adafruit GFX Library @ 1.11.7
	adafruit/Adafruit SSD1306 @ 2.5.7
	lewisxhe/AXP202X_Library @ 1.1.3
	bblanchon/ArduinoJson @ 6.21.3
	sandeepmistry/LoRa @ 0.8.0
	mikalhart/TinyGPSPlus @ 1.0.3
	paulstoffregen/Time @ 1.6.1
	shaggydog/OneButton @ 1.5.0
	peterus/esp-logger @ 1.0.0
	lewisxhe/XPowersLib@^0.1.8
	adafruit/Adafruit SH110X@^2.1.8
	jgromes/RadioLib @ 6.1.0
	adafruit/Adafruit Unified Sensor@^1.1.9
	adafruit/Adafruit BME280 Library@^2.2.2
check_tool = cppcheck
check_flags = 
	cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK
check_skip_packages = yes
board_build.partitions = no_ota.csv

[env:ttgo-t-beam-v0_7]
board = ttgo-t-beam
build_flags = -Werror -Wall -DTTGO_T_Beam_V0_7
lib_deps = 
	adafruit/Adafruit GFX Library@^1.11.9
	ress997/TinyGPSPlusPlus@^0.0.4
	bblanchon/ArduinoJson@^6.21.4
	pololu/FastGPIO@^2.2.0

[env:ttgo-t-beam-v1]
board = ttgo-t-beam
build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0
lib_deps = 
	adafruit/Adafruit GFX Library@^1.11.9
	ress997/TinyGPSPlusPlus@^0.0.4
	bblanchon/ArduinoJson@^6.21.4
	pololu/FastGPIO@^2.2.0

[env:ttgo-t-beam-v1_SX1268]
board = ttgo-t-beam
build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0_SX1268
lib_deps = 
	adafruit/Adafruit GFX Library@^1.11.9
	ress997/TinyGPSPlusPlus@^0.0.4
	bblanchon/ArduinoJson@^6.21.4
	pololu/FastGPIO@^2.2.0

[env:ttgo-t-beam-v1_2]
board = ttgo-t-beam
build_flags = -Werror -Wall -DTTGO_T_Beam_V1_2
lib_deps = 
	adafruit/Adafruit GFX Library@^1.11.9
	ress997/TinyGPSPlusPlus@^0.0.4
	bblanchon/ArduinoJson@^6.21.4
	pololu/FastGPIO@^2.2.0

[env:ttgo-t-lora-v2_1]
board = ttgo-lora32-v21
build_flags = -Werror -Wall -DTTGO_T_LORA_V2_1
lib_deps = 
	adafruit/Adafruit GFX Library@^1.11.9
	ress997/TinyGPSPlusPlus@^0.0.4
	bblanchon/ArduinoJson@^6.21.4
	pololu/FastGPIO@^2.2.0

And which of those environments have you selected as the active one?

Should be the ttgo-t-beam-v1
tnx
Mike

A test project with just

[env:ttgo-t-beam]
platform = espressif32 @ 6.3.1
board = ttgo-t-beam
framework = arduino

compiled fine for me. You might have corrupted packages.

Delete the folders

  • C:\Users\<user>\.platformio\.cache
  • C:\Users\<user>\.platformio\packages\framework-arduinoespressif32

and try building again.

Neither of those files/folders are there.
the only files in the platformio folder are the project(s)
tnx
Mike

Then you are looking in the wrong folder. Those paths shold contain the PlatformIO core, not user projects.

thank Max for your patience.
Didn’t pay attention to details , didn’t see that it was .platformio with the leading decimal point.
Found the folders and deleted them.
Tried the build again…thought that it was going to work but after a few minutes I still got
errors… couldn’t find the following libraries.
Adafruit_Sensors.h
TinyGPS++.h
OneButton.h
logger.h
tnx for the help.
Mike

After deleting said folder (.platformio\.cache and .platformio\packages in your user directory), please update / resolve the dependencies (I do it via the plugin in CLion - not sure what you are using, but there must be a way to update dependencies and thereby have platformio re-download the framework).

Please also copy&paste complete log outputs as you did with the platformio.ini. It helps discovering and sometimes fixing (potential) mistakes.

Thanks for the help.... here is the output from the terminal.
tnx
Mike
Tool Manager: framework-arduinoespressif32@3.20009.0 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/ttgo-t-beam.html
PLATFORM: Espressif 32 (6.3.1) > TTGO T-Beam
HARDWARE: ESP32 240MHz, 1.25MB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 
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.20009.0 (2.0.9)
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep+, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Adafruit GFX Library @ 1.11.9
|-- TinyGPSPlusPlus @ 0.0.4
|-- ArduinoJson @ 6.21.4
|-- FastGPIO @ 2.2.0
|-- BluetoothSerial @ 2.0.0
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- SPIFFS @ 2.0.0
|-- APRSPacketLib
|-- KISS_TO_TNC2
|-- Adafruit BusIO @ 1.14.5
|-- Wire @ 2.0.0
|-- SPI @ 2.0.0
Building in release mode
Compiling .pio\build\ttgo-t-beam-v1\src\LoRa_APRS_Tracker.cpp.o
Compiling .pio\build\ttgo-t-beam-v1\src\bluetooth_utils.cpp.o
Compiling .pio\build\ttgo-t-beam-v1\src\bme_utils.cpp.o
src/bluetooth_utils.cpp:1:10: fatal error: TinyGPS++.h: No such file or directory

*******************************************************************
* Looking for TinyGPS++.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:TinyGPS++.h"
* Web  > https://registry.platformio.org/search?q=header:TinyGPS%2B%2B.h
*
*******************************************************************

 #include <TinyGPS++.h>
          ^~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\ttgo-t-beam-v1\src\configuration.cpp.o
Compiling .pio\build\ttgo-t-beam-v1\src\display.cpp.o
*** [.pio\build\ttgo-t-beam-v1\src\bluetooth_utils.cpp.o] Error 1
Compiling .pio\build\ttgo-t-beam-v1\src\gps_utils.cpp.o
src/gps_utils.cpp:1:10: fatal error: TinyGPS++.h: No such file or directory

*******************************************************************
* Looking for TinyGPS++.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:TinyGPS++.h"
* Web  > https://registry.platformio.org/search?q=header:TinyGPS%2B%2B.h
*
*******************************************************************

 #include <TinyGPS++.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\ttgo-t-beam-v1\src\gps_utils.cpp.o] Error 1
In file included from src/bme_utils.cpp:1:
src/bme_utils.h:5:10: fatal error: Adafruit_Sensor.h: No such file or directory

*************************************************************************
* Looking for Adafruit_Sensor.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Adafruit_Sensor.h"   
* Web  > https://registry.platformio.org/search?q=header:Adafruit_Sensor.h
*
*************************************************************************

 #include <Adafruit_Sensor.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\ttgo-t-beam-v1\src\bme_utils.cpp.o] Error 1 
src/display.cpp:2:10: fatal error: logger.h: No such file or directory

****************************************************************
* Looking for logger.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:logger.h"
* Web  > https://registry.platformio.org/search?q=header:logger.h
*
****************************************************************

 #include <logger.h>
          ^~~~~~~~~~
compilation terminated.
*** [.pio\build\ttgo-t-beam-v1\src\display.cpp.o] Error 1
src/LoRa_APRS_Tracker.cpp:2:10: fatal error: OneButton.h: No such file or directory

*******************************************************************
* Looking for OneButton.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:OneButton.h"
* Web  > https://registry.platformio.org/search?q=header:OneButton.h
*
*******************************************************************

 #include <OneButton.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\ttgo-t-beam-v1\src\LoRa_APRS_Tracker.cpp.o] 
Error 1
src/configuration.cpp:5:10: fatal error: logger.h: No such file or directory

****************************************************************
* Looking for logger.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:logger.h"
* Web  > https://registry.platformio.org/search?q=header:logger.h
*
****************************************************************

 #include "logger.h"
          ^~~~~~~~~~
compilation terminated.
*** [.pio\build\ttgo-t-beam-v1\src\configuration.cpp.o] Error 1
=============== [FAILED] Took 510.58 seconds ===============
Environment     Status    Duration
--------------  --------  ------------
ttgo-t-beam-v1  FAILED    00:08:30.582
========== 1 failed, 0 succeeded in 00:08:30.582 ========== 

 *  The terminal process "C:\Users\mooksmd\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

The library TinyGPSPlusPlus @ 0.0.4 is providing TinyGPSPlus.h, not TinyGPS++.h. You’ll want to use this version of the libary: https://github.com/mikalhart/TinyGPSPlus/tree/master, which is

lib_deps =
  mikalhart/TinyGPSPlus@^1.0.3

Simliarly this is mathertel/OneButton@^2.5.0 from here. The lib_deps section of your platformio.ini file seems messed up.

Maybe to elaborate more: This is contradicting. The lib_deps in [env] section declares a list, which is overwritten by the lib_deps list in [env:ttgo-t-beam-v1]. In PlatformIO, they don’t add, they overwrite it each other. In the ttgo-t-beam-v1 environment, you explicitly have to reference the lib_deps section of [env] the nadd your stuff on top of it.

Nonethess, the library list makes no sense. In env it has mikalhart/TinyGPSPlus @ 1.0.3 (good, this is correct!) and then in env:ttgo-t-beam-v1 it has ress997/TinyGPSPlusPlus@^0.0.4 (wrong library).

Something really simple to do: Delete the lib_deps section in [env:ttgo-t-beam-v1] completely, so that the ones in [env] are used. That already has all libraries, except pololu/FastGPIO@^2.2.0. If that library is really needed, add it in the list.

Wow… that worked. I deleted the lib_deps section and it flew from there.
This begs the question: why have the lib_deps section at all if it works without it?
tnx
Mike

If you still have the lib_deps section in [env], then that is used. [env] is special in the sense that all the settings in there are inherited by all other environments, unless a enviornment explicitly redefines a setting (as happened with lib_deps in ttgo-..).

All of this is written in the documentation.

https://docs.platformio.org/en/latest/projectconf/index.html

Thanks , I will read it .
Mike

I am working on a LoRa project. I have one Unit ( the receiver, iGate) working but am now working on the transmitter ( LoRa Tracker). The build went fine , but when I tried to make the FileSystem image, I get this error.

 *  Executing task in folder LoRa_APRS_Tracker-master: C:\Users\mooksmd\.platformio\penv\Scripts\platformio.exe run --target buildfs --environment ttgo-t-beam-v1 

Processing ttgo-t-beam-v1 (board: ttgo-t-beam; platform: espressif32 @ 6.0.1; 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 (6.0.1) > TTGO T-Beam
HARDWARE: ESP32 240MHz, 1.25MB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 
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.20006.221224 (2.0.6)    
 - tool-esptoolpy @ 1.40400.0 (4.4.0)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep+, Compatibility ~ soft
Found 44 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Adafruit GFX Library @ 1.11.5
|-- Adafruit SSD1306 @ 2.5.7
|-- ArduinoJson @ 6.21.2
|-- AXP202X_Library @ 1.1.3
|-- LoRa @ 0.8.0
|-- APRS-Decoder-Lib @ 0.0.6
|-- TinyGPSPlus @ 1.0.3
|-- Time @ 1.6.1
|-- OneButton @ 1.5.0
|-- esp-logger @ 1.0.0
|-- SPI @ 2.0.0
|-- WiFi @ 2.0.0
|-- Wire @ 2.0.0
|-- SPIFFS @ 2.0.0
|-- FS @ 2.0.0
|-- Adafruit BusIO @ 1.14.1
Building in release mode
Building FS image from 'data' directory to .pio\build\ttgo-t-beam-v1\spiffs.bin
/LoRa_APRS_Tracker-master(1).code-workspace
SPIFFS_write error(-10010): unknown
error adding file!
*** [.pio\build\ttgo-t-beam-v1\spiffs.bin] Error 1
================ [FAILED] Took 5.87 seconds ================
Environment     Status    Duration
--------------  --------  ------------
ttgo-t-beam-v1  FAILED    00:00:05.875
========== 1 failed, 0 succeeded in 00:00:05.875 ========== 

 *  The terminal process "C:\Users\mooksmd\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'buildfs', '--environment', 'ttgo-t-beam-v1'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Any help would be much appreciated.
tnx
mike