boards/esp32: Optionally mount SPI Flash MTD on bring-up

Give the user the option to simply register the SPI Flash MTD as a
device node on /dev.
Currently, this is achievable only when SmartFS (which is the default FS
option) is disabled by force. This behavior is fixed by using the
"optional" Kconfig keyword, which makes the "choice" selectable.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2021-10-22 12:03:16 -03:00 committed by Xiang Xiao
parent e1a0a1188e
commit 925e8f9d54
13 changed files with 18 additions and 14 deletions

View File

@ -19,9 +19,14 @@ config ESP32_QEMU_IMAGE
Create a binary flash image used for QEMU.
choice ESP32_SPIFLASH_FS
prompt "SPIFLASH File System"
prompt "Mount SPI Flash MTD on bring-up"
default ESP32_SPIFLASH_SMARTFS
depends on ESP32_SPIFLASH
optional
---help---
Mount the SPI Flash MTD with the selected File System format on board
bring-up.
If not selected, the MTD will be registered as a device node on /dev.
config ESP32_SPIFLASH_SMARTFS
bool "SmartFS"

View File

@ -25,12 +25,12 @@ CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_AUTO_SLEEP=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -34,10 +34,10 @@ CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_BLE=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -24,11 +24,11 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIRELESS=y
CONFIG_EXAMPLES_MQTTC=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -20,15 +20,14 @@ CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SMARTFS=y
CONFIG_ESP32_UART0=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SMARTFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INTELHEX_BINARY=y
CONFIG_MM_REGIONS=3
CONFIG_MTD_SMART=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_LOSMART=y

View File

@ -31,6 +31,7 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIFI_STATION_SOFTAP_COEXISTENCE=y
@ -38,7 +39,6 @@ CONFIG_ESP32_WIRELESS=y
CONFIG_EXAMPLES_DHCPD=y
CONFIG_EXPERIMENTAL=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -41,11 +41,11 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INTELHEX_BINARY=y
CONFIG_MM_REGIONS=3

View File

@ -31,13 +31,13 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_WEBSERVER=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=2048

View File

@ -25,11 +25,11 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -24,12 +24,12 @@ CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_AUTO_SLEEP=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -23,11 +23,11 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -25,12 +25,12 @@ CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_AUTO_SLEEP=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View File

@ -24,11 +24,11 @@ CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_MTD_SIZE=0x80000
CONFIG_ESP32_SPIFLASH=y
CONFIG_ESP32_SPIFLASH_SPIFFS=y
CONFIG_ESP32_UART0=y
CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIRELESS=y
CONFIG_FS_PROCFS=y
CONFIG_FS_SPIFFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072