xiaotailang commented on issue #10445:
URL: https://github.com/apache/nuttx/issues/10445#issuecomment-1713232107
@xiaoxiang781216 Hello, when I was testing the file system, I tried using
littlefs and it worked fine. However, when I attempted to use smartfs and
referred to some boards, I encountered some issues. Here are the steps I
followed:
CONFIG_FS_SMARTFS=y
CONFIG_SMARTFS_ERASEDSTATE=0xff
CONFIG_SMARTFS_MAXNAMLEN=16
CONFIG_MTD_SMART=y
CONFIG_MTD_SMART_SECTOR_SIZE=512
CONFIG_MTD_SMART_WEAR_LEVEL=y
Next, I added the following code:
smart_initialize(minor, mtd, "spiw25");
if (ret < 0)
{
finfo("smart_initialize failed, Trying to erase first...\n");
ret = mtd->ioctl(mtd, MTDIOC_BULKERASE, 0);
if (ret < 0)
{
ferr("ERROR: ioctl(BULKERASE) failed: %d\n", ret);
return ret;
}
finfo("Erase successful, initializing it again.\n");
smart_initialize(minor, mtd, "spiw25");
if (ret < 0)
{
ferr("ERROR: smart_initialize failed: %d\n", ret);
return ret;
}
}
When I entered "mksmartfs /dev/smart0," there was no error, but there was no
"smart0" file generated in the "/dev/" directory. Consequently, the subsequent
"mount" operation failed. Are there any additional configurations or steps that
I may have overlooked?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]