Hi,
I was wondering if anyone had an efficient ARM FAT12 filesytem implementation. I came across "http://www.elm-chan.org/fsw/ff/00index_e.html" but it supports Fat32 and Fat16 and compiles to about 8KB in size. Which is too large for my bootloader application. I started writing my own implementation, but decided to see if anyone already had one which they are prepaed to share before I spend hours doing it from scratch.
Note: This is not for an OS, it is for a bootloader application that I am writing for a hobby project of mine. I want to try implement USB mass storage.
Thanks
ARM based FAT12 implementation
ARM based FAT12 implementation
Gizmic OS
Currently - Busy with FAT12 driver and VFS
Currently - Busy with FAT12 driver and VFS
Re: ARM based FAT12 implementation
A minimal FAT12 readonly driver is not that much work and also isn't that difficult.
Depending on how long you are already looking for existing code you probably could have written your own code by now
Depending on how long you are already looking for existing code you probably could have written your own code by now
Re: ARM based FAT12 implementation
I don't know how much space you have and how compact ARM instructions are in your case (I know that Thumb/Thumb2 exists because the old (original) 32 bits per instruction were a bit too many), but I was able to fit a FAT file loader (either FAT12 or FAT16 or FAT32, just one of the three) into a standard 512-byte PC bootsector with 80386 assembly and it also included code for .COM/.EXE setup/relocation. My guess would be that Thumb2 FAT12 code is likely going to fit the same space. Just write it. Or write it in C first and then convert into assembly.
Re: ARM based FAT12 implementation
The BrokenThorn tutorial contains a read-only FAT12 driver in less than 400 lines of C code. That might be a good starting point.
Developer of libc11
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: ARM based FAT12 implementation
I realize this is somewhat late in the game, but I have three questions: how proficient are you with ARM assembly language, how much space do you actually have for the boot loader on the device, and how large a storage capacity do you intend to support? The last is perhaps the most important question, as FAT12 has a maximum addressing capacity of 16MiB, which almost any USB device is likely to exceed by a considerable margin.
BTW, if you don't have any overriding requirements to support FAT, you might consider SimpleFS as an alternative that is both easier to implement and free of any patent taint (the long file name support for FAT is under patent).
BTW, if you don't have any overriding requirements to support FAT, you might consider SimpleFS as an alternative that is both easier to implement and free of any patent taint (the long file name support for FAT is under patent).
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.