LDF mode deep still doesn't find dependency included from .c file

I am trying to use STemWin (graphic library provided by ST as part of STM32CubeF7 framework ) but cannot compile it successfully.

I get error because the PIO doesn’t find a header file LCDConf.h (which is in my projects inc/ folder), which is referenced from one of the librarie’s .c source file.
I’ve read the Note in the LDF documentation and tried changing lib_ldf_mode to deep (and others too) - but the error stays the same.

Could it be that the lib_ldf_mode doesn’t work?

Also, I didn’t quite understand the first part of the “Note” in the LDF docs saying “…explicitly reference the dependency from the project source…” → what does this mean (for dummies)?
The lib_deps option described is not suitable for my case, as this library is not part of PIO registry or anything. Should I create a library.json and then use the lib_deps option?

And lastly, how should I treat cases like this - where I want to use libraries that are part of the STM32Cube package, but are not actually part of the PIO stm32cube framework (only HAL and CMSIS stuff there afaik)? I don’t (want to) know anything about internal structure of the library, but want to use it in my project…should I write library.json myself? What I am doing now is using lib_extra_dirs option w/ manually downloaded STM32Cube package…but since the libraries are of all sorts of structures, I often get some missing dependency errors :frowning:

My project conf:

[platformio]
env_default = disco_f746ng
build_dir = pio_builds
include_dir = inc

[env:disco_f746ng]
platform = ststm32
board = disco_f746ng
framework = stm32cube
upload_protocol = stlink 
lib_ldf_mode = deep
lib_extra_dirs = /home/jure/Projects/ARMdev_stuff/STM32Cube_FW_F7_V1.11.0/Drivers/BSP, /home/jure/Projects/ARMdev_stuff/STM32Cube_FW_F7_V1.11.0/Middlewares/ST/STemWin

Project structure:

.
├── inc
│   ├── GUIConf.h
│   └── LCDConf.h
├── lib
│   └── readme.txt
├── pio_builds
│   ├── do-not-modify-files-here.url
│   └── structure.hash
├── src
│   ├── GUIConf.c
│   ├── LCDConf.c
│   └── main.c
└── platformio.ini

STemWin library structure (part of STM32Cube F7 software package in STM32CubeF7/Middlewares/ST/STemWin/):

.
├── Config
│   ├── GUIConf.c
│   ├── GUIConf.h
│   ├── GUIDRV_Template.c
│   ├── GUIDRV_Template.h
│   ├── LCDConf_FlexColor_Template.c
│   ├── LCDConf_FlexColor_Template.h
│   ├── LCDConf_Lin_Template.c
│   ├── LCDConf_Lin_Template.h
│   └── SIMConf.c
├── Documentation
│   └── STemWin540.pdf
├── inc
│   ├── BUTTON.h
│   ├── BUTTON_Private.h
│   ├── CALENDAR.h
│   ├── CHECKBOX.h
│   ├── CHECKBOX_Private.h
│   ├── CHOOSECOLOR.h
│   ├── CHOOSEFILE.h
│   ├── DIALOG.h
│   ├── DIALOG_Intern.h
│   ├── DROPDOWN.h
│   ├── DROPDOWN_Private.h
│   ├── EDIT.h
│   ├── EDIT_Private.h
│   ├── FRAMEWIN.h
│   ├── FRAMEWIN_Private.h
│   ├── Global.h
│   ├── GRAPH.h
│   ├── GRAPH_Private.h
│   ├── GUI_ARRAY.h
│   ├── GUI_ARRAY_Private.h
│   ├── GUI__BiDi2_Brackets_800.h
│   ├── GUI__BiDi2_Types_800.h
│   ├── GUI_BMP_Private.h
│   ├── GUI_ConfDefaults.h
│   ├── GUI_Debug.h
│   ├── GUIDRV_DCache.h
│   ├── GUIDRV_DCache_Private.h
│   ├── GUIDRV_Dist.h
│   ├── GUIDRV_FlexColor.h
│   ├── GUIDRV_FlexColor_Private.h
│   ├── GUIDRV_Lin.h
│   ├── GUIDRV_Lin_Opt_16.h
│   ├── GUIDRV_Lin_Opt_24.h
│   ├── GUIDRV_Lin_Opt_32.h
│   ├── GUIDRV_Lin_Opt_8.h
│   ├── GUIDRV_Lin_Private.h
│   ├── GUIDRV_NoOpt_1_8.h
│   ├── GUIDRV_Template.h
│   ├── GUIDRV_TemplateI.h
│   ├── GUIDRV_TemplateI_Private.h
│   ├── GUI_FontIntern.h
│   ├── GUI_GCache_Private.h
│   ├── GUI_GIF_Private.h
│   ├── GUI.h
│   ├── GUI_HOOK.h
│   ├── GUI_JPEG_Private.h
│   ├── GUIMTDRV_TangoC32.h
│   ├── GUI_Private.h
│   ├── GUI_SetOrientationCX.h
│   ├── GUI_SetOrientation.h
│   ├── GUI_SIM_Win32.h
│   ├── GUI_SPRITE_Private.h
│   ├── GUITDRV_ADS7846.h
│   ├── GUI_Type.h
│   ├── GUI_Version.h
│   ├── GUI_VNC.h
│   ├── HEADER.h
│   ├── HEADER_Private.h
│   ├── ICONVIEW.h
│   ├── ICONVIEW_Private.h
│   ├── IMAGE.h
│   ├── IMAGE_Private.h
│   ├── IP_FS.h
│   ├── KNOB.h
│   ├── KNOB_Private.h
│   ├── LCD_ConfDefaults.h
│   ├── LCD.h
│   ├── LCD_Private.h
│   ├── LCD_Protected.h
│   ├── LCD_SIM.h
│   ├── LISTBOX.h
│   ├── LISTBOX_Private.h
│   ├── LISTVIEW.h
│   ├── LISTVIEW_Private.h
│   ├── LISTWHEEL.h
│   ├── LISTWHEEL_Private.h
│   ├── MENU.h
│   ├── MENU_Private.h
│   ├── MESSAGEBOX.h
│   ├── MULTIEDIT.h
│   ├── MULTIPAGE.h
│   ├── MULTIPAGE_Private.h
│   ├── PROGBAR.h
│   ├── PROGBAR_Private.h
│   ├── RADIO.h
│   ├── RADIO_Private.h
│   ├── SCROLLBAR.h
│   ├── SCROLLBAR_Private.h
│   ├── SEGGER.h
│   ├── SLIDER.h
│   ├── SLIDER_Private.h
│   ├── SPINBOX.h
│   ├── SPINBOX_Private.h
│   ├── SWIPELIST.h
│   ├── SWIPELIST_Private.h
│   ├── TEXT.h
│   ├── TEXT_Private.h
│   ├── TREEVIEW.h
│   ├── TREEVIEW_Private.h
│   ├── WIDGET.h
│   ├── WINDOW_Private.h
│   ├── WM_GUI.h
│   ├── WM.h
│   └── WM_Intern.h
├── Lib
│   ├── MCD-ST Image SW License Agreement V2.pdf
│   ├── STemWin540_CM7_GCC.a
│   ├── STemWin540_CM7_GCC_ARGB.a
│   ├── STemWin540_CM7_GCC_ot.a
│   ├── STemWin540_CM7_GCC_ot_ARGB.a
│   ├── STemWin540_CM7_IAR.a
│   ├── STemWin540_CM7_IAR_ARGB.a
│   ├── STemWin540_CM7_IAR_ot.a
│   ├── STemWin540_CM7_IAR_ot_ARGB.a
│   ├── STemWin540_CM7_Keil_ARGB.lib
│   ├── STemWin540_CM7_Keil.lib
│   ├── STemWin540_CM7_Keil_ot_ARGB.lib
│   ├── STemWin540_CM7_Keil_ot.lib
│   ├── STemWin540_CM7_OS_GCC.a
│   ├── STemWin540_CM7_OS_GCC_ARGB.a
│   ├── STemWin540_CM7_OS_GCC_ot.a
│   ├── STemWin540_CM7_OS_GCC_ot_ARGB.a
│   ├── STemWin540_CM7_OS_IAR.a
│   ├── STemWin540_CM7_OS_IAR_ARGB.a
│   ├── STemWin540_CM7_OS_IAR_ot.a
│   ├── STemWin540_CM7_OS_IAR_ot_ARGB.a
│   ├── STemWin540_CM7_OS_Keil_ARGB.lib
│   ├── STemWin540_CM7_OS_Keil.lib
│   ├── STemWin540_CM7_OS_Keil_ot_ARGB.lib
│   ├── STemWin540_CM7_OS_Keil_ot.lib
│   ├── STemWin540_WIN32_ARGB.lib
│   └── STemWin540_WIN32.lib
├── OS
│   ├── GUI_X.c
│   └── GUI_X_OS.c
├── Simulation
│   ├── GUISim.lib
│   ├── SimulationMinGW.res
│   └── WinMain.c
├── Software
│   ├── JPEG2MovieScripts
│   │   ├── 120x68.bat
│   │   ├── 160x120.bat
│   │   ├── 160x90.bat
│   │   ├── 200x150.bat
│   │   ├── 240x136.bat
│   │   ├── 240x180.bat
│   │   ├── 320x180.bat
│   │   ├── 320x240.bat
│   │   ├── 480x272.bat
│   │   ├── 80x45.bat
│   │   ├── 80x60.bat
│   │   ├── MakeMovie.bat
│   │   └── Prep.bat
│   ├── Bin2C.exe
│   ├── BmpCvtST.exe
│   ├── emVNC.exe
│   ├── emWinPlayer.exe
│   ├── FontCvtST.exe
│   ├── GUIBuilder.exe
│   ├── JPEG2Movie.exe
│   └── U2C.exe
└── Release_Notes.html
1 Like