打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
fatfs长文件名及模块剪裁问题

减小模块大小

Follwing table shows which function is removed by configurationoptions for the module size reduction.

下面的表显示了通过设置配置选项哪些函数将会移除,进而减小模块大小

Function_FS_MINIMIZE_FS_READONLY_USE_STRFUNC_USE_MKFS_USE_FORWARD
1231000
f_mount
f_open
f_close
f_read
f_writex
f_syncx
f_lseekx
f_opendirxx
f_readdirxx
f_statxxx
f_getfreexxxx
f_truncatexxxx
f_unlinkxxxx
f_mkdirxxxx
f_chmodxxxx
f_utimexxxx
f_renamexxxx
f_mkfsxx
f_forwardx
f_putcxx
f_putsxx
f_printfxx
f_getsx

 

 

长文件名

The FatFs module supports long file name (LFN) from revision 0.07.The two different file names, SFN and LFN, of a file is transparentin the file functions except for f_readdir function. The LFNfeature requiers a certain working buffer in addition. The buffersize can be configured by _MAX_LFN corresponding to the availablememory size. The size of long file name will reach up to 255characters, so that the _MAX_LFN should be set to 255 for fullfeatured LFN operation. When the size of working buffer isinsufficient for the given file name, the file function will failwith FR_INVALID_NAME.

FatFs从0.07版本开始支持长文件名(LFN)。在调用文件函数时,一个文件的两个文件名(SFN与LFN)是通用的,除了f_readdir函数。支持长文件特性将需要一个额外的工作缓冲区,此缓冲区的大小可以通过设置_MAX_LFN来以可用的内存大小相符。因为长文件名长达255个字符,因此_MAX_LFN应该设置为255来支持全特性的LFN选项。当工作缓冲区的大小容不下给出的文件名时文件函数就会因为FR_INVALID_NAME而调用失败。

 

LFN cfg on ARM7DMI Code page ROM size [bytes]SBCS +4719932(Shift-JIS) +63755936(GBK) +178943949(Korean) +141003950(Big5) +112631

When LFN is enabled, the module size will be increased depends onthe selected code page. Right table shows the difference in modulesize between the conditions that LFN is disabled and enabled onsome code pages. We are the Japanese, Chinese and Korean have tensof thousands of characters. Unfortunately, it requires a hugeOEM-Unicode bidirectional conversion table and the module size willbe drastically increased that shown in the table. As the result,the FatFs with LFN enabled will not able to be implemented to most8-bit microcontrollers including AVR. This is the reason why I hadnot been interested in implementing the LFN feature for a long time:-)

当使能LFN,模块增加的大小由编码页类型决定,右边的表显示了LFN禁用与使用某些编码来使能时模块的不同大小。日语、中文与韩国语拥有成千上万的字词,而不幸的是,将需要一个巨大的OEM-Unicode双向转换表,模块的大小将大大的增大,如表所示。因此,使能LFN的FatFs将不能在包括AVR在内的大多数8位微控制器上使用。这也是为什么我长期以来对实现LFN特性不感兴趣:-).

Note that the LFN feature on the FAT file system is a patent ofMicrosoft Corporation. When enable it on the commercial products, alicense from Microsoft may be required depends on the finaldestination.

请注意:FAT文件系统的LFN特性是微软公司的专利。当在商用产品上使用时,根据最终目的的不同可能需要获得微软的许可证。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
FatFS简介
FatFs移植笔记(R0.09)
FATFS读取数据问题(实例2) (amoBBS 阿莫电子论坛)
FatFs模块功能配置选项
FATFS搜索文件函数
stm32的USB(二)Fatfs在stm32上的移植
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服