File system driver of choice?
ErNa
Posts: 1,752
in Propeller 1
With the dual propeller quickstart compatible cpu I will have a micro-sd card and the question arises: what is the preferred driver. Priority: make use of large capacity cards and 4 bit (I think, that is called quad speed). Long filenames are preferred, code compactness should be a minor issue, as beginners propeller capacity has doubled ;-)
In the future all my applications will use this driver to reduce varieties.
In the future all my applications will use this driver to reduce varieties.
Comments
I use Kye's FATEngine as it covers the SDHC cards and FAT16+32.
Long filenames are not supported.
Why don't you take a look at my PropOS (link in signature)? I am working on making the pasm driver stay-resident, and getting Michael Parks' sphinx compiler working too.
BTW I don't know of any drivers that use the 4bit SD interface.
That's why my FS supports FAT32 with 8.3 names, paths, and multiple cards and open files along with 32-bit virtual memory addressing of files and cards.
While most embedded FSs don't need to be fast some of them are downright slow which isn't a problem for casual access but most of my applications need to be able to write large volumes of data as quick as it comes since we don't have the luxury of gigabytes of memory, or even just megabytes.
The reason we all use simple SPI mode rather than 4-bit SD mode is that the SD mode requires $$$$$ licensing and the SD mode documentation is not released publicly either otherwise it wouldn't be "secure digital".
Support for long filenames hasn't been started, but I could accelerate that feature if you're interested. Files in non-root folders is one of the main features I aim to complete before a v2.1 release, along with multiple partitions.
A rarely used feature is that the spi bus can be shared with other devices. There's no lock implementation, but it is at least accessible so you can share the three main pins with other devices of you so choose. If you choose not to, creating a second instance of PropWare::SPI is not difficult.
Not as fast as fsrw. I know how to increase the speed significantly (in the spi driver), but I don't currently have plans to implement the read ahead/write behind feature of fsrw, so that does put a cap on speed.
I'm not sure what you mean by quad speed. I've heard of quad spi with relation to sram chips, but not with sd cards. If your referring to the SD protocol - as opposed to SPI - I believe that requires licensing fees.
These are the supported commands... Other OS commands can be added simply to the OS, utilising the StdIn and StdOut routines which provide a HAL.
Binary files can be run from the OS (replaces the OS).
I am well on the way to supporting self-hosted (on the propeller) spin & pasm compiling using a modified Sphinx (by Michael Park).
The PASM section (the SPI driver and basic read/write SD routines) of Kye's FATEngine resides in its own cog.
I know some part of tachyon doesn't use fat, but the blocks directly. Is that Easyfile or something else? Removing the fat logic would certainly make things faster :P
The last time you brought this up, it sunk in very deep. I have plans for PropWare v3.x to be a significant overhaul, and that will include the ability to easily choose between a parallel or sequential approach for drivers. I think it is important for libraries to allow or even encourage parallelism, but never force it.
If I'm feeling up to it, I may even take the assembly driver from fsrw and wrap it with a PropWare-compatible class so that you get the speed of fsrw's read ahead/write behind routines and all the other features of PropWare's higher level filesystem classes.
I recall having that discussion with a very ocd manager, and pointed out that 100% utilization is not needed to make something worthwhile. After all we have millions of cars that are parked far more often than they are driven and they are still considered very useful or even essential.
Had a few of those too. And when it was my turn, I chose to remember the outcome of that conversation. Well said.
As for the COGS, I prefer stuffing something into a COG, until it's a problem. Then, it's about optimizing the use of everything. There is no "wasting" a COG. The things are there, used or not, and that can be optimized, and it might not need to be.
I'm very much in agreement. Most of PropWare is not designed with parallelism in mind (with notable exceptions being PropWare::Runnable and PropWare::SynchronizedPrinter). My first goal with 3.x will be to separate the transmit/receive routines into different classes and then offer wrappers with buffers for async communication. For instance, SPI will become SPITransmit and SPIRecieve. SPITransmit will have a sister class such as AsyncSPITransmit, which invokes an SPITransmit instance in a new cog and communicates asynchronously via a buffer. SPIReceive will not have an async sister class. The new UART classes will be split up similarly, but have async sister classes for both transmit and receive.
I'm very excited to finish up v2.1 so I can start these massive changes on v3.x
Wow! Sounds very enterprisy. This will be very cool when complete.