Teensy 4.1 flash memory support (LittleFS)

MichaelMeissner

Senior Member+
I wasn't sure if this should go in the 1.54 beta 5 thread, or one of the other threads. I haven't been closely following a lot of the work that is going on.

I was wondering where we are in terms of being able to use LittleFS memory and more easily move files to/from the memory.

Ideally long term, I imagine what we want to do is have a mode that exports a removable USB filesystem, much like Adafruit does with their boards that support CircuitPython. Are we there yet, or do people see this might happen shortly? Even if it won't be available for a bit, is somebody working on this?

Short term, it may be useful to hack Teensy Transfer to deal with QSPI flash and LittleFS. I glanced at my hacked version of Teensy Transfer that now supports the Teensy 4.x processors, and I suspect it won't be too much work. But I'd rather use a USB removable filesystem if it will be available soon.

Also, I know one of the goals of 1.54 is to add a shim layer to interpose different filesystems, so that we don't have to have n different versions of the audio play from memory, SD card, flash memory, etc. functions. Do we have this in beta 5 or is it still WIP?

Thanks in advance.
 
Inclusion seems to be beta 6 pending - note on PR inclusion 7 hours ago : github.com/PaulStoffregen/cores/pull/532

@MM - does this MTP functionality address your issue? Allows PC over USB transfer of data from a Teensy from various sources.

Well, in theory it should work, but I had trouble getting to work.

I downloaded https://github.com/PaulStoffregen/cores.git and replaced those files in a copy of my current Teensy 4.1.

I used the mtp-test.ino example in KurtE's MTP_t4.git and installed it on my Teensy 4.1 (changing the USB type to MTP-disk).

In running the script, I see a new USB type:
Code:
Bus 003 Device 048: ID 16c0:04d1 Van Ooijen Technische Informatica Teensy MTP Disk

I expected the disk to be auto mounted on my Fedora 33, but it wasn't mounted.

So with a little poking around, I tried:
Code:
$ sudo mount 'mtp://[usb:16c0,04d1]' ~/tmp/disk2

The mount command hung and there were no files in ~/tmp/disk2.

So if there are some hints of how to run it on a Linux system, it would be helpful.
 
@MM - my hint and plan >> Wait for TD 1.54 B6 :)

I tested it early and saw some function - but improvements and edits with events and timing and dueling source trees and edit to base USB function (seremu, serial, usb1 or usb2, ???).

Reading that thread there are too many moving pieces to assemble them by hand given the nature of the problems seen { and my spotty attention } before and after that made the changes needed.

Once Beta 6 is 'tested/released' It will either be working right or better for future improvements from a common code base.

... So I've been ignoring it for other distractions - but will test in Beta 6 - or before if Paul exposes a set of updated CORES (libs?) expected to work before Beta 6 goes live to release.
 
@MM

If you are using Kurt's branch you will probably have to download the latest core as well. Don't know if you have it installed or not but you may need WMXZ USB2 library as well.

Don't use Linux so can't be much help on that end.

EDIT: one not @WMXZ's repository does work so maybe you should start with that before working off of @KurtE's. That's been the baseline. But again probably need updated core files as well. Paul did pull those changes in the core so as Tim said maybe wait for Beta6.
 
No linux here - ( though did just see a WSL Windows update come through on latest 20H2 build ???). KurtE can use linux - not sure if he did - or what WMXZ tests on?

Hopefully Paul gets the needed PR's for inclusion into CORES and beyond (libs?) as needed for a good start for function. It was posted as on his list now that T_4.1 card back and bootloader chip are in production. So suspect he'll test or hopefully pre-post as noted the intended parts to get the best of what KurtE and WMXZ have produced.
 
I think I will wait until beta 6 comes out. Hopefully the necessary patches will be present. It is good to see the things coming together however.
 
@MichaelMeissner - I use Ubuntu 18.04. it has been a while since I played with MTP_T4, but I did have it sort of working with Linux. Linux would auto mount all of the drives and I could copy files back and forth between the Teensy and Linux. But if I tried to delete files on the Teensy with MTP it would not actually delete the files. I was using Paul's breakout board with the memory board. With all of the development happening with file systems, I also am waiting for beta 6. Was thinking about trying to add USB Mass Storage to MTP but that seemed to be redundant as you could simply use a thumb drive to transfer files from the Teensy to a PC or the other way around.
Anyway I do know it will work with Linux. Not sure whose version of MTP_T4 I was using. Have to find it:)
 
So with a little poking around, I tried:
Code:
$ sudo mount 'mtp://[usb:16c0,04d1]' ~/tmp/disk2
@MM, I do not use Linux, but when a colleague of mine used my system (early T3.6 version) on Linux (embedded Ubuntu derivative) and I was looking over his shoulders, the mount command was different, and there was also something about 'fuse'. If Covid allows I will ask him on Monday.
 
@MM, I do not use Linux, but when a colleague of mine used my system (early T3.6 version) on Linux (embedded Ubuntu derivative) and I was looking over his shoulders, the mount command was different, and there was also something about 'fuse'. If Covid allows I will ask him on Monday.

Thanks. I had no idea of what commands to use. FWIW, fuse is the layer to add user file systems, but I didn't see a fuse specific to mtp, and I was just trying the low level mount option. I just tried simple-mtpfs -l but it doesn't see that there are any RAW MTP devices.
 
Back
Top