mjs513
Senior Member+
Just finished the initial library for using MTP Responder with SPIFSS on the Teensy 4.1.
The library takes the core MTP implementation from @WMXZ MTP_t4 library and reworks the Storage class on the library to use SPIFFS on the external FLASH chip of the Teensy 4.1.
The library has been posted on a GitHub repository: MTPspiffs_t41. You will need to download the following libraries that MTPspiffs_t41 is dependent on:
There is one buggy thing left to fix. When you copy a file to the Flash from the PC you can not immediately delete. Appears to need a reboot for it to work consistently. So far this is the only thing I have seen that does not work 100% correctly. All other features seem to be working. There is one caveat with SPIFFS - no subdirectories.
In addition to use MTPspiffs above 450MHz it requires a change to the core file usb.c per @WMXZ:
MTPspiffs allows you to do the same as MTP Resopnder:
Have fun testing.
The library takes the core MTP implementation from @WMXZ MTP_t4 library and reworks the Storage class on the library to use SPIFFS on the external FLASH chip of the Teensy 4.1.
The library has been posted on a GitHub repository: MTPspiffs_t41. You will need to download the following libraries that MTPspiffs_t41 is dependent on:
- Requires @WMXZ's USB2 library: https://github.com/WMXZ-EU/USB2 for T4.0. (uses here usb1.h and usb1.c)
- Requires SPIFFS_t4 library: https://github.com/PaulStoffregen/teensy41_extram/tree/SPIFFS-FLASH-ONLY
There is one buggy thing left to fix. When you copy a file to the Flash from the PC you can not immediately delete. Appears to need a reboot for it to work consistently. So far this is the only thing I have seen that does not work 100% correctly. All other features seem to be working. There is one caveat with SPIFFS - no subdirectories.
In addition to use MTPspiffs above 450MHz it requires a change to the core file usb.c per @WMXZ:
modify usb.c:
function: usb_transfer_status
changed #if 0 to #if 1
MTPspiffs allows you to do the same as MTP Resopnder:
- copy files to and from the PC
- delete files
- open files on the Flash from the PC
- etc
Have fun testing.
Last edited: