# mkspiffs
Tool to build and unpack [SPIFFS](https://github.com/pellepl/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](http://img.shields.io/travis/igrr/mkspiffs.svg)](https://travis-ci.org/igrr/mkspiffs)
You need gcc (≥4.8) or clang(≥600.0.57), and make. On Windows, use MinGW.
Run:
```bash
$ 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:
```bash
$ 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
没有合适的资源?快使用搜索试试~ 我知道了~
构建和解压 SPIFFS图像的工具_c++_代码_下载
共36个文件
h:26个
sh:2个
cpp:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 149 浏览量
2022-06-13
14:20:28
上传
评论
收藏 67KB ZIP 举报
温馨提示
构建和解压SPIFFS图像的工具 PIFFS 配置 在 mkspiffs 构建时设置的一些 SPIFFS 选项会影响生成的文件系统映像的格式。在构建 mkspiffs 和构建使用 SPIFFS 的应用程序时,确保这些选项设置为相同的值。 这些选项包括: SPIFFS_OBJ_NAME_LEN SPIFFS_OBJ_META_LEN SPIFFS_USE_MAGIC SPIFFS_USE_MAGIC_LENGTH SPIFFS_ALIGNED_OBJECT_INDEX_TABLES 可能是其他人 要查看这些选项的默认值,请检查include/spiffs_config.h此存储库中的文件。 要在构建时覆盖某些选项,请将 extra 传递CPPFLAGS给make. 您还可以设置BUILD_CONFIG_NAME变量来区分构建的二进制文件:
资源推荐
资源详情
资源评论
收起资源包目录
mkspiffsaster.zip (36个子文件)
mkspiffster
.travis.yml 3KB
.gitmodules 81B
build_all_configs.sh 559B
format.sh 196B
include
spiffs_config.h 13KB
sdkconfig.h 46B
tclap
StandardTraits.h 4KB
Visitor.h 1KB
DocBookOutput.h 8KB
HelpVisitor.h 2KB
ArgException.h 5KB
XorHandler.h 4KB
CmdLineOutput.h 2KB
ValueArg.h 14KB
MultiArg.h 12KB
CmdLineInterface.h 4KB
Arg.h 17KB
SwitchArg.h 7KB
UnlabeledMultiArg.h 9KB
Constraint.h 2KB
ArgTraits.h 3KB
VersionVisitor.h 2KB
OptionalUnlabeledTracker.h 2KB
ValuesConstraint.h 3KB
ZshCompletionOutput.h 8KB
StdOutput.h 8KB
MultiSwitchArg.h 5KB
COPYING 1KB
CmdLine.h 14KB
UnlabeledValueArg.h 11KB
IgnoreRestVisitor.h 1KB
main.cpp 20KB
.gitignore 105B
spiffs
Makefile 4KB
README.md 3KB
LICENSE.txt 1KB
共 36 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功