找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4|回复: 0
打印 上一主题 下一主题
收起左侧

Cheap_Flash_FS(High_level_version--preallocate version)--Embedded FAT16/32 fi...

[复制链接]
跳转到指定楼层
楼主
ID:49552 发表于 2026-5-29 09:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Cheap_Flash_FS(High_level_version--preallocate version)--Embedded FAT16/32 file system source code for free download

This code is compatible with FAT16/FAT32 totally 2 formats,compatible with long file name.
compatible with chinese long file name(compatible with GB2312/UNICODE codepage(which can be disable,save the ROM space)).
compatible with subdirectory,in support of file read,write,delete,create ect.. and other related functions.
finally,the code is totally write by the C code,can port to other platforms to achieve the file system module.

this code is released free code, user can free test,research,apply.also allowed used on commercial applications.

if you want to contact with the author,please follow the way below.


change note:
add create file allocate function, this can enhance write file speed.
    create_file_with_preallocate("aaaaaaaaaaaaaa.rar",30540551);
    HANDLE1 = open_file_for_preallocate("aaaaaaaaaaaaaa.rar");
use open_file_for_preallocate() function open file,when write file with preallocate

if(write_file(HANDLE1,buf, cc)==Disk_is_full)
the write length should align with 512 byte. can not the with no align 512 bytes.

allocate function can enhance the write file speed.
it is test on the STM32H7,THE tested speed list as below

use preallocate function, write file 64K length one time
NORMAL sd card: write file 4.7MB/S
16GB class 10 SD card's speed:12.5MB/S
32GB class 10 SD card's speed:8.3MB/S


up test result 's speed a little low than XP,
probably the cpu speed low than PC.

port notice:
the file system use cache fat and file size.
so don't forget call cache write back function at
function : write_flash_sector(u8 *buf,u32 sector, u8 disk_id,u32 sector_number) at
flash_management.c.

u32 sector__,i;
u8 *buf__;

  sector__ = sector;
  buf__ = buf;
  for(i = 0;i<sector_number;i++)
  {
    //fat cache writeback
    writeback_fat_cache_sector(buf__,sector__,disk_id);
    //filesize cache writeback
    writeback_filesize_cache_sector(buf__,sector__,disk_id);
        buf__+=512;
    sector__++;
  }

cheap_flash_fs(preallocate version).rar (2.12 MB, 下载次数: 0)
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表