mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 20:18:17 +00:00
boards/sim/sim/sim/src/sim_bringup.cTry to mount /dev/rammtd if CONFIG_FS_LITTLEFS is enabled.
This commit is contained in:
parent
a6c0c88ac6
commit
80d4072bf4
1 changed files with 20 additions and 0 deletions
|
|
@ -202,6 +202,26 @@ int sim_bringup(void)
|
|||
ret);
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_FS_LITTLEFS)
|
||||
/* Register the MTD driver so that it can be accessed from the VFS */
|
||||
|
||||
ret = register_mtddriver("/dev/rammtd", mtd, 0755, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to register MTD driver: %d\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
/* Mount the LittleFS file system */
|
||||
|
||||
ret = mount("/dev/rammtd", "/mnt/lfs", "littlefs", 0, "autoformat");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount LittleFS at /mnt/lfs: %d\n",
|
||||
ret);
|
||||
}
|
||||
|
||||
#elif defined(CONFIG_FS_NXFFS)
|
||||
/* Initialize to provide NXFFS on the MTD interface */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue