• Stars
    star
    193
  • Rank 201,081 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool to build and unpack SPIFFS images

mkspiffs

Tool to build and unpack SPIFFS images.

Usage


   mkspiffs  {-c <pack_dir>|-u <dest_dir>|-l|-i} [-d <0-5>] [-b <number>]
             [-p <number>] [-s <number>] [--] [--version] [-h]
             <image_file>


Where: 

   -c <pack_dir>,  --create <pack_dir>
     (OR required)  create spiffs image from a directory
         -- OR --
   -u <dest_dir>,  --unpack <dest_dir>
     (OR required)  unpack spiffs image to a directory
         -- OR --
   -l,  --list
     (OR required)  list files in spiffs image
         -- OR --
   -i,  --visualize
     (OR required)  visualize spiffs image


   -d <0-5>,  --debug <0-5>
     Debug level. 0 means no debug output.

   -b <number>,  --block <number>
     fs block size, in bytes

   -p <number>,  --page <number>
     fs page size, in bytes

   -s <number>,  --size <number>
     fs image size, in bytes

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

   <image_file>
     (required)  spiffs image file


Build

Build status

You need gcc (β‰₯4.8) or clang(β‰₯600.0.57), and make. On Windows, use MinGW.

Run:

$ git submodule update --init
$ make dist

SPIFFS configuration

Some SPIFFS options which are set at mkspiffs build time affect the format of the generated filesystem image. Make sure such options are set to the same values when builing mkspiffs and when building the application which uses SPIFFS.

These options include:

  • SPIFFS_OBJ_NAME_LEN
  • SPIFFS_OBJ_META_LEN
  • SPIFFS_USE_MAGIC
  • SPIFFS_USE_MAGIC_LENGTH
  • SPIFFS_ALIGNED_OBJECT_INDEX_TABLES
  • possibly others

To see the default values of these options, check include/spiffs_config.h file in this repository.

To override some options at build time, pass extra CPPFLAGS to make. You can also set BUILD_CONFIG_NAME variable to distinguish the built binary:

$ make clean
$ make dist CPPFLAGS="-DSPIFFS_OBJ_META_LEN=4" BUILD_CONFIG_NAME=-custom

To check which options were set when building mkspiffs, use --version command:

$ mkspiffs --version
mkspiffs ver. 0.2.2
Build configuration name: custom
SPIFFS ver. 0.3.7-5-gf5e26c4
Extra build flags: -DSPIFFS_OBJ_META_LEN=4
SPIFFS configuration:
  SPIFFS_OBJ_NAME_LEN: 32
  SPIFFS_OBJ_META_LEN: 4
  SPIFFS_USE_MAGIC: 1
  SPIFFS_USE_MAGIC_LENGTH: 1
  SPIFFS_ALIGNED_OBJECT_INDEX_TABLES: 0

License

MIT

To do

  • Add more debug output and print SPIFFS debug output
  • Error handling
  • Code cleanup

More Repositories

1

esp32-cam-demo

Demo for working with a camera on ESP32
C
623
star
2

esptool-ck

ESP8266 build/flash helper tool by Christian Klippel
C
364
star
3

axtls-8266

axTLS port for ESP8266
C
79
star
4

atproto

AT protocol library
C++
63
star
5

esp32-http-server

Toy HTTP server on top of LwIP netconn API, packaged as an ESP-IDF component
C
42
star
6

libnmea-esp32

ESP-IDF component for libnmea, NMEA parser
C
40
star
7

esp32s2-wasm-demo

C
17
star
8

astyle_py

Python wrapper and pre-commit hook for Astyle formatter (http://astyle.sourceforge.net/)
Python
14
star
9

nvs-dotenv

Access variables defined in a .env file from your ESP-IDF application
C
10
star
10

esp-idf-codespaces-template

C
10
star
11

arduino-esp8266-docker

Docker image for arduino-esp8266 CI buids
10
star
12

edc23

Slides for the talk "Developing, Publishing, and Maintaining Components for ESP-IDF" presented at Espressif DevCon23
Vue
7
star
13

rfc2217-server

RFC2217 (remote serial port) server library for ESP-IDF
C
6
star
14

t-wristband-experiments

C
6
star
15

aqi-sensor-demo

Objective-C
6
star
16

psimulator

Emulator for Psion Series 5, based on ARMulator
C
5
star
17

esb24

Slides for the ESP-IDF introductory talk at Espressif Summit Brazil 2024
Vue
4
star
18

pa1010d

PA1010D GPS I2C driver component for ESP-IDF
C
4
star
19

argparse_to_md

Pre-commit hook to document argparse-based Python programs
Python
3
star
20

edc24

Slides for the talk "Mastering ESP-IDF Build System" at Espressif DevCon '24
Vue
3
star
21

notred

definitely not node-red
Rust
3
star
22

snowflake

New Year Souvenir
C
3
star
23

thingpulse-icon64-esp-idf-example

Example ESP-IDF project for ThingPulse Icon64
C
3
star
24

arduino-nano-esp32

Arduino Nano ESP32 Board Support Package for ESP-IDF
C
3
star
25

lilygo-eink-dashboard

Home dashboard based on LilyGo e-ink board
C
2
star
26

arduino-library-tools

Python
2
star
27

idf-cmake-timestamp-demo

related to https://github.com/espressif/esp-idf/issues/5527
CMake
1
star
28

mcp2120-sir-dongle

mcp2120-compatible IrDA dongle based on IceStick
Python
1
star
29

msvc-cmake-xtensa

CMake
1
star
30

arduino-esp8266-ci-runner

Python
1
star
31

esp8266-arduino-docs

jekyll documentation template for the stuff on arduino.esp8266.com
CSS
1
star