oyama / pico-littlefs-usb Goto Github PK
View Code? Open in Web Editor NEWRaspberry Pi Pico littlefs USB Flash Memory Interface
License: BSD 3-Clause "New" or "Revised" License
Raspberry Pi Pico littlefs USB Flash Memory Interface
License: BSD 3-Clause "New" or "Revised" License
Good if it can be used for about the FAT12 limit (4077 files). Currently, there is a restriction of up to 16 entries for both the root directory and subdirectories.
Split Pico dependencies to facilitate porting to other platforms.
Don't overdo it.
Consider seamless feasible ways to achieve this.
First of all, I would like to thank you for this project, which allows to use the capabilities of the standard usb msc interface with flash memory. But, during the process of testing on the MCU, I experienced a number of difficulties that I hope you can help overcome.
To begin with, I made a change so that the project could be compiled by toolchains other than gcc:
\e
with \x1b
in ANSI color macrosThen I caught stack overflow and exception thrown, but did not investigate the reasons that caused them:
unsigned char buffer
in bulk_update_fat
function, so just added one more bytereal_filesystem.cfg
check before calling lfs_unmount
After analyzing the contents of the first sectors received via USB, I noticed that less was allocated for FAT12 than required. Here I corrected the code:
To view and analyze USB packet sequences from the PC to the MCU and back, I used Wireshark and saved the sessions in pcap files. To simulate this actual traffic on PC only, I wrote a program that uses the same mimic_fat and littlefs source code as the MCU. To obtain "perfect synchronization" I temporarily replaced the rand library function with a simple increment and added the memory cleaning in mimic_fat_read.
The program (Win10 executable is included, the same one for Ubuntu can be built from source code) and test results can be found here. Unfortunately, some tests failed. I hope you can help me figure this out.
To be used up to the FAT12 limit.
Currently, it is limited to 170KB because the calculation is hard-coded to mimic the FAT location. This limitation can be addressed by modifying it to mimic the file system according to the file system parameters (BPB_BytsPerSec, BPB_SecPerClus) constants.
The file names that can be used are limited to 8.3 short file names. Long file names are supported.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.