Code Size of Various SD Card/FAT32 Drivers
DavidZemon
Posts: 2,973
in Propeller 1
What kind of code sizes are folks looking at for write-capable SD card drivers on the Propeller? I'm only interested in ones running FAT32 drivers because the output needs to be (easily) legible on a computer, so no raw SD drivers. I'd like to log a bunch of data to an SD card in my balance bot software, but it's costing 12k to add PropWare's FatFileWriter and related classes.
My app is in C++, but I'm not at all opposed to converting Spin drivers via spin2cpp, so throw 'em all at me. Please tell me where the driver can be found, how much space it requires, and what model (Spin, PropGCC LMM, PropGCC CMM) gave that memory footprint.
My app is in C++, but I'm not at all opposed to converting Spin drivers via spin2cpp, so throw 'em all at me. Please tell me where the driver can be found, how much space it requires, and what model (Spin, PropGCC LMM, PropGCC CMM) gave that memory footprint.
Comments
It has a very fast PASM block diver with read ahead and write behind support.
Kye's Fat_engine is the completest FAT32 driver, but is also quite big,
That are the two choices in Spin.
Mike
Searches for a filename, opens and loads into hub ram, and restarts/reboots this code.
Compiled with homespun (think this removes unused routines) results in a 10KB file/hub.
That is certainly darned impressive.
Any idea on code size for fsrw?
Sounds like Kye's engine is on the same order of magnitude as mine. Maybe +/- 10 or 20%. @Cluso99, did I understand correctly that your 10kB test did not include file write?
https://sourceforge.net/p/fsrw/code/ci/default/tree/csource/fsrw.c
That's awesome! well done I will definitely take a look.
Last night I was looking in avrfreaks and they have boot code that is much smaller. IIRC about 2KB.
FWIW I have never tried to make a small boot code.
I decided to list the breakdown of the size of each routine and wrote a quick bit of code to list all the relevant routines and their code sizes. One of the largest routines is MOUNT at 138 code bytes but that also includes system messages. Some functions can be inferred from their names, certainly FOPEN RENAME etc and some other functions are simply runtime utilities such as setting the pins to be used for the SD card such as SDPSIN for configuring a Spinneret for instance since there is no need to specify any of this at compile time.