Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 20, 2024, 11:50:27 11:50


Login with username, password and session length


Pages: [1]
Print
Author Topic: Small Flash File System  (Read 4319 times)
0 Members and 1 Guest are viewing this topic.
Mampoer
Inactive

Offline Offline

Posts: 3

Thank You
-Given: 1
-Receive: 11


« on: May 27, 2014, 04:23:44 16:23 »

Hopefully useful to someone. I have been using this for years in 8051 and ARM based designs. Makes data storage and retrieval mush easier than trying to manage raw blocks on data. I used dataflash but wont be too much trouble to port to other flash devices. ST dev kit for example project, If anyone needs ARM just let me know.
Logged
CortexM0Inside
Newbie
*
Offline Offline

Posts: 16

Thank You
-Given: 13
-Receive: 36


« Reply #1 on: May 28, 2014, 04:25:52 04:25 »

Is it better than Keil ARM Flash File System ?
Logged
Mampoer
Inactive

Offline Offline

Posts: 3

Thank You
-Given: 1
-Receive: 11


« Reply #2 on: May 28, 2014, 09:19:23 09:19 »

It was written before Keil distributed a file system. Usually if you remove data from a file it has to be rewritten, the application had to use files in a fifo mode, so data was added to end of the file and removed from front of file. To accomplish this the FAT had to have both the flash page start of file and a byte offset into the flash page. As there is no standard file api for this I called it Clip. If you clip a file the fat gets modified with the new start page and start byte of the file rather than write a complete new file, removing old and renaming new. This has been used to sell vouchers from text files for years.
In page banked 8051 base app it also stores IAP images of new firmware in BANK files for boot to use and update banks. Another feature was to let the FAT float around in the flash. At init the fat is located and then tracked in mem. This ensured the fat didn't burn up a small part of flash while the rest still has very low wear. So wear leveling and fast changing data with very little ram was crucial. The Hardware layer used a read modify write scheme so effectively this will have to be changed for other flash chips.
This FS is small, in a upsd3354 I configured 3 x 8K banks as boot, 1 x 8K and eeprom, 1 x 32K as common and 7 x 32K and high banks. I used UIP and PPP stack for gprs, this FS and a lot of display and printer code that eats rom. It compiled to about 130K. This is not a one size fits all fs but it did enable me to use file like api and in a 8051 and I could manage a lot of rapid changing files with a small micro.
Logged
Buddy
Junior Member
**
Offline Offline

Posts: 48

Thank You
-Given: 7
-Receive: 19


« Reply #3 on: May 29, 2014, 12:46:30 00:46 »

Hi thanks!!

Do you have an example Keil project to go with it? Thanks!!
Logged
Mampoer
Inactive

Offline Offline

Posts: 3

Thank You
-Given: 1
-Receive: 11


« Reply #4 on: May 30, 2014, 07:53:55 07:53 »

The code was for Keil c51, if you need ARM I'm going to do a LPC1754 based project in a few days so Ill build an example for the MCB1700 board along side it. It may take a few days, hope Ill get it done by next weekend if thats OK.
Logged
baoshi
Newbie
*
Offline Offline

Posts: 8

Thank You
-Given: 5
-Receive: 1


« Reply #5 on: September 17, 2014, 05:19:19 05:19 »

Would you please share the ARM based project you mentioned earlier? I found this is one of the neat file system implementation I have ever read.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC