Using filesystem with dcache enabled on STM32F7

I’ve been doing some work with FatFS on this platform and there are lots of issues when data cache is enabled. The only workable solution for me is to place structures that are updated by DMA (FATFS, FIL) in DTMC RAM. How is this accomplished with the lvgl fatfs layer?

Regards
Pierre

FIL is allocated by LVGL so unless you specify LV_MEM_ATTR it will be in “normal RAM”.

I started to update the API of the FS module and the improvements can help in the case too. In this, lv_fs_open returns a pointer the file object (instead of error code). So it’s up to the driver where and how to allocate/store the file objects, the LVGL-FatFS wrapper just needs to return a pointer to FIL. (It’s how fopen works).

The new API is in the feat/new-fs-api branch.