Skip to main content

Python package to create littleFS filesystem image binaries

Project description

littlefs-tools

Build Result PIP Version

Tools create, view and extract littleFS filesystem images.

Though distributed as a python module, these tools are intended to be executed as a command-line tool. Consequently, the code is written into a single python file without classes. The Invocation commands are provided below.

Attribution: littlefs_tools are built on top of littlefs-python. To use littlefs functionality within your python code, please use littlefs-python directly.

Installation

pip install littlefs_tools

Usage

littlefs_create

Tool to create a littleFS filesystem binary image. This tool recursively packages the contents of a source directory into a littlefs image.

usage: littlefs_create [-h] [-b BLOCKSIZE] [-c BLOCKCOUNT] [-i IMAGE] [-v] -s SOURCE

Tool to generate lfs images from a source folder

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCKSIZE, --block_size BLOCKSIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCKCOUNT, --block_count BLOCKCOUNT
                        block Count of the LFS image (defaults to 64)
  -i IMAGE, --image IMAGE
                        image file name
  -o OFFSET, --offset OFFSET
                        offset (in bytes) from which the littlefs image starts(defaults to 0). Hex values are supported (e.g. 0x80000)
  -v, --verbose         Verbose

required arguments:
  -s SOURCE, --source SOURCE
                        source path

littlefs_list

Tool to list contents of a littleFS filesystem image as a tree.

usage: littlefs_list [-h] [-b BLOCKSIZE] [-c BLOCKCOUNT] [-o OFFSET] [-v] -i IMAGE

Tool to list files in a littlefs file image

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCKSIZE, --block_size BLOCKSIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCKCOUNT, --block_count BLOCKCOUNT
                        block Count of the LFS image (defaults to 64)
  -o OFFSET, --offset OFFSET
                        offset (in bytes) from which the littlefs image starts(defaults to 0). Hex values are supported (e.g. 0x80000)
  -v, --verbose         Verbose

required arguments:
  -i IMAGE, --image IMAGE
                        image file name

littlefs_extract

Tool to extract contents of a littleFS filesystem image to a destination folder.

usage: littlefs_extract [-h] [-b BLOCKSIZE] [-c BLOCKCOUNT] [-f] [-o OFFSET] [-v] -i IMAGE -d DESTINATION

Tool to extract files from a littlefs file image

optional arguments:
  -h, --help            show this help message and exit
  -b BLOCKSIZE, --block_size BLOCKSIZE
                        block size of the LFS image (defaults to 4096)
  -c BLOCKCOUNT, --block_count BLOCKCOUNT
                        block Count of the LFS image (defaults to 64)
  -f, --force           Force extract even if destination folder is not empty
  -o OFFSET, --offset OFFSET
                        offset (in bytes) from which the littlefs image starts(defaults to 0). Hex values are supported (e.g. 0x80000)
  -v, --verbose         Verbose

required arguments:
  -i IMAGE, --image IMAGE
                        image file name
  -d DESTINATION, --destination DESTINATION
                        destination directory to extract the contents into

Building the package locally

Make sure that you have setuptools and wheel installed:

The tools package can be built locally using the following command:

python setup.py bdist_wheel --universal

And then installed with

pip install dist/littlefs_tools-1.0.0-py2.py3-none-any.whl  --force

Note: The wheel package must match the version of the package. The version of the package is determined by the version of the package in the setup.py file.

Source distribution is created with the following command:

python setup.py sdist

littlefs-tools | ലിറ്റിലെഫ്എസ്-ഉപകരണങ്ങൾ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

littlefs_tools-1.1.5.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

littlefs_tools-1.1.5-py2.py3-none-any.whl (6.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file littlefs_tools-1.1.5.tar.gz.

File metadata

  • Download URL: littlefs_tools-1.1.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for littlefs_tools-1.1.5.tar.gz
Algorithm Hash digest
SHA256 134321775392036b8dfddc325c504dd60f9377a00be1d04cb4cc45b640d23d80
MD5 2a54b1b643e70aa69e6e7146f79c422f
BLAKE2b-256 0c6c6eebb2d8e40a04f2fb361973976100dcdecb60714afeaa56f52fe648fb65

See more details on using hashes here.

File details

Details for the file littlefs_tools-1.1.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for littlefs_tools-1.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1d3faaa672a90c6e8313a80ba6ae6c7894aae68a1475180287c9eca73f4c690b
MD5 8701a397a24c37b21ac27eadc94a099c
BLAKE2b-256 0aedb6fc4156b8526502458fe7bcd97567cab3a5c60d45c49946acd5c331101b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page