Pioarduino, plateformeio.ini config

Hello, I am new for pioArduino. I have a workin projet with arduino platefome but I would like to move with plateformIO. I work hard to configure plateformeIo.ini and after a week it doesnt work…
Here is my plateformeIo.ini:

[env:esp32dev]
board = esp32dev
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
	
lib_ldf_mode = chain
framework = arduino
board_build.flash_mode = qio
build_flags = -Ilib
	-I"${PROJECT_DIR}/lib"
	-DARDUINOJSON_ENABLE_COMMENTS=1
build_src_filter = 
	+<../lib/*/src/*.*>
	-<PCF8574/test/>
board_build.partitions = huge_app.csv
board_build.filesystem = littlefs
monitor_filters = esp32_exception_decoder, direct, log2file
build_type = debug
monitor_speed = 115200
upload_speed = 921600
lib_deps = 
	emelianov/modbus-esp8266@^4.1.0
	robtillaart/PCF8574@^0.4.1
	esp32async/AsyncTCP @ 3.3.8
	esp32async/ESPAsyncWebServer @ ^3.7.4
	bblanchon/ArduinoJson@7.3.0
	;lorol/LittleFS_esp32@^1.0.6
lib_ignore = 
	AsyncTCP_RP2040W
	ESPAsyncTCP
	;+<*.cpp> +<*.c>

There is a lot of compilation errors:
In file included from lib/Formaca/src/Formaca.cpp:1:
lib/Formaca/Formaca.h:2:10: fatal error: LittleFS.h: No such file or directory


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

2 | #include <LittleFS.h>
  |          ^~~~~~~~~~~~

compilation terminated.
*** [.pio\build\esp32dev\lib\Formaca\src\Formaca.cpp.o] Error 1
In file included from lib/PLC_Persistence/src/PLC_Persistence.cpp:1:
lib/PLC_Persistence/PLC_Persistence.h:5:10: fatal error: LittleFS.h: No such file or directory
And the compiler doesn’t find NetworkServer.

Many thanks for your help !

This breaks library detection through the library dependency finder (LDF), see documentation. Please try it without these manual inclusions.

Just try this:

[env:esp32dev]
board = esp32dev
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
lib_ldf_mode = deep+
framework = arduino
board_build.flash_mode = qio
build_flags =
	-DARDUINOJSON_ENABLE_COMMENTS=1
build_src_filter = 
	-<PCF8574/test/>
board_build.partitions = huge_app.csv
board_build.filesystem = littlefs
monitor_filters = esp32_exception_decoder, direct, log2file
build_type = debug
monitor_speed = 115200
upload_speed = 921600
lib_deps = 
	emelianov/modbus-esp8266@^4.1.0
	robtillaart/PCF8574@^0.4.1
	esp32async/AsyncTCP @ 3.3.8
	esp32async/ESPAsyncWebServer @ ^3.7.4
	bblanchon/ArduinoJson@7.3.0
lib_ignore = 
	AsyncTCP_RP2040W
	ESPAsyncTCP

Many thanks for your reply. I would like to know where I can put libraries frmo my own developpement. Actually the main source is in src and all library are on the folder lib. I copy past the plateformeIo.ini you suggest me and I have the following error:
Error: Nothing to build. Please put your source code files to the ‘C:\Users\vorms\Documents\PlatformIO\Projects\Formaca\src’ folder.
If I copy past the link in the explorer I found the file main.cpp. This is almost correct ! Sorry I am very new for plateformeIo /pioarduino, I have a lot of experience in Arduino ide but I must to move. Many thanks for your help

Oh, then delete the

build_src_filter = 
	-<PCF8574/test/>

section. This expression just says “exclude this folder” but doesn’t actually include any source files. I guess there is no Formaca/src/PCF8574/test/ folder?

in my experience using other modes than chain is problematic. Generates more issues than it solves.
Most of the time setup is wrong when mode chain is not working.

Hello,
Thanks for your reply.
I have the same error:
Error: Nothing to build. Please put your source code files to the ‘C:\Users\vorms\Documents\PlatformIO\Projects\Formaca\src’ folder
If I ctrl click on the path, it goes to the src folder. In this folder there is one file: main.cpp. This file has the method setup() and loop().
.

That should not be possible. Can you upload the project as a whole somewhere?

Hello, the project is here:

I would lije to offer one cafe if you can help me…
Many thanks

But these lines are still there?

Hello, this is just for not compiling the PCF8574/test/.
I use the PCF8574 but I don’t want to compile the test part
The main is on src folder, all libraries that I make is on lib folder.

Many thanks

Remove the line

build_src_filter = 
  -<PCF8574/test/>

and move all sub-folders from ./lib to ./src as they are no valid libraries and your project compiles without issues:

[env:esp32dev]
board = esp32dev
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
lib_ldf_mode = chain
framework = arduino
board_build.flash_mode = qio
build_flags =
	-DARDUINOJSON_ENABLE_COMMENTS=1
; build_src_filter = 
; 	-<PCF8574/test/>
board_build.partitions = huge_app.csv
board_build.filesystem = littlefs
monitor_filters = esp32_exception_decoder, direct, log2file
build_type = debug
monitor_speed = 115200
upload_speed = 921600
lib_deps = 
	emelianov/modbus-esp8266@^4.1.0
	robtillaart/PCF8574@^0.4.1
	esp32async/AsyncTCP @ 3.3.8
	esp32async/ESPAsyncWebServer @ ^3.7.4
	bblanchon/ArduinoJson@7.3.0
lib_ignore = 
	AsyncTCP_RP2040W
	ESPAsyncTCP

CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (53.3.13) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB 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.1.3
 - framework-arduinoespressif32-libs @ 5.3.0+sha.489d7a2b3a
 - tool-esptoolpy @ 4.8.6
 - tool-mklittlefs @ 3.2.0
 - tool-riscv32-esp-elf-gdb @ 14.2.0+20240403
 - tool-xtensa-esp-elf-gdb @ 14.2.0+20240403
 - toolchain-xtensa-esp-elf @ 13.2.0+20240530
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 46 compatible libraries
Scanning dependencies...
Dependency Graph
|-- modbus-esp8266 @ 4.1.0
|-- PCF8574 @ 0.4.1
|-- AsyncTCP @ 3.3.8
|-- ESPAsyncWebServer @ 3.7.4
|-- ArduinoJson @ 7.3.0
|-- ESPmDNS @ 3.1.3
|-- HTTPClient @ 3.1.3
|-- WiFi @ 3.1.3
|-- Wire @ 3.1.3
|-- FS @ 3.1.3
|-- LittleFS @ 3.1.3
Building in debug mode
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  13.8% (used 45108 bytes from 327680 bytes)
Flash: [===       ]  32.9% (used 1033772 bytes from 3145728 bytes)
=========================== [SUCCESS] Took 4.51 seconds ===========================
 *  Terminal will be reused by tasks, press any key to close it. 

If you want to create and use real libraries, please read the documentation Creating Library — PlatformIO latest documentation

But you don’t have a src/PCF8574/test/ folder, right?

If you do, you need

; include everything by default, but exclude PCF tests
build_src_filter =
  +<*>
  -<PCF8574/test/>

Many thanks for your help !
The project run now, I just spend a week for the plateformeio.ini.
Many thanks for all the community.
If it’s an easy possibility to ffer a cafe, tell me !

Mset regards

Many thanks for your help !
I understand my mystake now !

Many thanks and best regards !