1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

Deprecate SPIFFS, move examples to LittleFS (#7263)

* Deprecate SPIFFS, move examples to LittleFS

SPIFFS has been a great filesystem, but it has significant problems in
many cases (and it's also pretty slow).  Development seems to have
slowed/stopped on the upstream version, and we're not able to provide
support or fix the known issues with it as-is.

Deprecate SPIFFS variable.

Update all examples to use LittleFS instead of SPIFFS.

Also, minor cleanup on very old examples which has obsolete delays
waiting for the Serial port to come up, or which were stuck at 9600 baud
because of their ancient AVR heritage.

Fixes #7095

* Remove leftover debug code

* Clean up comments in some examples

* Update documentation on SPIFFS deprecation

* Fix host tests to avoid deprecation warnings

* Fix cut-n-paste error

* Restore SpeedTest.ino, adjust to allow custom FSes

Co-authored-by: Develo <deveyes@gmail.com>
This commit is contained in:
Earle F. Philhower, III
2020-05-04 11:22:50 -07:00
committed by GitHub
parent 9845deb283
commit 83166f948b
40 changed files with 176 additions and 164 deletions

View File

@ -29,7 +29,7 @@
# resetmethod_menu_extra menus for additional reset methods
# crystalfreq/flashfreq_menu: menus for crystal/flash frequency selection
# flashmode_menu: menus for flashmode selection (dio/dout/qio/qout)
# 512K/1M/2M/4M/8M/16M: menus for flash & SPIFFS size
# 512K/1M/2M/4M/8M/16M: menus for flash & FS size
# lwip/lwip2 menus for available lwip versions
from __future__ import print_function
@ -613,7 +613,7 @@ boards = collections.OrderedDict([
'~~~~~~~~~~~~~~~~~~~~~~~~~~',
'',
'- Card: "WEMOS D1 Mini Lite"',
'- Flash Size: "1M (512K SPIFFS)"',
'- Flash Size: "1M (512K FS)"',
'- CPU Frequency: "80 Mhz"',
# '- Upload Speed: "230400"',
'',
@ -696,7 +696,7 @@ boards = collections.OrderedDict([
'opts': collections.OrderedDict([
( '.build.board', 'WIFINFO' ),
( '.build.variant', 'wifinfo' ),
( '.menu.ESPModule.ESP07192', 'ESP07 (1M/192K SPIFFS)' ),
( '.menu.ESPModule.ESP07192', 'ESP07 (1M/192K FS)' ),
( '.menu.ESPModule.ESP07192.build.board', 'ESP8266_ESP07' ),
( '.menu.ESPModule.ESP07192.build.flash_size', '1M' ),
( '.menu.ESPModule.ESP07192.build.flash_ld', 'eagle.flash.1m192.ld' ),
@ -704,7 +704,7 @@ boards = collections.OrderedDict([
( '.menu.ESPModule.ESP07192.build.spiffs_end', '0xFB000' ),
( '.menu.ESPModule.ESP07192.build.spiffs_blocksize', '4096' ),
( '.menu.ESPModule.ESP07192.upload.maximum_size', '827376' ),
( '.menu.ESPModule.ESP12', 'ESP12 (4M/1M SPIFFS)' ),
( '.menu.ESPModule.ESP12', 'ESP12 (4M/1M FS)' ),
( '.menu.ESPModule.ESP12.build.board', 'ESP8266_ESP12' ),
( '.menu.ESPModule.ESP12.build.flash_size', '4M' ),
( '.menu.ESPModule.ESP12.build.flash_ld', 'eagle.flash.4m1m.ld' ),
@ -1316,7 +1316,7 @@ def flash_map (flashsize_kb, fs_kb = 0):
else:
fs_blocksize = 8192
# Adjust SPIFFS_end to be a multiple of the block size
# Adjust FS_end to be a multiple of the block size
fs_end = fs_blocksize * (int)((fs_end - fs_start)/fs_blocksize) + fs_start;
max_ota_size = min(max_upload_size, fs_start / 2) # =(max_upload_size+empty_size)/2