STM32 CubeIDE SDcard

Description

I would like to read png images from SD card, attached on the MCU from SPI bus.
My project is built with CubeIDE, lvgl works on top. SDcard also works with included FatFS and some modifications to work over SPI.

What MCU/Processor/Board and compiler are you using?

STM32L432 GCC

What LVGL version are you using?

8.1

What have you tried so far?

In lv_conf.h
#define LV_USE_FS_FATFS ‘s’ /Uses f_open, f_read, etc/

After lv_init(); I call
lv_fs_fatfs_init();

The problem is that it doesn’t compile and this error appears that I dont know how to deal with it.
The error is in these 2 lines in ff.h R0.12c
Line 278 #define f_tell(fp) ((fp)->fptr)
Line 279 #define f_size(fp) ((fp)->obj.objsize)

…Middlewares/Third_Party/FatFs/src/ff.h:278:25: error: request for member ‘fptr’ in something not a structure or union
…/Middlewares/Third_Party/FatFs/src/ff.h:279:25: error: request for member ‘obj’ in something not a structure or union

When i disable the lv_conf LV_USE_FS_FATFS and comment out lv_fs_fatfs_init(), the project compiles fine and I can test access to the SDcard by using the f_mount f_read etc which they work.