Skip to content

Commit 7f77f2b

Browse files
Merge pull request #2 from earlephilhower/update
Match the LittleFS version and settings in 8266 core
2 parents 47e8167 + d0b88ea commit 7f77f2b

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ $ mklittlefs --version
8686
./mklittlefs version: 0.2.3-6-g9a0e072
8787
```
8888

89+
## Cross-compiling
90+
91+
To build for all cross compiled targets, run
92+
```
93+
docker run --user $(id -u):$(id -g) --rm -v $(pwd):/workdir earlephilhower/gcc-cross bash -c "cd /workdir; bash build-cross.sh"
94+
```
95+
8996

9097
## License
9198

littlefs

main.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,19 @@ void setLfsConfig()
9292
s_cfg.erase = lfs_flash_erase;
9393
s_cfg.sync = lfs_flash_sync;
9494

95-
s_cfg.read_size = s_blockSize;
96-
s_cfg.prog_size = s_blockSize;
97-
s_cfg.block_size = s_blockSize;
95+
s_cfg.read_size = 64;
96+
s_cfg.prog_size = 64;
97+
s_cfg.block_size = s_blockSize;
9898
s_cfg.block_count = s_flashmem.size() / s_blockSize;
99-
s_cfg.cache_size = s_blockSize;
100-
s_cfg.lookahead_size = 128;
99+
s_cfg.block_cycles = 16; // TODO - need better explanation
100+
s_cfg.cache_size = 64;
101+
s_cfg.lookahead_size = 64;
102+
s_cfg.read_buffer = nullptr;
103+
s_cfg.prog_buffer = nullptr;
104+
s_cfg.lookahead_buffer = nullptr;
105+
s_cfg.name_max = 0;
106+
s_cfg.file_max = 0;
107+
s_cfg.attr_max = 0;
101108
}
102109

103110
int littlefsTryMount() {

0 commit comments

Comments
 (0)