diff --git a/README.md b/README.md index 2f777d8..e668380 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,13 @@ $ mklittlefs --version ./mklittlefs version: 0.2.3-6-g9a0e072 ``` +## Cross-compiling + +To build for all cross compiled targets, run +``` +docker run --user $(id -u):$(id -g) --rm -v $(pwd):/workdir earlephilhower/gcc-cross bash -c "cd /workdir; bash build-cross.sh" +``` + ## License diff --git a/littlefs b/littlefs index 0907ba7..f35fb8c 160000 --- a/littlefs +++ b/littlefs @@ -1 +1 @@ -Subproject commit 0907ba7813173901bc9a7689e8781434629a3696 +Subproject commit f35fb8c14866a4a4677756f6dbeca78f8a9b4001 diff --git a/main.cpp b/main.cpp index 88e5c1e..64d3074 100644 --- a/main.cpp +++ b/main.cpp @@ -92,12 +92,19 @@ void setLfsConfig() s_cfg.erase = lfs_flash_erase; s_cfg.sync = lfs_flash_sync; - s_cfg.read_size = s_blockSize; - s_cfg.prog_size = s_blockSize; - s_cfg.block_size = s_blockSize; + s_cfg.read_size = 64; + s_cfg.prog_size = 64; + s_cfg.block_size = s_blockSize; s_cfg.block_count = s_flashmem.size() / s_blockSize; - s_cfg.cache_size = s_blockSize; - s_cfg.lookahead_size = 128; + s_cfg.block_cycles = 16; // TODO - need better explanation + s_cfg.cache_size = 64; + s_cfg.lookahead_size = 64; + s_cfg.read_buffer = nullptr; + s_cfg.prog_buffer = nullptr; + s_cfg.lookahead_buffer = nullptr; + s_cfg.name_max = 0; + s_cfg.file_max = 0; + s_cfg.attr_max = 0; } int littlefsTryMount() {