I have LWext4 working on the GIGA. The only issue is that you never know which instance of USBHostMSD (there are two one for FAT32 type and another for ext4 type) is going to claim which drive at any one time. With the ext4 driver I can scan the MBR and get each partition type and then set a private variable in my EXT4Filesystem.
How can you scan the MBR of a FAT32 formatted USB drive or access it from the FATFilesystem or even from FatFS?
I can work around it but it's going to be more invasive than I like...
When I first read this thread, I was going to mention that @Merlin513 was experimenting with something similar, but then by the time I found it, I saw your EDIT...
I finally wound up using the ext4_mbr_scan() function of LWext4. I just had to comment out:
// Commented out for use with Mbed-os for GIGA R1
// if (pe->type != 0x83)
// continue; /*Unsupported entry. 0x83 - linux native*/
That allowed me to detect which USBHostMSD instance claimed which USB stick by checking the partition type. USBHost seems to start trying to claim devices on a hub starting at port #0 so the position of the USB sticks was affecting my results. Right now you won't be able to use mixed FAT32/EXT4 partitions on a single USB stick but that is possible later on. I tried accessing f_getlabel() in FatFS but it is not seen so I am assuming that it has not been enabled in the json. I really don't want have to modify the core os.
I am getting closer to finishing the EXT4Filesystem. When it is in a reasonable state I'll start a new GitHub and post.