Go Down

Topic: Trying to use SDFat. (Read 656 times) previous topic - next topic

jimLee

I've written a bunch of stuff using the standard SD library. But I really want to be able to do things like rename a file, move or delete a directory.. So I figured I'd give SDFat a try.

I was able to get ONE of the sample sketches to work. QuickStart. But that disables everything else on the SPI bus.

readWrite sets the chip select to SS. I've looked through a bunch of the files, I thought all of them, but probably not. Where the heck is SS defined?

I commented out SS and set it to 4 because that's how my handheld is wired. This compiled, opened the new file.. But wrote nothing to it.

Adding my Adafruit display to the mix makes it so nothing compiles..

Code: [Select]
Arduino: 1.8.12 (Mac OS X), TD: 1.52, Board: "Teensy 3.2 / 3.1, Serial, 72 MHz, Faster, US English"

/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_1947/adafruit_1947_Obj.cpp: In constructor 'clipRecILI9341::clipRecILI9341(int, int)':
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_1947/adafruit_1947_Obj.cpp:13:31: warning: base 'clipRect' will be initialized after [-Wreorder]
  Adafruit_ILI9341(cs,LC_DC,rst) { }
                               ^
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_1947/adafruit_1947_Obj.cpp:13:31: warning:   base 'Adafruit_ILI9341' [-Wreorder]
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_1947/adafruit_1947_Obj.cpp:11:1: warning:   when initialized here [-Wreorder]
 clipRecILI9341::clipRecILI9341(int cs, int rst)
 ^
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_1431/adafruit_1431_Obj.cpp: In destructor 'virtual adafruit_1431_Obj::~adafruit_1431_Obj()':
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_1431/adafruit_1431_Obj.cpp:15:14: warning: deleting object of polymorphic class type 'Adafruit_SSD1351' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
       delete theOLED;
              ^
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_684/adafruit_684_Obj.cpp: In destructor 'virtual adafruit_684_Obj::~adafruit_684_Obj()':
/Users/jimlee/Documents/Arduino/libraries/LC_Adafruit_684/adafruit_684_Obj.cpp:32:14: warning: deleting object of polymorphic class type 'Adafruit_SSD1331' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
       delete theOLED;
              ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:25:57: error: 'void (* SdFile::dateTime_)(uint16_t*, uint16_t*)' is not a static data member of 'class SdFile'
 void (*SdFile::dateTime_)(uint16_t* date, uint16_t* time) = NULL;

                                                         ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:33:28: error: no 'uint8_t SdFile::addCluster()' member function declared in class 'SdFile'
 uint8_t SdFile::addCluster() {

                            ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:46:35: error: no 'uint8_t SdFile::addDirCluster()' member function declared in class 'SdFile'
 uint8_t SdFile::addDirCluster(void) {

                                   ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:61:44: error: no 'dir_t* SdFile::cacheDirEntry(uint8_t)' member function declared in class 'SdFile'
 dir_t* SdFile::cacheDirEntry(uint8_t action) {

                                            ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:74:27: error: no 'uint8_t SdFile::close()' member function declared in class 'SdFile'
 uint8_t SdFile::close(void) {

                           ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:91:71: error: no 'uint8_t SdFile::contiguousRange(uint32_t*, uint32_t*)' member function declared in class 'SdFile'
 uint8_t SdFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) {

                                                                       ^
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp:130:44: error: no 'uint8_t SdFile::createContiguous(SdFile*, const char*, uint32_t)' member function declared in class 'SdFile'
         const char* fileName, uint32_t size) {



Read the html. docs. for this stuff. It literally gave me a headache.

Is there a known way to set this up so simply replace the SD library?

Thanks!

-jim lee
PNW Ardiuno & Maker club
1012 9Th Street, Anacortes, WA 98221 (Around the back of building)
GITHUB -> https://github.com/leftCoast

Nick_Pyner

#1
Oct 18, 2020, 04:05 pm Last Edit: Oct 19, 2020, 03:06 am by Nick_Pyner
Hmm. The deafening silence here probably says a lot. I have never used, or felt the need to use, SDFat and still don't, but now somebody else sort of does, and I thought this might bring others out of the woodwork. Apparently not.

jimLee

No worries. Obviously not the popular option around here.

-jim lee
PNW Ardiuno & Maker club
1012 9Th Street, Anacortes, WA 98221 (Around the back of building)
GITHUB -> https://github.com/leftCoast

Go Up