You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
starting off from a fully erased Flash (64 Mb), one of my very first application tasks is to create a directoty hierarchy.
So i am doing:
if ((status = lfs_mount(&pctx->lfs, &local_cfg)) != LFS_ERR_OK)
{
// Format it first
status = lfs_format(&pctx->lfs, &local_cfg);
status += lfs_mount(&pctx->lfs, &local_cfg);
} Then:
int errno = lfs_mkdir(&pctx->lfs, "files");
if (errno != LFS_ERR_EXIST && errno != LFS_ERR_OK) {
return PLATFORM_ERROR_OPEN;
}
At the very first run of the app, i will invariably get an errno == LFS_ERR_IO, then the code is exiting.
However, after a reset, the lfs_mkdir would always succeed ....
Is there anything elase i should do after format/mount so that my lfs_mkdir would succeed first place ?
Thanks
Jacques
PS: my platform is iMXRT1176 based, the flashs are QSPI interfaced, and the code itself is running out of the same flash (different location, XIP)
The text was updated successfully, but these errors were encountered:
Hello,
starting off from a fully erased Flash (64 Mb), one of my very first application tasks is to create a directoty hierarchy.
So i am doing:
if ((status = lfs_mount(&pctx->lfs, &local_cfg)) != LFS_ERR_OK)
{
// Format it first
status = lfs_format(&pctx->lfs, &local_cfg);
status += lfs_mount(&pctx->lfs, &local_cfg);
}
Then:
int errno = lfs_mkdir(&pctx->lfs, "files");
if (errno != LFS_ERR_EXIST && errno != LFS_ERR_OK) {
return PLATFORM_ERROR_OPEN;
}
At the very first run of the app, i will invariably get an errno == LFS_ERR_IO, then the code is exiting.
However, after a reset, the lfs_mkdir would always succeed ....
Is there anything elase i should do after format/mount so that my lfs_mkdir would succeed first place ?
Thanks
Jacques
PS: my platform is iMXRT1176 based, the flashs are QSPI interfaced, and the code itself is running out of the same flash (different location, XIP)
The text was updated successfully, but these errors were encountered: