Page 1 of 1

ESP-IDF 6.0.1 unable to compike/build project useinf fatfs.

Posted: Tue Jun 16, 2026 9:55 am
by DickyOZ
lvgl 9.5
There is a bug in the fatfs code that causes a compile error at line 268 in lv_fs_fatfs.c

Code: Select all

    do {
        res = f_readdir(dir_p, &fno);
        if(res != FR_OK) return LV_FS_RES_UNKNOWN;

        if(fno.fname[0] == 0) break; /* End of the directory */

        if(fno.fattrib & AM_DIR) {
            lv_snprintf(fn, fn_len, "/%s", fno.fname);
        }
        else lv_strlcpy(fn, fno.fname, fn_len);

    } while(lv_strcmp(fn, "/.") == 0 || lv_strcmp(fn, "/..") == 0);

    return LV_FS_RES_OK;
}
If i fix the problem ninja detects a checksum fail and spits the dummy:

Code: Select all

Bootloader binary size 0x5dc0 bytes. 0x240 bytes (2%) free.
[7/9] Linking CXX executable Test_fatfs.elf
FAILED: Test_fatfs.elf 
No matter what I try I can't get round the problem. Sorry about the typos in the header, it's getting late in the day.

Re: ESP-IDF 6.0.1 unable to compike/build project useinf fatfs.

Posted: Mon Jun 22, 2026 8:50 am
by haberturdeur
Hi, sorry for the delayed response.

This seems like an error in the LVGL library, not ESP-IDF itself.

I would recommend switching to the POSIX FS driver and using ESP-IDFs vfs and fatfs support, if at all possible.