This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 implementation of the FAT filesystem on SD.
IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.
- FAT32 on SDHC/SDXC
- Open file by name or dirent number
- Read currently opened file's attributes: file name and extension, is directory, is the volume name, size, date, time
- Read, write a block of data (writes are currently always synchronous)
- File management: rename, delete, create, find by filename
- Cluster management: Find free cluster, allocate an arbitrary cluster, allocate block of clusters, allocate additional cluster for currently open file, count clusters allocated to file
- POSIX-ish familiarities: (some) method names and params, file open modes
Symbol | Description | Seek behavior allowed |
---|---|---|
O_RDONLY |
Read | random |
O_WRITE |
Write | random |
O_RDWR |
Read/Write | random |
O_CREAT |
Create file | n/a |
O_APPEND |
Writes append to file | always points to EOF |
O_TRUNC |
Truncate file to 0 bytes after opening | n/a |
(modes are bitfields that can be OR'd together)
P1/SPIN1:
- spin-standard-library
- fatfs-spin
- sdmem-spin
P2/SPIN2:
p2-spin-standard-library
Processor | Language | Compiler | Backend | Status |
---|---|---|---|---|
P1 | SPIN1 | FlexSpin (6.8.1) | Bytecode | OK |
P1 | SPIN1 | FlexSpin (6.8.1) | Native/PASM | Some demos FTBFS |
P2 | SPIN2 | FlexSpin (6.8.1) | NuCode | Not yet implemented |
P2 | SPIN2 | FlexSpin (6.8.1) | Native/PASM2 | Not yet implemented |
(other versions or toolchains not listed are not supported, and may or may not work)
- Very early in development - may malfunction, or outright fail to build
- FAT16, FAT12 not yet supported
- Pre-SDHC cards unsupported (unplanned)
- No (sub)directory support yet
- No long filename support yet
- Slow
- API should be considered unstable