cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating LittleFS in stm32L1XX project

JBamb.1
Associate

Hello,

Because there are negative side effects of using FatFS in my program to write logs to an SD Card, I am trying LittleFS library with an implementation of the HAL library.

When I mount the filesystem &lfs I get a result of -84 which indicates that the fielsystem is corrupt. I made sure I tested and formatted the sd card.

I believe that my implementation of the device block operations is not complete. see attachment.

extern const struct lfs_config 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 = 16,

   .prog_size = 16,

   .block_size = 4096,

   .block_count = 128,

   .cache_size = 16,

   .lookahead_size = 16,

   .block_cycles = 500,

};

Help will be greatly appreciated!

1 REPLY 1

What is LittleFS?

I also don't think this is the right place to discuss it, you may want to try to contact its authors.

JW