This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 440d4a688ad7def724cc9cfe542b7122d26ffcc5
Author: Tiago Medicci Serrano <tiago.medi...@espressif.com>
AuthorDate: Tue Mar 25 16:33:19 2025 -0300

    boards/xtensa/esp32s3: Enable SPI Flash's MTD block driver
    
    This commit enables the SPI Flash's MTD block driver. This block
    driver enables testing the SPI Flash device without any associated
    filesystems.
    
    Signed-off-by: Tiago Medicci Serrano <tiago.medi...@espressif.com>
---
 boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c 
b/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c
index 7d0ceecc6d..37c15357c2 100644
--- a/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c
+++ b/boards/xtensa/esp32s3/common/src/esp32s3_board_spiflash.c
@@ -333,6 +333,14 @@ static int init_storage_partition(void)
       return ret;
     }
 
+  ret = ftl_initialize(0, mtd);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize the FTL layer: %d\n",
+              ret);
+      return ret;
+    }
+
 #ifdef CONFIG_MTD_PARTITION
   ret = parse_mtd_partition(mtd, NULL, NULL);
   if (ret < 0)

Reply via email to