Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LFS Configuration - Invalid Cache Size #1

Open
JeffWelder opened this issue Nov 5, 2019 · 4 comments
Open

LFS Configuration - Invalid Cache Size #1

JeffWelder opened this issue Nov 5, 2019 · 4 comments

Comments

@JeffWelder
Copy link

Hi, I appreciate the writeup on mounting a binary file. The OFSMount utillity works great.

I however am running into an issue with setting up the Explorer.
Invalid_Cache

Here is the configuration of my LFS onto an 8MB flash chip.
.read_size = 256, .prog_size = 256, .block_size = 1024 * 4, .block_count = 2048, .cache_size = 256, .lookahead_size = 512, // must be multiple of 32 .block_cycles = 1000, //Highly suggested to set block_cycles in the range of 100-1000.

I think my configuration is valid, but please let me know if I am missing something.
Thanks,
Jeff

@bluscape
Copy link
Owner

bluscape commented Nov 7, 2019

Hi Jeff, Thanks for the feedback. I will attend to this before the end of 08/11

@bluscape
Copy link
Owner

Sorry. Busy week will attend to this ASP

@Spider84
Copy link

May be you can make project opensource?
tool is great, but you don't work with it.

@shuilinwu
Copy link

shuilinwu commented Dec 3, 2021

the configuration of my LFS onto an 2MB flash chip(W25Q16).
#define W25X_SECTOR_SIZE (4096)
#define W25X_PAGE_SIZE (256)
//W25X16
#define FLASH_CAPACITY (2097152)
//littlefS
#define LFS_CHIP_SECTOR_SIZE (W25X_SECTOR_SIZE)
#define LFS_BLK_NBR_STORAGE (FLASH_CAPACITY/LFS_CHIP_SECTOR_SIZE)
#define FLS_MALLOC_RAM_SIZE (32)
#define LFS_READ_SIZE (FLS_MALLOC_RAM_SIZE)
#define LFS_WRITE_SIZE (FLS_MALLOC_RAM_SIZE)
#define LFS_LOOKAHEAD_SIZE (8*4)
#define LFS_CACHE_SIZE (FLS_MALLOC_RAM_SIZE)

// configuration of the filesystem is provided by this struct
const struct lfs_config cfg = {
// block device driver context data
.context = NULL,
// 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 = LFS_READ_SIZE,					
.prog_size = LFS_WRITE_SIZE,				
.block_size = LFS_CHIP_SECTOR_SIZE,			
.block_count = LFS_BLK_NBR_STORAGE,			
.block_cycles = 1000,						
.cache_size = LFS_CACHE_SIZE,
.lookahead_size = LFS_LOOKAHEAD_SIZE,
#ifdef LFS_NO_MALLOC
    .read_buffer = lfs_read_buf,				
.prog_buffer = lfs_prog_buf,				
.lookahead_buffer = lfs_lookahead_buf,		

#endif
};

截图20211203091749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants