Excuse me, I’m using the file system on an SD card. I’ve initialized it properly according to the example code, and LVGL’s file system is also enabled and can read data correctly. However, the example code partitions two virtual disks. I’m not sure which disk LVGL is mounted to, and I couldn’t find the relevant code.
Do you mean how to access file resources in LVGL?
I used the example routine to initialize the SD card, which created two virtual devices: FS_ROOT and FS_MSIC. I enabled LVGL’s file system to easily display images from the SD card using LVGL. However, I don’t know under which virtual device LVGL’s file system is mounted by default. Will there be any issues if I use it directly?
Set the ASCII code of the drive letter and the working directory for LVGL access here. For example, set it to ‘A’, which is 65, and “/”. This way, if you want to access /assets/pic.jpg on the SD card, the path used by LVGL will be “A:\assets\pic.jpg”.
Yes, I understand this. However, when I initialize the SD card, RT-Thread creates two virtual devices: FS_ROOT and FS_MISC, which are roughly equivalent to the C: and D: drives on a computer. Now, when LVGL uses the file system, under which virtual device is it operating? For example, if I use LVGL to create a file, will it appear under FS_ROOT or FS_MISC?
I took a look at the original routine. This FS_MISC essentially creates another file system at the physical address 500MB of the physical storage, and it is mounted onto the path “/misc”. Operations on this directory are thus routed to the file system located at the 500MB position. When you use LVGL to create files, it has nothing to do with these two disks, but only depends on the working directory you choose for LVGL. In your case, if you choose “/” as the LVGL working directory, the created files and directories will appear under the root directory. If you use “/misc” as the working directory, you’ll see them under the “/misc” directory on the microcontroller, because the file system at the 500MB location is correctly mounted to “/misc”. However, if you check using a card reader on a computer, you likely won’t see them, because the computer mounts only one file system and isn’t aware that another file system at the 500MB location should be mounted to “/misc”.

