Skip to content

Commit

Permalink
Merge pull request #2 from earlephilhower/update
Browse files Browse the repository at this point in the history
 Match the LittleFS version and settings in 8266 core
  • Loading branch information
earlephilhower authored Jun 25, 2019
2 parents 47e8167 + d0b88ea commit 7f77f2b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion littlefs
17 changes: 12 additions & 5 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 7f77f2b

Please sign in to comment.