KurtE
Senior Member+
As has been mentioned in several threads, a few of us have been experimenting with for awhile now.
This is sort of a continuation of the thread: https://forum.pjrc.com/threads/6633...-LittleFS-UsbMSCFat-to-work-with-each-other-8
Note these first few posts here are just first cut, that we will hopefully refine as we go.
Put simply: there are a lot of interesting bits and pieces of functionality associated with File Systems and the like, that we (or at least I) think would be great if they all worked together and at least basic versions of them were integrated into Teensyduino. How much actually makes it there and when... TBD...
Some pieces of this have already been done over the last few releases. Like having a new basic FS/File base class, which we now have an SD and LittleFS updated to use it and in the builds. Likewise portions of MTP and MSC are using this as well, although not yet fully integrated into the builds.
Some of the features I personally think that would be great to enhance and integrate into the system include things like:
a) Support Dates and Times on File systems - SDFat that ships with Teensyduino already supports it.
b) MTP integration
c) MSC Integration
d) some form of File system notifications. Like if running MTP on PC and user deletes a file there... Sketch may want to know about it. Dito if sketch changes files, MTP may want to know about it...
e) Try to make it easy for sketches to use: Hopefully as simple as include a couple of library headers: define a couple of objects, have your setup: call a couple of init/setup/begin methods, and then have your loop call: mtpd.loop(); And of course setup your USB type to include MTP... And likewise for MSC.
Updated 10/28/21 links from @wwatson p#366
9/30/21 : p#135 - status update >> Teensyduino-File-System-Integration-including-MTP-and-MSC
Current state of things. @mjs513 and myself have a set of updated libraries, that we have been making changes in. Most(all) of them we are doing the work in branches called FS_Integration:
cores: with https://github.com/KurtE/cores/tree/FS_Integration
MTP: https://github.com/KurtE/MTP_t4/tree/FS_Integration
MSC: https://github.com/KurtE/UsbMscFat/tree/FS_Integration
LittleFS: https://github.com/Mjs513/LittleFS/tree/FS_Integration
SD: https://github.com/KurtE/SD/tree/FS_Integration
These are are all setup to with support for File object to support dates/times - API's/methods have not been approved so subject to change. But current stuff does show dates and time.
Update(9/21/2021) LittleFS has been updated to support creation and modification dates.
Example output from my Locked T4 on PC

Again this posting will hopefully be updated by all involved, either directly or indirectly
Kurt
EDIT: warning the MTP_Teensy code currently requires the new Teensybuino beta 1.57
Will soon update this page again with more details
This is sort of a continuation of the thread: https://forum.pjrc.com/threads/6633...-LittleFS-UsbMSCFat-to-work-with-each-other-8
Note these first few posts here are just first cut, that we will hopefully refine as we go.
Put simply: there are a lot of interesting bits and pieces of functionality associated with File Systems and the like, that we (or at least I) think would be great if they all worked together and at least basic versions of them were integrated into Teensyduino. How much actually makes it there and when... TBD...
Some pieces of this have already been done over the last few releases. Like having a new basic FS/File base class, which we now have an SD and LittleFS updated to use it and in the builds. Likewise portions of MTP and MSC are using this as well, although not yet fully integrated into the builds.
Some of the features I personally think that would be great to enhance and integrate into the system include things like:
a) Support Dates and Times on File systems - SDFat that ships with Teensyduino already supports it.
b) MTP integration
c) MSC Integration
d) some form of File system notifications. Like if running MTP on PC and user deletes a file there... Sketch may want to know about it. Dito if sketch changes files, MTP may want to know about it...
e) Try to make it easy for sketches to use: Hopefully as simple as include a couple of library headers: define a couple of objects, have your setup: call a couple of init/setup/begin methods, and then have your loop call: mtpd.loop(); And of course setup your USB type to include MTP... And likewise for MSC.
Updated 10/28/21 links from @wwatson p#366
Code:
[B][URL="https://github.com/KurtE/MTP_Teensy"]github.com/KurtE/MTP_Teensy[/URL]
[URL="https://github.com/KurtE/USBHost_t36/tree/FS_Integration_MSC"]github.com/KurtE/USBHost_t36/tree/FS_Integration_MSC[/URL]
[URL="https://github.com/KurtE/SdFat/tree/GPT_disks"]github.com/KurtE/SdFat/tree/GPT_disks[/URL]
[URL="https://github.com/KurtE/SD"]github.com/KurtE/SD[/URL]
[/B]
Then as of today I followed this link:
[URL="https://forum.pjrc.com/threads/68560-LittleFS-SPI-and-QSPI-wrappers"]forum.pjrc.com/threads/68560-LittleFS-SPI-and-QSPI-wrappers[/URL] post #3 which pointed me to this sketch:
[URL="https://github.com/KurtE/MTP_Teensy/blob/main/examples/SD_SPI_QSPI_MTP-logger/SD_SPI_QSPI_MTP-logger.ino"]github.com/KurtE/MTP_Teensy/blob/main/examples/SD_SPI_QSPI_MTP-logger/SD_SPI_QSPI_MTP-logger.ino[/URL]
KurtE has moved all needed files from UsbMscFat to USBHost_t36-FS_integration_MSC and updated them so you will not need to use UsbMscFat any more. It's more self contained now for MSC and maybe other options. The SdFat-GPT_disks library is updated to work with GTP and extended partitions which I have not worked with yet.
9/30/21 : p#135 - status update >> Teensyduino-File-System-Integration-including-MTP-and-MSC
Current state of things. @mjs513 and myself have a set of updated libraries, that we have been making changes in. Most(all) of them we are doing the work in branches called FS_Integration:
cores: with https://github.com/KurtE/cores/tree/FS_Integration
MTP: https://github.com/KurtE/MTP_t4/tree/FS_Integration
MSC: https://github.com/KurtE/UsbMscFat/tree/FS_Integration
LittleFS: https://github.com/Mjs513/LittleFS/tree/FS_Integration
SD: https://github.com/KurtE/SD/tree/FS_Integration
Update(9/21/2021) LittleFS has been updated to support creation and modification dates.
Example output from my Locked T4 on PC

Again this posting will hopefully be updated by all involved, either directly or indirectly
Kurt
EDIT: warning the MTP_Teensy code currently requires the new Teensybuino beta 1.57
Will soon update this page again with more details
Last edited: