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

DickyOZ
Posts: 22
Joined: Sun Aug 03, 2025 9:40 am

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

Postby DickyOZ » Tue Jun 16, 2026 9:55 am

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.

haberturdeur
Espressif staff
Espressif staff
Posts: 6
Joined: Thu Dec 12, 2024 10:17 am

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

Postby haberturdeur » Mon Jun 22, 2026 8:50 am

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.

Who is online

Users browsing this forum: Baidu [Spider], ChatGPT-User, Qwantbot, Semrush [Bot] and 3 guests