As you can see most of the lib_deps in these two builds are the same. However, when I move the redundant ones into [env] I get lots of build errors because it doesn’t find all of the libraries. Is there something I need to do to combine the list of lib_deps in [env] with the specific build section I’m compiling?
; 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
[env]
extends = espressif32_base
platform = espressif32
board = esp32dev
board_build.partitions = bigspiffs.csv
framework = arduino
lib_ldf_mode = deep
monitor_speed = 115200
[env:pican-m]
build_flags =
-D LED_BUILTIN=2
-D ELEGANTOTA_USE_ASYNC_WEBSERVER=1
-D PICANM
-D BNO08X
lib_deps =
https://github.com/ttlappalainen/CAN_BUS_Shield.git
ttlappalainen/NMEA2000_mcp
mairas/ReactESP@^2.0.0
ttlappalainen/NMEA2000-library
ttlappalainen/NMEA2000_esp32
ttlappalainen/NMEA0183
adafruit/Adafruit SSD1306
adafruit/Adafruit ADS1X15
pfeerick/elapsedMillis
jchristensen/movingAvg@^2.3.1
arduino-libraries/Arduino_JSON @ 0.1.0
https://github.com/khoih-prog/ESPAsync_WiFiManager
https://github.com/khoih-prog/ESP_DoubleResetDetector
https://github.com/khoih-prog/ESPAsyncDNSServer
https://github.com/mathieucarbou/ESPAsyncWebServer
https://github.com/mathieucarbou/AsyncTCP@^3.1.4
https://github.com/ayushsharma82/ElegantOTA
https://github.com/ayushsharma82/WebSerial
adafruit/Adafruit BNO08x
[env:espberry]
build_flags =
-D LED_BUILTIN=2
-D ELEGANTOTA_USE_ASYNC_WEBSERVER=1
-D ESPBERRY
-D CMPS14
lib_deps =
https://github.com/Seeed-Studio/Seeed_Arduino_CAN
mairas/ReactESP@^2.0.0
ttlappalainen/NMEA2000-library
ttlappalainen/NMEA2000_esp32
ttlappalainen/NMEA0183
adafruit/Adafruit SSD1306
adafruit/Adafruit ADS1X15
pfeerick/elapsedMillis
jchristensen/movingAvg@^2.3.1
arduino-libraries/Arduino_JSON @ 0.1.0
https://github.com/khoih-prog/ESPAsync_WiFiManager
https://github.com/khoih-prog/ESP_DoubleResetDetector
https://github.com/khoih-prog/ESPAsyncDNSServer
https://github.com/mathieucarbou/ESPAsyncWebServer
https://github.com/mathieucarbou/AsyncTCP@^3.1.4
https://github.com/ayushsharma82/ElegantOTA
https://github.com/ayushsharma82/WebSerial
adafruit/Adafruit BNO08x