-
Notifications
You must be signed in to change notification settings - Fork 932
Open
Labels
Description
DEBUG:
littlefs/lfs.c:497:error: No more free space 441
LINE 116: lfs write data length: 256
Code:
const struct lfs_config g_lfs_cfg = {
// block device operations
.read = user_provided_block_device_read,
.prog = user_provided_block_device_prog,
.erase = user_provided_block_device_erase,
.sync = user_provided_block_device_sync,
// block device configuration
.read_size = 256,
.prog_size = 256,
.block_size = 4096,
.block_count = 256,
.cache_size = 256,
.lookahead_size = 32,
.block_cycles = 500,
};
err = lfs_file_open(&g_lfs, &g_lfs_file[0], lfs_read_buf1, LFS_O_RDWR | LFS_O_CREAT);
if(err)
printf("lfs open error:%d LINE %d\n", err, __LINE__);
err = lfs_file_write(&g_lfs, &g_lfs_file[0], lfs_write_buf, sizeof(lfs_write_buf));
if (err > 0)
printf("LINE %d: lfs write data length:%d\n", __LINE__, err);
lfs_file_close(&g_lfs, &g_lfs_file[0]);
QUESTION:
When the flash space is exhausted, an error should be reported when writing data again, but now the lfs_file_write() function does not report an error. why?