AnsweredAssumed Answered

CubeMx incorrect FatFS code generation

Question asked by Lukasz Przenioslo on Mar 18, 2018
Latest reply on Mar 21, 2018 by Lukasz Przenioslo


In CubeMx, when the option USE_LFN is enabled, the code generator doesnt generate all necessary code. The missing files are supposed to be in this directory:


There are no unicode.c and ccXXX.c files (the last depends on the CODE_PAGE). Because of that, no unicode support functions are available:

/* Unicode support functions */
#if _USE_LFN                            /* Unicode - OEM code conversion */
WCHAR ff_convert (WCHAR chr, UINT dir);    /* OEM-Unicode bidirectional conversion */
WCHAR ff_wtoupper (WCHAR chr);            /* Unicode upper-case conversion */
#if _USE_LFN == 3                        /* Memory functions */
void* ff_memalloc (UINT msize);            /* Allocate memory block */
void ff_memfree (void* mblock);            /* Free memory block */

I would appreciate a confirmation of this. Looking forward to your answer.