How to extend file name size in KSDK 1.3 USB Host MSD-FATfs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to extend file name size in KSDK 1.3 USB Host MSD-FATfs

505 Views
MAPC
Senior Contributor I

Hello,

 

In the default configuration, KSDK 1.3 USB Host MSD FATfs library allows me to create files in the format 8:3. In other words, the file name must have up to 8 characters for the name itself and 3 for the extension.

 

I need 16 characters for the file name and 3 for the extension. Is that possible? Which settings should I do?

 

IDE: KDS 3.0

MCU: MK22FN512VLH12

 

Thanks and best regards,

 

Marco Coelho

Labels (1)
0 Kudos
2 Replies

315 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Marco,

Please follow the following steps to add long file name support:

1.#define    _USE_LFN    3 in ffconf.h

2.#define _CODE_PAGE    437 in ffconf.h

I have tested based on host_msd_fatfs demo on frdm-k64f, it runs well. Please refer to the following snapshots for more details.

pastedImage_0.png

pastedImage_1.png

Hope that helps,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

315 Views
DavidS
NXP Employee
NXP Employee

In addition to Kan's good answer:

FatFs Module Application Note

Regards,

David

0 Kudos