SPIFFS: Fix PR review comments.

* Enable SPIFFS_USE_MAGIC
 * Enable SPIFFS_USE_MAGIC_LENGTH
 * Enable SPIFFS_FILEHDL_OFFSET
 * Rebuild mkspiffs if spiffs_config.h is changed
 * Emulate NOR flash in mkspiffs
 * Build spiffs image in 'flash' and 'test' targets
This commit is contained in:
sheinz 2016-07-22 14:09:50 +03:00
parent 0ec47b5de9
commit d69b8390d4
6 changed files with 44 additions and 39 deletions

View file

@ -40,6 +40,9 @@ $$(SPIFFS_IMAGE): $$(MKSPIFFS) $$(SPIFFS_FILE_LIST)
$$(spiffs_ROOT)spiffs_config.h: Makefile
$$(Q) touch $$@
$$(MKSPIFFS)_MAKE:
$$(MAKE) -C $$(MKSPIFFS_DIR) SPIFFS_SIZE=$(SPIFFS_SIZE)
# if SPIFFS_SIZE in Makefile is changed rebuild mkspiffs
$$(MKSPIFFS): Makefile
$$(MAKE) -C $$(MKSPIFFS_DIR) clean
@ -51,6 +54,11 @@ clean_spiffs_img:
clean_mkspiffs:
$$(Q) $$(MAKE) -C $$(MKSPIFFS_DIR) clean
# run make for mkspiffs always
all: $$(MKSPIFFS)_MAKE
.PHONY: $$(MKSPIFFS)_MAKE
SPIFFS_ESPTOOL_ARGS = $(SPIFFS_BASE_ADDR) $$(SPIFFS_IMAGE)
endef