GithubHelp home page GithubHelp logo

oyama / pico-littlefs-usb Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 1.0 130 KB

Raspberry Pi Pico littlefs USB Flash Memory Interface

License: BSD 3-Clause "New" or "Revised" License

CMake 1.84% C 98.16%
embedded microcontroller raspberry-pi-pico

pico-littlefs-usb's People

Contributors

oyama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pico-littlefs-usb's Issues

Maximum number of files

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.

Some tests on real MCU failed

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:

Then I caught stack overflow and exception thrown, but did not investigate the reasons that caused them:

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.

Maximum file size

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.

Long file name support

The file names that can be used are limited to 8.3 short file names. Long file names are supported.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.