Good day, dear!
I apologize in advance for the English, as I translate through Google.
- When building my projects, I use a lot of my local libraries, which are located on disk “outside” the project directory. For example:
Libraries Directory: C: \ PlatformIO \ libs
Project directory: C: \ PlatformIO \ village_garage \
This is done in order to be able to use the same libraries in different projects.
- There are quite a lot of libraries, so they are distributed in several subfolders to simplify my work with them. For example:
C: \ PlatformIO \ libs \ system
C: \ PlatformIO \ libs \ peripherals
C: \ PlatformIO \ libs \ sensors
C: \ PlatformIO \ libs \ wifi
C: \ PlatformIO \ libs \ clouds
However, the compiler fundamentally disagrees with me
As long as all the libraries are in the root C: \ PlatformIO \ libs \ everything is fine. As soon as I pull libraries into subfolders, the library from one subfolder stops seeing the library from another subfolder.
C:/PlatformIO/libs/system/reStates/include/reStates.h:17:10: fatal error: reLed.h: No such file or directory
My platformio.ini file now looks like this:
; ---------------------------------------------------------------------------------------------
; General configuration
; ---------------------------------------------------------------------------------------------
[env]
; Build options
build_flags =
; Specifying where to look for project_config.h when building libraries
-Iinclude
; COM Monitor Filters
monitor_filters =
direct
log2file
; esp32_exception_decoder
; -------------------------------------------------- -------------------------------------------
; Libraries
; -------------------------------------------------- -------------------------------------------
; Public libraries from the PlatformIO Library Directory or GitHub
lib_deps =
; Local Libraries
lib_extra_dirs =
C: \ PlatformIO \ libs \ system
C: \ PlatformIO \ libs \ peripherals
C: \ PlatformIO \ libs \ sensors
C: \ PlatformIO \ libs \ wifi
C: \ PlatformIO \ libs \ clouds
; -------------------------------------------------- -------------------------------------------
; Sections
; -------------------------------------------------- -------------------------------------------
board_build.partitions = partitions.csv
; -------------------------------------------------- -------------------------------------------
; Include files
; -------------------------------------------------- -------------------------------------------
board_build.embed_txtfiles =
; DST Root CA X3 certificate (used as root for MQTT, OTA and other servers) is valid until September 30, 2021. 17:01:15
C: \ PlatformIO \ libs \ certs \ dst_root_ca_x3.pem
; Telegram API certificate is valid until May 23, 2022. 19:17:38
C: \ PlatformIO \ libs \ certs \ api_telegram_org.pem
; -------------------------------------------------- -------------------------------------------
; Controller configuration
; -------------------------------------------------- -------------------------------------------
[env: esp32dev]
platform = espressif32
board = esp32dev
framework = espidf
upload_speed = 921600
monitor_speed = 115200
QUESTION: How to properly configure platformio.ini to work with local libraries?