TL;DR, automatic library dependency picked an unused freertos dependency which breaks the build. Is there a way to suppress it?
When I try to use the LVGL library, the automatic dependency algorithm adds freertos as a dependency which breaks the build because freertos required a user provided custom configuration. The inclusion from LVL is suppressed by an #if so should be ignored for dependency detection.
#if ... false condition ... #include "FreeRTOS.h" #endif
platformio.ini (forums breaks indentation)
[env:raspberry-pi-pico]
platform = wizio-pico
board = raspberry-pi-pico
framework = baremetal
upload_protocol = picoprobe
debug_tool = picoprobe
monitor_port = COM8
build_flags =
-Wno-missing-field-initializers
-D PICO_STDIO_USB
-D LV_CONF_INCLUDE_SIMPLE
-I src
-I “$PROJECT_CORE_DIR/packages/framework-wizio-pico/SDK111/hardware”
lib_deps = lvgl/lvgl@7.9.1
Build
Verbose mode can be enabled via `-v, --verbose` option <<<<<<<<<<<< WIZIO - RASPBERRY PI PICO ( PICOPROBE ) 2021 Georgi Angelov >>>>>>>>>>>> CONFIGURATION: https://docs.platformio.org/page/boards/wizio-pico/raspberry-pi-pico.html PLATFORM: WizIO - Raspberry Pi Pico (1.0.8+sha.c1d1a04) > WizIO - Raspberry Pi Pico ( PICOPROBE ) HARDWARE: RP2040 125MHz, 256KB RAM, 2MB Flash DEBUG: Current (picoprobe) External (cmsis-dap, picoprobe) PACKAGES: - framework-wizio-pico 1.0.8+sha.fd9dd1d - tool-wizio-pico 1.0.0+sha.3a504e1 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1) SDK RASPBERRYPI PI PICO RP2040 ( PICO - SDK ) * OPTIMIZATION : -Os * STACK : 2048 * HEAP : 2048 * SPECS : nano.specs * BINARY TYPE : default ['w25q080', 'memmap_default.ld', '0x10000000'] * PICO_STDIO_USB * USB : tinyusb LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 9 compatible libraries Scanning dependencies... Dependency Graph |-- <lvgl> 7.9.1 | |-- <freertos>