Petit Fat File System Module
elm-chan.org
elm-chan.org
He describes himself as "Mediocre embedded system engineer" but he is way too humble, the skill he shows is so incredible that I often find myself speechless whenever I look at his projects.
Go there, look around and recommend it to everyone. You will not regret it.
ChaN, if you're out there:
https://i.imgur.com/E8Z29VE.png
The original code fails to load WAV's containing metadata – even though an intent to tolerate them appears written into some of the handlers (DISP, LIST FCC, etc). I can provide files from Audacity which reproduce the issue.
Moved remaining details here to avoid boring the HN audience: https://pastebin.com/raw/XdneQ8xh
It can write to files, but it can't create or resize them. For that (and more), you want FatFs, the full featured version: http://elm-chan.org/fsw/ff/00index_e.html
elm-chan has also written an AVR bootloader that can update the flash from, for example, an SDCard. It uses this Petit FAT File System Module and requires a 4K bootloader section (so mostly of use on the ATMega1284).
I admire his consistency.
The program (or programs/scripts) must be command line driven and run under both Windows and Linux (so they can be integrated into our build system).
The use case is the following; the creation of a single binary image containing some firmware and a (per-unit) custom FAT-32 partition, both of which would effectively concatenated together.
Does anyone have any ideas? Otherwise I might have to make something myself.
The mtools/mformat are not AFAIK released pre-built for Windows, in case of need here is a build:
http://reboot.pro/topic/14354-buidlingmodifying-floppy-image...
Syntax/option for mformat are a bit complex, again in case of need here is a small batch that hopefuly makes commands clearer:
I think that's your problem: file systems are supposed to go onto a preexisting block device, which you'll need to create seperately. For example, on my system:
dd if=/dev/zero of=/tmp/foo.dos bs=512 count=128K
mkdosfs -F 32 /tmp/foo.dos
Once you've created the filesystem, fill it with: mkdir /tmp/foo/
sudo mount -t msdos -o loop /tmp/foo.dos /tmp/foo/
# dump stuff into /tmp/foo/
sudo umount /tmp/foo.dos # or /tmp/foo/
# filesystem is in /tmp/foo.dosOtherwise, you could try to find a suitable FAT implementation written in a cross platform language like python.
Otherwise you're looking at some fairly nasty scripting to get windows to do the FAT filesystem manipulation for you. As far as I know, windows doesn't support loopback devices out of the box for example.
Do you really need a baked FAT32 filesystem? Could you get away with a simpler payload like a tar?
> Petit FatFs is a sub-set of FatFs module for tiny 8-bit microcontrollers. It is written in compliance with ANSI C and completely separated from the disk I/O layer. It can be incorporated into the tiny microcontrollers with limited memory even if the RAM size is less than sector size.
>Petit FatFs is a sub-set of FatFs module for tiny 8-bit microcontrollers. It is written in compliance with ANSI C and completely separated from the disk I/O layer. It can be incorporated into the tiny microcontrollers with limited memory even if the RAM size is less than sector size. Also full featured FAT file system module is available here.
http://elm-chan.org/fsw/ff/00index_e.html
>Features Very small RAM consumption (44 bytes work area + certain stack). Very small code size (2K-4K bytes). FAT12, FAT16 and FAT32. Single volume and Single file. Streaming file read. File write function with some restrictions.