David Lichterov
David Lichterov
Thank you. I understand correctly that this cache buffer must be allocated per file ? There is no way to allocate it ahead in struct lfs_config ?
LFS_ASSERT was enabled in the original post ( I made sure it triggers on false config ). It doesn't trigger. I am not setting metadata_max .
littlefs is compiled with LFS_NO_MALLOC so malloc shouldn't be used. 0x4e000000 is a reserved address for my MCU ( https://pdfserv.maximintegrated.com/en/an/ug6766.pdf - page 33 )
The wrong buffer address is coming for lfs_dir_traverse() :  Is there any thing I can check that will help debug this problem ?
``` int do_fs_lfs_file_open(do_fs_lfs_file_handler_s *file_handler, do_lfs_file_system_e fs, const char *path, bool append) { int ret, flags; struct lfs_file_config cfg = {.attr_count = 0, .attrs = 0, .buffer = do_fs_lfs_cache_buffer}; // close...
@Xenoamor Thank you ! This fixes my HardFault. To me it is not 100% clear from the usage that this struct has to be allocated statically/globally .