Skip to content

Commit 8c607f7

Browse files
committed
mimxrt: Spend a few words about littlfs file system and MSC access.
Since the board may have been formatted with littlfs, the FS device different when attached to a PC.
1 parent 3c6ba0b commit 8c607f7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/mimxrt/quickref.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,29 @@ system's block device. ::
576576

577577
If the drive is in readonly state, bdev.ioctl(7, 0) returns `True`.
578578

579+
The filesystem of the board has to be of FAT type for mounting and using with standard PC
580+
tools. But FAT is not enforced at the board. If the board's filesystem is littlefs, the
581+
filesystem will still be attached to the PC and will be accesible as a drive
582+
(e.g. /dev/sdc usign Linux), but by default there is no file access. In that case,
583+
the files are locally still writable. Changing the board's filesystem to FAT can be done
584+
then by formatting it from the PC. Alternatively, you can erase the root sector.
585+
Then, the FAT filesystem will be created at the next power-up. For erasing the root sector, write::
586+
587+
from mimxrt import Flash
588+
Flash().ioctl(6, 0)
589+
590+
Using littlefs-fuse for Linux you can mount the board's littlefs file system to the PC.
591+
See: https://github.com/littlefs-project/littlefs-fuse
592+
The block_size if 4096, the block_count depends on the size of the filesystem. e.g.::
593+
594+
# mounting the lfs2 filesystem of a Teensy 4.1 board at the PC
595+
mkdir mount
596+
sudo ./lfs --block_size=4096 --block_count=1791 -o allow_other -o nonempty /dev/sdc mount
597+
cd mount
598+
ls -l
599+
600+
In that case, the exclusive write access is NOT enforced. So be careful to only write
601+
to the filesystem by the PC.
579602

580603
Transferring files
581604
------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy