Shop OBEX P1 Docs P2 Docs Learn Events
PASM / PropBasic SD Card Driver — Parallax Forums

PASM / PropBasic SD Card Driver

BeanBean Posts: 8,129
edited 2013-01-13 12:12 in Propeller 1
I am working on converting fsrw26 to PropBasic / PASM code.

My goal is to be able to make a Read-Only (SD to serial) or a Write-Only (data logger) application that will fit in 1 cog.

I want to make the driver as small as possible, so I've chosen to only support SDHC, FAT32, 16 files and no subdirectories. Does that sound like it would be a problem ?

Bean

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2013-01-11 10:09
    Sounds good - except for the 16 file limit, I think that would be too limiting... (pun intended)

    You might save more space by not supporting formatting cards (they can be formatted in a PC)
    Bean wrote: »
    I am working on converting fsrw26 to PropBasic / PASM code.

    My goal is to be able to make a Read-Only (SD to serial) or a Write-Only (data logger) application that will fit in 1 cog.

    I want to make the driver as small as possible, so I've chosen to only support SDHC, FAT32, 16 files and no subdirectories. Does that sound like it would be a problem ?

    Bean
  • Dave HeinDave Hein Posts: 6,347
    edited 2013-01-11 10:34
    I assume you're limiting it to 16 files so that you only have to look at the first sector of the directory. It shouldn't be much harder to handle a directory that's the size of a cluster, since all the sectors are contiguous within a cluster. That would allow you 512 files for 16K clusters, and 1024 files for 32K clusters. Also one trick I did in the pfth Forth interpreter was to use a subset of FSRW.spin to perform the mount at bootup, then that code went away after that. That way I didn't have to convert a lot of Spin code to Forth. The bootup/mount code would extract the volume information and store it in a memory location that was used later on by the Forth code.
  • BeanBean Posts: 8,129
    edited 2013-01-11 10:51
    Dave,
    Yes exactly. I just read the first sector of the root directory entries. I'll see if I can expand that to the first cluster, that shouldn't be too hard.

    Thanks for the feedback guys...

    Bean
  • MicksterMickster Posts: 2,694
    edited 2013-01-13 12:12
    Bean wrote: »
    I am working on converting fsrw26 to PropBasic / PASM code.

    My goal is to be able to make a Read-Only (SD to serial) or a Write-Only (data logger) application that will fit in 1 cog.

    I want to make the driver as small as possible, so I've chosen to only support SDHC, FAT32, 16 files and no subdirectories. Does that sound like it would be a problem ?

    Bean

    So this is going to be a Read-Only or Write-Only without the ability to do both or you'll have both but only load the required routine to a cog as needed?

    Cheers!

    Mickster
Sign In or Register to comment.