FlashFS学习笔记--函数fopen
测试使用函数fopen创建中文文件夹或者文件名会造成进入硬件异常。比如:
fout = fopen ("M:\\\\测试\\\\test.txt", "w");
fout = fopen ("M:\\\\file\\\\测试.txt", "w");
fout = fopen ("M:\\\\测试\\\\测试.txt", "w");
fclose (fout); /* 进入此函数后进入硬件异常,如果不调用此函数,直接卸载不会进入硬件异常 */
========================================================
官方说明:
MDK MIDDLEWARE: Are UTF-8 characters in Filenames supported
Unfortunately, only the US ASCII character set is currently supported. Therefore you cannot create
filenames that use for example chinese letters or German "Umlaute". 使用函数操作已经存在SD中的中文文件
fout = fopen ("世界.txt", "w");
bw = fwrite (xxxxxx, fout);
fclose(fout);
也会进入硬件异常 如果使用此函数进行自动创建文件夹或者文件的话会稍慢些,目测需要1-3秒,创建后操作就很快了。 /* 使用函数fopen间接创建文件夹Dir2 */
fout = fopen ("M0:\\\\Dir2", "w");
下面这种方法会进入硬件异常
/* 使用函数fopen间接创建子文件夹Dir1\\Dir1_1 */
fout = fopen ("M0:\\\\Dir1\\\\Dir1_1", "w");
================================================
再次测试发现这种方式创建的文件夹,电脑无法识别,有问题。 RL-Flash手册在哪下载 zhumx 发表于 2020-6-23 11:19
RL-Flash手册在哪下载
在这里:
http://www.armbbs.cn/forum.php?mod=viewthread&tid=2988&extra=page%3D2
页:
[1]