LittleFS port to Teensy/SPIFlash

dirkenstein

Active member
I have a crude proof-of-concept port of the ESP8266 implementation of LittleFS to Teensy using SPIFlash.

Except for the fact that the included SPIFlash library seems to hang with my 8Mbit Winbond chip (I had to use the version from GitHub) everything appears to work on a first pass.

Is there any use/need for this more generally? I was looking to use it to store log files (lots of file appends).
 
I have switched from the NodeMCU to the Teensy 4.1 and would love to have a file system like on the ESP8266 for an Ethernet web server so I can store all of my JavaScript gauges and such.
 
Good info going to keep an eye as well. If you care to share you code it would be great.

June 9, 2021 : quick edit here to link to :: github.com/PaulStoffregen/LittleFS

{ as it stands with Beta 9 }
And show the T_4.1 supported chips:
LittleFS/blob/main/src/LittleFS.cpp#L38
Code:
} known_chips[] = {
	{{0xEF, 0x40, 0x15}, 24, 256, 4096, 2097152, 3000, 400000}, // Winbond W25Q16JV*IQ/W25Q16FV
	{{0xEF, 0x40, 0x16}, 24, 256, 4096, 4194304, 3000, 400000}, // Winbond W25Q32JV*IQ/W25Q32FV
	{{0xEF, 0x40, 0x17}, 24, 256, 4096, 8388608, 3000, 400000}, // Winbond W25Q64JV*IQ/W25Q64FV
	{{0xEF, 0x40, 0x18}, 24, 256, 4096, 16777216, 3000, 400000}, // Winbond W25Q128JV*IQ/W25Q128FV
	{{0xEF, 0x40, 0x19}, 32, 256, 4096, 33554432, 3000, 400000}, // Winbond W25Q256JV*IQ
	{{0xEF, 0x40, 0x20}, 32, 256, 4096, 67108864, 3500, 400000}, // Winbond W25Q512JV*IQ
	{{0xEF, 0x70, 0x17}, 24, 256, 4096, 8388608, 3000, 400000}, // Winbond W25Q64JV*IM (DTR)
	{{0xEF, 0x70, 0x18}, 24, 256, 4096, 16777216, 3000, 400000}, // Winbond W25Q128JV*IM (DTR)
	{{0xEF, 0x70, 0x19}, 32, 256, 4096, 33554432, 3000, 400000}, // Winbond W25Q256JV*IM (DTR)
	{{0xEF, 0x70, 0x20}, 32, 256, 4096, 67108864, 3500, 400000}, // Winbond W25Q512JV*IM (DTR)
	{{0x1F, 0x84, 0x01}, 24, 256, 4096, 524288, 2500, 300000}, // Adesto/Atmel AT25SF041
	{{0x01, 0x40, 0x14}, 24, 256, 4096, 1048576, 5000, 300000}, // Spansion S25FL208K
	//FRAM
	{{0x03, 0x2E, 0xC2}, 24, 64, 128, 1048576, 250, 1200},  //Cypress 8Mb FRAM
	{{0xC2, 0x24, 0x00}, 24, 64, 128, 131072, 250, 1200},  //Cypress 1Mb FRAM
	{{0xC2, 0x24, 0x01}, 24, 64, 128, 131072, 250, 1200},  //Cypress 1Mb FRAM, rev1
	{{0xAE, 0x83, 0x09}, 24, 64, 128, 131072, 250, 1200},  //ROHM MR45V100A 1 Mbit FeRAM Memory
	{{0xC2, 0x26, 0x08}, 24, 64, 128, 131072, 250, 1200},  //Cypress 4Mb FRAM

LittleFS/blob/main/src/LittleFS_NAND.cpp#L37
Code:
} known_chips[] = {
	//NAND
	//{{0xEF, 0xAA, 0x21}, 24, 2048, 131072, 134217728,   2000, 15000},  //Winbond W25N01G
	//Upper 24 blocks * 128KB/block will be used for bad block replacement area
	//so reducing total chip size: 134217728 - 24*131072
	{{0xEF, 0xAA, 0x21}, 24, 2048, 131072, 131596288,   2000, 15000},  //Winbond W25N01G
	//{{0xEF, 0xAA, 0x22}, 24, 2048, 131072, 134217728*2, 2000, 15000},  //Winbond W25N02G
	{{0xEF, 0xAA, 0x22}, 24, 2048, 131072, 265289728, 2000, 15000},  //Winbond W25N02G
	{{0xEF, 0xBB, 0x21}, 24, 2048, 131072, 265289728, 2000, 15000},  //Winbond W25M02
 
Last edited by a moderator:
Ok was playing around with speedtest example and am getting a bunch of errors if i just copy the libs into the libraries folder. (downloaded SPImemory from your repository on github. So what is the install process and the example I should be playing with.
 
Sorry, the examples are not up to date. They need some namespace /include file logic adding.
I will copy fixed versions in tonight, as well as a complex example program that uses both SDFS and LittleFS.

The SPIMMemory version in my repo hasn't eean updated with my changes yet.
 
Sorry, the examples are not up to date. They need some namespace /include file logic adding.
I will copy fixed versions in tonight, as well as a complex example program that uses both SDFS and LittleFS.

The SPIMMemory version in my repo hasn't eean updated with my changes yet.

Thanks. Kind of figured it was a namespace issue when I was digging into the error messages. Was just curious about how you set it up, etc. It did help already even with the error messages I got :)

No real rush - just my curiosity got to me
 
This will be interesting. Also wondering if this will be mainly for external storage?

I still keep thinking if most of my program don't exceed 1MB... And the T4 has 2 and T4.1 has 8 and the MM? maybe 16. Would be great if one could create a drive without needing additional hardware.

For sure will be following along. And great work!
 
This will be interesting. Also wondering if this will be mainly for external storage?

I still keep thinking if most of my program don't exceed 1MB... And the T4 has 2 and T4.1 has 8 and the MM? maybe 16. Would be great if one could create a drive without needing additional hardware.

For sure will be following along. And great work!

If I read the ESP8266 docs correctly you should be able to set up the pointer defined to what internal or external flash. For instance in the case above its pointer to class SPIFlash which does the defines for:
Code:
public:
  //------------------------------------ Constructor ------------------------------------//
  //New Constructor to Accept the PinNames as a Chip select Parameter - @boseji <salearj@hotmail.com> 02.03.17
  #if defined (ARDUINO_ARCH_SAMD) || defined(ARCH_STM32) || defined(ARDUINO_ARCH_ESP32)
  SPIFlash(uint8_t cs = CS, SPIClass *spiinterface=&SPI);
  #elif defined (BOARD_RTL8195A)
  SPIFlash(PinName cs = CS);
  #else
  SPIFlash(uint8_t cs = CS);
  SPIFlash(int8_t *SPIPinsArray);
  #endif
  //----------------------------- Initial / Chip Functions ------------------------------//
  bool     begin(uint32_t flashChipSize = 0);
  #ifdef SPI_HAS_TRANSACTION
  void     setClock(uint32_t clockSpeed);
  #else
  void     setClock(uint8_t clockdiv);
  #endif
  bool     libver(uint8_t *b1, uint8_t *b2, uint8_t *b3);
  bool     sfdpPresent(void);
  uint8_t  error(bool verbosity = false);
  uint16_t getManID(void);
  uint32_t getJEDECID(void);
  uint64_t getUniqueID(void);
  uint32_t getAddress(uint16_t size);
  uint16_t sizeofStr(String &inputStr);
  uint32_t getCapacity(void);
  uint32_t getMaxPage(void);
  float    functionRunTime(void);
  //-------------------------------- Write / Read Bytes ---------------------------------//
  bool     writeByte(uint32_t _addr, uint8_t data, bool errorCheck = true);
  uint8_t  readByte(uint32_t _addr, bool fastRead = false);
  //----------------------------- Write / Read Byte Arrays ------------------------------//
  bool     writeByteArray(uint32_t _addr, uint8_t *data_buffer, size_t bufferSize, bool errorCheck = true);
  bool     readByteArray(uint32_t _addr, uint8_t *data_buffer, size_t bufferSize, bool fastRead = false);
  //-------------------------------- Write / Read Chars ---------------------------------//
  bool     writeChar(uint32_t _addr, int8_t data, bool errorCheck = true);
  int8_t   readChar(uint32_t _addr, bool fastRead = false);
  //------------------------------ Write / Read Char Arrays -----------------------------//
  bool     writeCharArray(uint32_t _addr, char *data_buffer, size_t bufferSize, bool errorCheck = true);
  bool     readCharArray(uint32_t _addr, char *data_buffer, size_t buffer_size, bool fastRead = false);
  //-------------------------------- Write / Read Shorts --------------------------------//
  bool     writeShort(uint32_t _addr, int16_t data, bool errorCheck = true);
  int16_t  readShort(uint32_t _addr, bool fastRead = false);
  //-------------------------------- Write / Read Words ---------------------------------//
  bool     writeWord(uint32_t _addr, uint16_t data, bool errorCheck = true);
  uint16_t readWord(uint32_t _addr, bool fastRead = false);
  //-------------------------------- Write / Read Longs ---------------------------------//
  bool     writeLong(uint32_t _addr, int32_t data, bool errorCheck = true);
  int32_t  readLong(uint32_t _addr, bool fastRead = false);
  //--------------------------- Write / Read Unsigned Longs -----------------------------//
  bool     writeULong(uint32_t _addr, uint32_t data, bool errorCheck = true);
  uint32_t readULong(uint32_t _addr, bool fastRead = false);
  //-------------------------------- Write / Read Floats --------------------------------//
  bool     writeFloat(uint32_t _addr, float data, bool errorCheck = true);
  float    readFloat(uint32_t _addr, bool fastRead = false);
  //-------------------------------- Write / Read Strings -------------------------------//
  bool     writeStr(uint32_t _addr, String &data, bool errorCheck = true);
  bool     readStr(uint32_t _addr, String &data, bool fastRead = false);
  //------------------------------- Write / Read Anything -------------------------------//

  template <class T> bool writeAnything(uint32_t _addr, const T& data, bool errorCheck = true);
  template <class T> bool readAnything(uint32_t _addr, T& data, bool fastRead = false);
  //-------------------------------- Erase functions ------------------------------------//
  bool     eraseSection(uint32_t _addr, uint32_t _sz);
  bool     eraseSector(uint32_t _addr);
  bool     eraseBlock32K(uint32_t _addr);
  bool     eraseBlock64K(uint32_t _addr);
  bool     eraseChip(void);
  //-------------------------------- Power functions ------------------------------------//
  bool     suspendProg(void);
  bool     resumeProg(void);
  bool     powerDown(void);
  bool     powerUp(void);
Look kind of familiar. Most of those functions I have already available for the QSPI Flash or easily ported back. A few additional ones would have to be added but very doable. Good thing I play around so much with the flash library. So instead of pointing to the SPIflash with could point it to a QSPIflash lib for the T4.1 at least.
 
just for the record, a while back (see old thread), I managed to get adafruit's FatFs lib to work on SPI flash on Teensy prop shield with Teensy 3.2.

http://elm-chan.org/fsw/ff/00index_e.html fatfs
Don't remember that old thread (only 2 years old) but I did come across the Adafruit SPIflash library when we first started playing with SPIFFS. As you said not sure you want to use FatFS:
Of course there are a lot of arguments of why you wouldn't the overhead of FatFs on an embedded SPI serial flash ...
But its always an option. Think its going to Paul's call in the end. Know for the NAND chip not sure FatFS or LittleFS is going to be the way to go from what I was reading.
 
LittleFS examples updated to support Teensy. now in the repo.
Oh, and BTW the BD directory in littlefs needs to be removed as it doesn't compile under teensy.
 
LittleFS examples updated to support Teensy. now in the repo.
Oh, and BTW the BD directory in littlefs needs to be removed as it doesn't compile under teensy.

Thank you for the update. Did you update SPIMemory as well, you mentioned that the you had wasn't updated.
 
Just downloaded your latest libraries and tried a compile for your listfiles examples in the littlefs-teensy directory and still the errors I mentioned before. I am using beta4 of TD on a T4.1 for testing. This time I am listing them for you to see what I am seeing:
Code:
Arduino: 1.8.13 (Windows 10), TD: 1.54-beta4, Board: "Teensy 4.1, Serial, 600 MHz, Faster, US English"


In file included from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:34:0,
                 from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino:20:

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:64:13: error: 'FileImplPtr' does not name a type
     virtual FileImplPtr openFile(OpenMode openMode, AccessMode accessMode) = 0;
             ^

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:89:34: error: 'FSConfig' does not name a type
     virtual bool setConfig(const FSConfig &cfg) = 0;
                                  ^

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:93:23: error: 'FSInfo' has not been declared
     virtual bool info(FSInfo& info) = 0;
                       ^

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:94:25: error: 'FSInfo64' has not been declared
     virtual bool info64(FSInfo64& info) = 0;
                         ^

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:95:13: error: 'FileImplPtr' does not name a type
     virtual FileImplPtr open(const char* path, OpenMode openMode, AccessMode accessMode) = 0;

             ^

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:97:13: error: 'DirImplPtr' does not name a type

     virtual DirImplPtr openDir(const char* path) = 0;

             ^

D:\Users\Merli\Documents\Arduino\libraries\FS-Teensy-master/FSImpl.h:104:23: error: 'FileMap' has not been declared

     virtual bool sync(FileMap &openFiles) { return true; }; //Default do nothing

                       ^

In file included from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino:20:0:

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:59:1: error: expected class-name before '{' token

 {

 ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSConfig::LittleFSConfig(bool)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:62:46: error: class 'littlefs_impl::LittleFSConfig' does not have any field named 'FSConfig'

     LittleFSConfig(bool autoFormat = true) : FSConfig(FSId, autoFormat) { }

                                              ^

In file included from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino:20:0:

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: At global scope:

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:111:5: error: 'FileImplPtr' does not name a type

     FileImplPtr open(const char* path, OpenMode openMode, AccessMode accessMode) override;

     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:112:5: error: 'DirImplPtr' does not name a type

     DirImplPtr openDir(const char *path) override;

     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:135:15: error: 'FSInfo' has not been declared

     bool info(FSInfo& info) override {

               ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:149:25: error: 'FSInfo64' has not been declared

     virtual bool info64(FSInfo64& info64) {

                         ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:208:26: error: 'FSConfig' does not name a type

     bool setConfig(const FSConfig &cfg) override {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:264:14: error: 'FileMap' has not been declared

    bool sync(FileMap &openFiles) {

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:304:26: error: 'OpenMode' has not been declared

     static int _getFlags(OpenMode openMode, AccessMode accessMode) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:304:45: error: 'AccessMode' has not been declared

     static int _getFlags(OpenMode openMode, AccessMode accessMode) {

                                             ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSImpl::LittleFSImpl(SPIFlash*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:83:51: error: 'class SPIFlash' has no member named 'getPageSize'

         _blockSize = _blockSize == 0 ? _spiflash->getPageSize() : _blockSize; 

                                                   ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::info(int&)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:139:14: error: request for member 'maxOpenFiles' in 'info', which is of non-class type 'int'

         info.maxOpenFiles = _maxOpenFds;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:140:14: error: request for member 'blockSize' in 'info', which is of non-class type 'int'

         info.blockSize = _blockSize;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:141:14: error: request for member 'pageSize' in 'info', which is of non-class type 'int'

         info.pageSize = _pageSize;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:142:14: error: request for member 'maxOpenFiles' in 'info', which is of non-class type 'int'

         info.maxOpenFiles = _maxOpenFds;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:143:14: error: request for member 'maxPathLength' in 'info', which is of non-class type 'int'

         info.maxPathLength = LFS_NAME_MAX;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:144:14: error: request for member 'totalBytes' in 'info', which is of non-class type 'int'

         info.totalBytes = _size;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:145:14: error: request for member 'usedBytes' in 'info', which is of non-class type 'int'

         info.usedBytes = _getUsedBlocks() * _blockSize;

              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::info64(int&)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:150:9: error: 'FSInfo' was not declared in this scope

         FSInfo i;

         ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:151:19: error: 'i' was not declared in this scope

         if (!info(i)) {

                   ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:154:16: error: request for member 'blockSize' in 'info64', which is of non-class type 'int'

         info64.blockSize     = i.blockSize;

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:154:32: error: 'i' was not declared in this scope

         info64.blockSize     = i.blockSize;

                                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:155:16: error: request for member 'pageSize' in 'info64', which is of non-class type 'int'

         info64.pageSize      = i.pageSize;

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:156:16: error: request for member 'maxOpenFiles' in 'info64', which is of non-class type 'int'

         info64.maxOpenFiles  = i.maxOpenFiles;

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:157:16: error: request for member 'maxPathLength' in 'info64', which is of non-class type 'int'

         info64.maxPathLength = i.maxPathLength;

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:158:16: error: request for member 'totalBytes' in 'info64', which is of non-class type 'int'

         info64.totalBytes    = i.totalBytes;

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:159:16: error: request for member 'usedBytes' in 'info64', which is of non-class type 'int'

         info64.usedBytes     = i.usedBytes;

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::setConfig(const int&)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:209:18: error: request for member '_type' in 'cfg', which is of non-class type 'const int'

         if ((cfg._type != LittleFSConfig::FSId) || _mounted) {

                  ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:212:57: error: invalid static_cast from type 'const int*' to type 'const littlefs_impl::LittleFSConfig*'

         _cfg = *static_cast<const LittleFSConfig *>(&cfg);

                                                         ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::begin()':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:224:19: error: 'class littlefs_impl::LittleFSConfig' has no member named '_autoFormat'

         if (!_cfg._autoFormat || !format()) {

                   ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::sync(int&)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:265:6: error: 'FileMap' has not been declared

      FileMap::iterator itr;

      ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:266:11: error: 'itr' was not declared in this scope

      for (itr = openFiles.begin(); itr != openFiles.end(); ++itr) {

           ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:266:27: error: request for member 'begin' in 'openFiles', which is of non-class type 'int'

      for (itr = openFiles.begin(); itr != openFiles.end(); ++itr) {

                           ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:266:53: error: request for member 'end' in 'openFiles', which is of non-class type 'int'

      for (itr = openFiles.begin(); itr != openFiles.end(); ++itr) {

                                                     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:267:2: error: 'File' is not a member of 'fs'

  fs::File* filp = itr->second;

  ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:267:2: note: suggested alternative:

In file included from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:33:0,

                 from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino:20:

F:\arduino-1.8.13-beta4\hardware\teensy\avr\cores\teensy4/FS.h:48:7: note:   'File'

 class File : public Stream {

       ^

In file included from D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino:20:0:

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:267:12: error: 'filp' was not declared in this scope

  fs::File* filp = itr->second;

            ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:272:4: warning: no return statement in function returning non-void [-Wreturn-type]

    }

    ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In static member function 'static int littlefs_impl::LittleFSImpl::_getFlags(int, int)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:306:24: error: 'OM_CREATE' was not declared in this scope

         if (openMode & OM_CREATE) {

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:309:24: error: 'OM_APPEND' was not declared in this scope

         if (openMode & OM_APPEND) {

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:312:24: error: 'OM_TRUNCATE' was not declared in this scope

         if (openMode & OM_TRUNCATE) {

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:315:26: error: 'AM_READ' was not declared in this scope

         if (accessMode & AM_READ) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:318:26: error: 'AM_WRITE' was not declared in this scope

         if (accessMode & AM_WRITE) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: At global scope:

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:371:63: error: 'std::shared_ptr' has not been declared

     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {

                                                               ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:371:73: error: expected ',' or '...' before '<' token

     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {

                                                                         ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:566:10: error: 'shared_ptr' in namespace 'std' does not name a template type

     std::shared_ptr<lfs_file_t>  _fd;

          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:567:10: error: 'shared_ptr' in namespace 'std' does not name a template type

     std::shared_ptr<char>        _name;

          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSFileImpl::LittleFSFileImpl(littlefs_impl::LittleFSImpl*, const char*, int)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:371:129: error: class 'littlefs_impl::LittleFSFileImpl' does not have any field named '_fd'

     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {

                                                                                                                                 ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:371:133: error: 'fd' was not declared in this scope

     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {

                                                                                                                                     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:371:160: error: 'flags' was not declared in this scope

     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {

                                                                                                                                                                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:371:178: error: 'creation' was not declared in this scope

     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {

                                                                                                                                                                                  ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:372:9: error: '_name' was not declared in this scope

         _name = std::shared_ptr<char>(new char[strlen(name) + 1], std::default_delete<char[]>());

         ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:372:17: error: 'shared_ptr' is not a member of 'std'

         _name = std::shared_ptr<char>(new char[strlen(name) + 1], std::default_delete<char[]>());

                 ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:372:33: error: expected primary-expression before 'char'

         _name = std::shared_ptr<char>(new char[strlen(name) + 1], std::default_delete<char[]>());

                                 ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::write(const uint8_t*, size_t)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:383:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd || !buf) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::read(uint8_t*, size_t)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:395:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd | !buf) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual void littlefs_impl::LittleFSFileImpl::flush()':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:408:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:414:50: error: '_name' was not declared in this scope

               int rc = lfs_setattr(_fs->getFS(), _name.get(), 'c', (const void *)&_creation, sizeof(_creation));

                                                  ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:421:48: error: '_name' was not declared in this scope

             int rc = lfs_setattr(_fs->getFS(), _name.get(), 't', (const void *)&now, sizeof(now));

                                                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:421:17: warning: unused variable 'rc' [-Wunused-variable]

             int rc = lfs_setattr(_fs->getFS(), _name.get(), 't', (const void *)&now, sizeof(now));

                 ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::seek(uint32_t, SeekMode)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:430:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::position() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:451:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::size() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:464:28: error: '_fd' was not declared in this scope

         return (_opened && _fd)? lfs_file_size(_fs->getFS(), _getFD()) : 0;

                            ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::truncate(uint32_t)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:468:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual void littlefs_impl::LittleFSFileImpl::close()':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:480:24: error: '_fd' was not declared in this scope

         if (_opened && _fd) {

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:487:56: error: '_name' was not declared in this scope

                     int rc = lfs_setattr(_fs->getFS(), _name.get(), 'c', (const void *)&_creation, sizeof(_creation));

                                                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:494:52: error: '_name' was not declared in this scope

                 int rc = lfs_setattr(_fs->getFS(), _name.get(), 't', (const void *)&now, sizeof(now));

                                                    ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual time_t littlefs_impl::LittleFSFileImpl::getLastWrite()':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:504:24: error: '_fd' was not declared in this scope

         if (_opened && _fd) {

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:505:48: error: '_name' was not declared in this scope

             int rc = lfs_getattr(_fs->getFS(), _name.get(), 't', (void *)&ftime, sizeof(ftime));

                                                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual time_t littlefs_impl::LittleFSFileImpl::getCreationTime()':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:516:24: error: '_fd' was not declared in this scope

         if (_opened && _fd) {

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:517:48: error: '_name' was not declared in this scope

             int rc = lfs_getattr(_fs->getFS(), _name.get(), 'c', (void *)&ftime, sizeof(ftime));

                                                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual const char* littlefs_impl::LittleFSFileImpl::name() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:530:29: error: '_name' was not declared in this scope

             const char *p = _name.get();

                             ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual const char* littlefs_impl::LittleFSFileImpl::fullName() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:537:26: error: '_name' was not declared in this scope

         return _opened ? _name.get() : nullptr;

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::isFile() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:541:26: error: '_fd' was not declared in this scope

         if (!_opened || !_fd) {

                          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::isDirectory() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:552:21: error: '_fd' was not declared in this scope

         } else if (!_fd) {

                     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'lfs_file_t* littlefs_impl::LittleFSFileImpl::_getFD() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:562:16: error: '_fd' was not declared in this scope

         return _fd.get();

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: At global scope:

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:576:67: error: 'std::shared_ptr' has not been declared

     LittleFSDirImpl(const String& pattern, LittleFSImpl* fs, std::shared_ptr<lfs_dir_t> dir, const char *dirPath = nullptr)

                                                                   ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:576:77: error: expected ',' or '...' before '<' token

     LittleFSDirImpl(const String& pattern, LittleFSImpl* fs, std::shared_ptr<lfs_dir_t> dir, const char *dirPath = nullptr)

                                                                             ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:592:5: error: 'FileImplPtr' does not name a type

     FileImplPtr openFile(OpenMode openMode, AccessMode accessMode) override {

     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:681:10: error: 'shared_ptr' in namespace 'std' does not name a template type

     std::shared_ptr<lfs_dir_t>  _dir;

          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:682:10: error: 'shared_ptr' in namespace 'std' does not name a template type

     std::shared_ptr<char>       _dirPath;

          ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSDirImpl::LittleFSDirImpl(const String&, littlefs_impl::LittleFSImpl*, int)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:577:41: error: class 'littlefs_impl::LittleFSDirImpl' does not have any field named '_dir'

         : _pattern(pattern) , _fs(fs) , _dir(dir) , _dirPath(nullptr), _valid(false), _opened(true)

                                         ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:577:46: error: 'dir' was not declared in this scope

         : _pattern(pattern) , _fs(fs) , _dir(dir) , _dirPath(nullptr), _valid(false), _opened(true)

                                              ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:577:53: error: class 'littlefs_impl::LittleFSDirImpl' does not have any field named '_dirPath'

         : _pattern(pattern) , _fs(fs) , _dir(dir) , _dirPath(nullptr), _valid(false), _opened(true)

                                                     ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:580:13: error: 'dirPath' was not declared in this scope

         if (dirPath) {

             ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:581:13: error: '_dirPath' was not declared in this scope

             _dirPath = std::shared_ptr<char>(new char[strlen(dirPath) + 1], std::default_delete<char[]>());

             ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:581:24: error: 'shared_ptr' is not a member of 'std'

             _dirPath = std::shared_ptr<char>(new char[strlen(dirPath) + 1], std::default_delete<char[]>());

                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:581:40: error: expected primary-expression before 'char'

             _dirPath = std::shared_ptr<char>(new char[strlen(dirPath) + 1], std::default_delete<char[]>());

                                        ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'lfs_dir_t* littlefs_impl::LittleFSDirImpl::_getDir() const':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:660:16: error: '_dir' was not declared in this scope

         return _dir.get();

                ^

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h: In member function 'uint32_t littlefs_impl::LittleFSDirImpl::_getAttr4(char)':

D:\Users\Merli\Documents\Arduino\libraries\LittleFS-Teensy-master\src/LittleFS.h:668:20: error: '_dirPath' was not declared in this scope

         nameLen += _dirPath.get() ? strlen(_dirPath.get()) : 0;

                    ^

listfiles: In function 'void setup()':

listfiles:61: error: 'FSImplPtr' was not declared in this scope

   LittleFS = new FS(FSImplPtr(new littlefs_impl::LittleFSImpl(FLASH, FS_PHYS_ADDR, 0, /*FS_PHYS_SIZE,*/ FS_PHYS_PAGE, FS_PHYS_BLOCK, FS_MAX_OPEN_FILES)));

                                                                                                                                                        ^

listfiles:62: error: 'class FS' has no member named 'begin'

   if (!LittleFS->begin()) {

                  ^

'FSImplPtr' was not declared in this scope



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 
Installed a fresh 1.8.13 IDE folder with TS_1.54b4 and made a PORTABLE subfolder and put the four @dirkenstein libraries for littleFS there.

<edit> :: Seeing this now ... "It also needs an updated SPIMemory library which i will place on GitHub ASAP"
github.com/dirkenstein/SPIMemory

>> and todo this : "the BD directory in littlefs needs to be removed as it doesn't compile under teensy."
>This seems to be gone now?

I get this:
Code:
In file included from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino:20:0:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy-master\src/LittleFS.h:38:23: fatal error: SPIMemory.h: No such file or directory
compilation terminated.
Error compiling for board Teensy 4.1.

Not sure yet where this is to come from for :: T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy-master\examples\listfiles\listfiles.ino
Code:
#include <LittleFS.h>
#include <SPI.h>
#include <[B]SPIMemory.h[/B]>

@mjs513: Note I tried this with 'portable' in Tset (changed compile.cmd path there :set arduino=T:\arduino-1.8.13_p54) and it doesn't seem to redirect to :: portable\sketchbook\libraries
>tset edit pending just alter lib folder ...
 
Last edited:
Okay SPIMemory resolved.

Had to Move 'littlefs' to :: portable\sketchbook\libraries\LittleFS-Teensy\src\lib\littlefs

@dirkenstein: @mjs513 or myself could EDIT post #1 to add setup/install steps including all the github and setup needed

Now I seem to be getting the same error list @mjs513 presented above:
Code:
In file included from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:34:0,
                 from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\examples\listfiles\listfiles.ino:20:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:64:13: error: 'FileImplPtr' does not name a type
     virtual FileImplPtr openFile(OpenMode openMode, AccessMode accessMode) = 0;
             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:89:34: error: 'FSConfig' does not name a type
     virtual bool setConfig(const FSConfig &cfg) = 0;
                                  ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:93:23: error: 'FSInfo' has not been declared
     virtual bool info(FSInfo& info) = 0;
                       ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:94:25: error: 'FSInfo64' has not been declared
     virtual bool info64(FSInfo64& info) = 0;
                         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:95:13: error: 'FileImplPtr' does not name a type
     virtual FileImplPtr open(const char* path, OpenMode openMode, AccessMode accessMode) = 0;
             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:97:13: error: 'DirImplPtr' does not name a type
     virtual DirImplPtr openDir(const char* path) = 0;
             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\FS-Teensy/FSImpl.h:104:23: error: 'FileMap' has not been declared
     virtual bool sync(FileMap &openFiles) { return true; }; //Default do nothing
                       ^
In file included from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\examples\listfiles\listfiles.ino:20:0:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:59:1: error: expected class-name before '{' token
 {
 ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSConfig::LittleFSConfig(bool)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:62:46: error: class 'littlefs_impl::LittleFSConfig' does not have any field named 'FSConfig'
     LittleFSConfig(bool autoFormat = true) : FSConfig(FSId, autoFormat) { }
                                              ^
In file included from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\examples\listfiles\listfiles.ino:20:0:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: At global scope:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:111:5: error: 'FileImplPtr' does not name a type
     FileImplPtr open(const char* path, OpenMode openMode, AccessMode accessMode) override;
     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:112:5: error: 'DirImplPtr' does not name a type
     DirImplPtr openDir(const char *path) override;
     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:135:15: error: 'FSInfo' has not been declared
     bool info(FSInfo& info) override {
               ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:149:25: error: 'FSInfo64' has not been declared
     virtual bool info64(FSInfo64& info64) {
                         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:208:26: error: 'FSConfig' does not name a type
     bool setConfig(const FSConfig &cfg) override {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:264:14: error: 'FileMap' has not been declared
    bool sync(FileMap &openFiles) {
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:304:26: error: 'OpenMode' has not been declared
     static int _getFlags(OpenMode openMode, AccessMode accessMode) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:304:45: error: 'AccessMode' has not been declared
     static int _getFlags(OpenMode openMode, AccessMode accessMode) {
                                             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSImpl::LittleFSImpl(SPIFlash*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:83:51: error: 'class SPIFlash' has no member named 'getPageSize'
         _blockSize = _blockSize == 0 ? _spiflash->getPageSize() : _blockSize; 
                                                   ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::info(int&)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:139:14: error: request for member 'maxOpenFiles' in 'info', which is of non-class type 'int'
         info.maxOpenFiles = _maxOpenFds;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:140:14: error: request for member 'blockSize' in 'info', which is of non-class type 'int'
         info.blockSize = _blockSize;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:141:14: error: request for member 'pageSize' in 'info', which is of non-class type 'int'
         info.pageSize = _pageSize;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:142:14: error: request for member 'maxOpenFiles' in 'info', which is of non-class type 'int'
         info.maxOpenFiles = _maxOpenFds;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:143:14: error: request for member 'maxPathLength' in 'info', which is of non-class type 'int'
         info.maxPathLength = LFS_NAME_MAX;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:144:14: error: request for member 'totalBytes' in 'info', which is of non-class type 'int'
         info.totalBytes = _size;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:145:14: error: request for member 'usedBytes' in 'info', which is of non-class type 'int'
         info.usedBytes = _getUsedBlocks() * _blockSize;
              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::info64(int&)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:150:9: error: 'FSInfo' was not declared in this scope
         FSInfo i;
         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:151:19: error: 'i' was not declared in this scope
         if (!info(i)) {
                   ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:154:16: error: request for member 'blockSize' in 'info64', which is of non-class type 'int'
         info64.blockSize     = i.blockSize;
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:154:32: error: 'i' was not declared in this scope
         info64.blockSize     = i.blockSize;
                                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:155:16: error: request for member 'pageSize' in 'info64', which is of non-class type 'int'
         info64.pageSize      = i.pageSize;
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:156:16: error: request for member 'maxOpenFiles' in 'info64', which is of non-class type 'int'
         info64.maxOpenFiles  = i.maxOpenFiles;
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:157:16: error: request for member 'maxPathLength' in 'info64', which is of non-class type 'int'
         info64.maxPathLength = i.maxPathLength;
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:158:16: error: request for member 'totalBytes' in 'info64', which is of non-class type 'int'
         info64.totalBytes    = i.totalBytes;
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:159:16: error: request for member 'usedBytes' in 'info64', which is of non-class type 'int'
         info64.usedBytes     = i.usedBytes;
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::setConfig(const int&)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:209:18: error: request for member '_type' in 'cfg', which is of non-class type 'const int'
         if ((cfg._type != LittleFSConfig::FSId) || _mounted) {
                  ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:212:57: error: invalid static_cast from type 'const int*' to type 'const littlefs_impl::LittleFSConfig*'
         _cfg = *static_cast<const LittleFSConfig *>(&cfg);
                                                         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::begin()':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:224:19: error: 'class littlefs_impl::LittleFSConfig' has no member named '_autoFormat'
         if (!_cfg._autoFormat || !format()) {
                   ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSImpl::sync(int&)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:265:6: error: 'FileMap' has not been declared
      FileMap::iterator itr;
      ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:266:11: error: 'itr' was not declared in this scope
      for (itr = openFiles.begin(); itr != openFiles.end(); ++itr) {
           ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:266:27: error: request for member 'begin' in 'openFiles', which is of non-class type 'int'
      for (itr = openFiles.begin(); itr != openFiles.end(); ++itr) {
                           ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:266:53: error: request for member 'end' in 'openFiles', which is of non-class type 'int'
      for (itr = openFiles.begin(); itr != openFiles.end(); ++itr) {
                                                     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:267:2: error: 'File' is not a member of 'fs'
  fs::File* filp = itr->second;
  ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:267:2: note: suggested alternative:
In file included from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:33:0,
                 from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\examples\listfiles\listfiles.ino:20:
T:\arduino-1.8.13_p54\hardware\teensy\avr\cores\teensy4/FS.h:48:7: note:   'File'
 class File : public Stream {
       ^
In file included from T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\examples\listfiles\listfiles.ino:20:0:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:267:12: error: 'filp' was not declared in this scope
  fs::File* filp = itr->second;
            ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:272:4: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In static member function 'static int littlefs_impl::LittleFSImpl::_getFlags(int, int)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:306:24: error: 'OM_CREATE' was not declared in this scope
         if (openMode & OM_CREATE) {
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:309:24: error: 'OM_APPEND' was not declared in this scope
         if (openMode & OM_APPEND) {
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:312:24: error: 'OM_TRUNCATE' was not declared in this scope
         if (openMode & OM_TRUNCATE) {
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:315:26: error: 'AM_READ' was not declared in this scope
         if (accessMode & AM_READ) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:318:26: error: 'AM_WRITE' was not declared in this scope
         if (accessMode & AM_WRITE) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: At global scope:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:371:63: error: 'std::shared_ptr' has not been declared
     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {
                                                               ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:371:73: error: expected ',' or '...' before '<' token
     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {
                                                                         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:566:10: error: 'shared_ptr' in namespace 'std' does not name a template type
     std::shared_ptr<lfs_file_t>  _fd;
          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:567:10: error: 'shared_ptr' in namespace 'std' does not name a template type
     std::shared_ptr<char>        _name;
          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSFileImpl::LittleFSFileImpl(littlefs_impl::LittleFSImpl*, const char*, int)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:371:129: error: class 'littlefs_impl::LittleFSFileImpl' does not have any field named '_fd'
     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {
                                                                                                                                 ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:371:133: error: 'fd' was not declared in this scope
     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {
                                                                                                                                     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:371:160: error: 'flags' was not declared in this scope
     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {
                                                                                                                                                                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:371:178: error: 'creation' was not declared in this scope
     LittleFSFileImpl(LittleFSImpl* fs, const char *name, std::shared_ptr<lfs_file_t> fd, int flags, time_t creation) : _fs(fs), _fd(fd), _opened(true), _flags(flags), _creation(creation) {
                                                                                                                                                                                  ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:372:9: error: '_name' was not declared in this scope
         _name = std::shared_ptr<char>(new char[strlen(name) + 1], std::default_delete<char[]>());
         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:372:17: error: 'shared_ptr' is not a member of 'std'
         _name = std::shared_ptr<char>(new char[strlen(name) + 1], std::default_delete<char[]>());
                 ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:372:33: error: expected primary-expression before 'char'
         _name = std::shared_ptr<char>(new char[strlen(name) + 1], std::default_delete<char[]>());
                                 ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::write(const uint8_t*, size_t)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:383:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd || !buf) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::read(uint8_t*, size_t)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:395:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd | !buf) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual void littlefs_impl::LittleFSFileImpl::flush()':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:408:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:414:50: error: '_name' was not declared in this scope
               int rc = lfs_setattr(_fs->getFS(), _name.get(), 'c', (const void *)&_creation, sizeof(_creation));
                                                  ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:421:48: error: '_name' was not declared in this scope
             int rc = lfs_setattr(_fs->getFS(), _name.get(), 't', (const void *)&now, sizeof(now));
                                                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:421:17: warning: unused variable 'rc' [-Wunused-variable]
             int rc = lfs_setattr(_fs->getFS(), _name.get(), 't', (const void *)&now, sizeof(now));
                 ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::seek(uint32_t, SeekMode)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:430:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::position() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:451:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual size_t littlefs_impl::LittleFSFileImpl::size() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:464:28: error: '_fd' was not declared in this scope
         return (_opened && _fd)? lfs_file_size(_fs->getFS(), _getFD()) : 0;
                            ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::truncate(uint32_t)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:468:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual void littlefs_impl::LittleFSFileImpl::close()':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:480:24: error: '_fd' was not declared in this scope
         if (_opened && _fd) {
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:487:56: error: '_name' was not declared in this scope
                     int rc = lfs_setattr(_fs->getFS(), _name.get(), 'c', (const void *)&_creation, sizeof(_creation));
                                                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:494:52: error: '_name' was not declared in this scope
                 int rc = lfs_setattr(_fs->getFS(), _name.get(), 't', (const void *)&now, sizeof(now));
                                                    ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual time_t littlefs_impl::LittleFSFileImpl::getLastWrite()':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:504:24: error: '_fd' was not declared in this scope
         if (_opened && _fd) {
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:505:48: error: '_name' was not declared in this scope
             int rc = lfs_getattr(_fs->getFS(), _name.get(), 't', (void *)&ftime, sizeof(ftime));
                                                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual time_t littlefs_impl::LittleFSFileImpl::getCreationTime()':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:516:24: error: '_fd' was not declared in this scope
         if (_opened && _fd) {
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:517:48: error: '_name' was not declared in this scope
             int rc = lfs_getattr(_fs->getFS(), _name.get(), 'c', (void *)&ftime, sizeof(ftime));
                                                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual const char* littlefs_impl::LittleFSFileImpl::name() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:530:29: error: '_name' was not declared in this scope
             const char *p = _name.get();
                             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual const char* littlefs_impl::LittleFSFileImpl::fullName() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:537:26: error: '_name' was not declared in this scope
         return _opened ? _name.get() : nullptr;
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::isFile() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:541:26: error: '_fd' was not declared in this scope
         if (!_opened || !_fd) {
                          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'virtual bool littlefs_impl::LittleFSFileImpl::isDirectory() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:552:21: error: '_fd' was not declared in this scope
         } else if (!_fd) {
                     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'lfs_file_t* littlefs_impl::LittleFSFileImpl::_getFD() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:562:16: error: '_fd' was not declared in this scope
         return _fd.get();
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: At global scope:
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:576:67: error: 'std::shared_ptr' has not been declared
     LittleFSDirImpl(const String& pattern, LittleFSImpl* fs, std::shared_ptr<lfs_dir_t> dir, const char *dirPath = nullptr)
                                                                   ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:576:77: error: expected ',' or '...' before '<' token
     LittleFSDirImpl(const String& pattern, LittleFSImpl* fs, std::shared_ptr<lfs_dir_t> dir, const char *dirPath = nullptr)
                                                                             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:592:5: error: 'FileImplPtr' does not name a type
     FileImplPtr openFile(OpenMode openMode, AccessMode accessMode) override {
     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:681:10: error: 'shared_ptr' in namespace 'std' does not name a template type
     std::shared_ptr<lfs_dir_t>  _dir;
          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:682:10: error: 'shared_ptr' in namespace 'std' does not name a template type
     std::shared_ptr<char>       _dirPath;
          ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In constructor 'littlefs_impl::LittleFSDirImpl::LittleFSDirImpl(const String&, littlefs_impl::LittleFSImpl*, int)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:577:41: error: class 'littlefs_impl::LittleFSDirImpl' does not have any field named '_dir'
         : _pattern(pattern) , _fs(fs) , _dir(dir) , _dirPath(nullptr), _valid(false), _opened(true)
                                         ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:577:46: error: 'dir' was not declared in this scope
         : _pattern(pattern) , _fs(fs) , _dir(dir) , _dirPath(nullptr), _valid(false), _opened(true)
                                              ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:577:53: error: class 'littlefs_impl::LittleFSDirImpl' does not have any field named '_dirPath'
         : _pattern(pattern) , _fs(fs) , _dir(dir) , _dirPath(nullptr), _valid(false), _opened(true)
                                                     ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:580:13: error: 'dirPath' was not declared in this scope
         if (dirPath) {
             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:581:13: error: '_dirPath' was not declared in this scope
             _dirPath = std::shared_ptr<char>(new char[strlen(dirPath) + 1], std::default_delete<char[]>());
             ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:581:24: error: 'shared_ptr' is not a member of 'std'
             _dirPath = std::shared_ptr<char>(new char[strlen(dirPath) + 1], std::default_delete<char[]>());
                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:581:40: error: expected primary-expression before 'char'
             _dirPath = std::shared_ptr<char>(new char[strlen(dirPath) + 1], std::default_delete<char[]>());
                                        ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'lfs_dir_t* littlefs_impl::LittleFSDirImpl::_getDir() const':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:660:16: error: '_dir' was not declared in this scope
         return _dir.get();
                ^
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h: In member function 'uint32_t littlefs_impl::LittleFSDirImpl::_getAttr4(char)':
T:\arduino-1.8.13_p54\portable\sketchbook\libraries\LittleFS-Teensy\src/LittleFS.h:668:20: error: '_dirPath' was not declared in this scope
         nameLen += _dirPath.get() ? strlen(_dirPath.get()) : 0;
                    ^
listfiles: In function 'void setup()':
listfiles:61: error: 'FSImplPtr' was not declared in this scope
   LittleFS = new FS(FSImplPtr(new littlefs_impl::LittleFSImpl(FLASH, FS_PHYS_ADDR, 0, /*FS_PHYS_SIZE,*/ FS_PHYS_PAGE, FS_PHYS_BLOCK, FS_MAX_OPEN_FILES)));
                                                                                                                                                        ^
listfiles:62: error: 'class FS' has no member named 'begin'
   if (!LittleFS->begin()) {
                  ^
'FSImplPtr' was not declared in this scope
Invalid library found in T:\arduino-1.8.13_p54\portable\sketchbook\libraries\XXX_littlefs: no headers files (.h) found in T:\arduino-1.8.13_p54\portable\sketchbook\libraries\XXX_littlefs
 
Just wanted to confirm the stock SPIMemory should work for you.

Are you trying to compile this on a teensy 3? I think that may not work as there is already an FS.h header in the core library.
 
Just wanted to confirm the stock SPIMemory should work for you.

Are you trying to compile this on a teensy 3? I think that may not work as there is already an FS.h header in the core library.

I found no SPIMemory.h file on this system? Did a search ( before reading above post ) and found one on github - then used one above.

This is building for a T_4.1 with TeensyDuino 1.54 Beta 4. In this version I see FS.H in BOTH Teensy3 and Teensy4 CORES folders.

It may be new - but it is coming/changing as Paul is incorporating SdFat-Beta code to replace the use of prior "SD" code that is going away.
 
Last edited:
I need to push an SPIMemory update before this will work.
Are you trying to compile this on a teensy 3? I think that may not work as there is already an FS.h header in the core library and all my tests and define checks are against teensy 4.
 
OK- I think I know what this is.

You either need to rename my FS-Teensy files to something the FS-Test.h and update both littlefs and sdfs to use the new names or just temporarily delete/remove FS.h from the teensy directory- It's not used by anything anyway yet.
 
OK- I think I know what this is.

You either need to rename my FS-Teensy files to something the FS-Test.h and update both littlefs and sdfs to use the new names or just temporarily delete/remove FS.h from the teensy directory- It's not used by anything anyway yet.

Morning all
Just got my coffee so ...

I just downloaded the updated SPIMemory and:
1. it compiles for the T4.0 and T4.1 when using TD1.53
2. getting the same errors as posted when I use TD1.54-beta4
3. temporarily deleted SD and SDFat from the Teensy Libraries folder and recompiled under TD1.54-beta4 but still get the errors as noted by @defragster and myself.

Note: Good point about the FS.h conflict. Need to change that anyway,

Wonder where the issue is coming from.
 
OK- I think I know what this is.

You either need to rename my FS-Teensy files to something the FS-Test.h and update both littlefs and sdfs to use the new names or just temporarily delete/remove FS.h from the teensy directory- It's not used by anything anyway yet.

On the off chance that there was some other strange conflict with FS with the libs I took updated all the files using FS.h to FS_ls.h and now it compiles under TD1.54-beta4!
 
Back
Top