Skip to content

Commit cdd58e7

Browse files
fs/littlefs: Bump to v2.11.2 and update glue layer
This bumps littlefs repository to the latest v2.11.2 and improves and cleans up glue layer. New featues: - add automatic detection of block size and block count from flash area - add option to disable thread-safety - add option to disable inlined files - add option to enable littlefs traces
1 parent 846ed30 commit cdd58e7

File tree

4 files changed

+264
-203
lines changed

4 files changed

+264
-203
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
#ifndef _LITTLEFS_LITTLEFS_H
21+
#define _LITTLEFS_LITTLEFS_H
22+
23+
/**
24+
* Formats littlefs filesystem
25+
*
26+
* @return FS_EOK on success
27+
* FS_* on error (translated from lfs error)
28+
*/
29+
int littlefs_format(void);
30+
31+
/**
32+
* Mounts littlefs filesystem
33+
*
34+
* This shall be called from application if auto-mount is disabled before
35+
* file system can be accessed.
36+
*
37+
* @return FS_EOK on success
38+
* FS_* on error (translated from lfs error)
39+
*/
40+
int littlefs_mount(void);
41+
42+
#endif /* _LITTLEFS_LITTLEFS_H */
43+

fs/littlefs/pkg.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

2020
pkg.name: fs/littlefs
21-
pkg.description: LittleFS file system.
21+
pkg.description: littlefs file system glue
2222
pkg.author: "Apache Mynewt <[email protected]>"
2323
pkg.homepage: "http://mynewt.apache.org/"
2424
pkg.keywords:
@@ -30,7 +30,7 @@ pkg.type: sdk
3030

3131
repository.littlefs:
3232
type: github
33-
vers: v2.5.0-commit
33+
vers: v2.11.2-commit
3434
branch: master
3535
user: littlefs-project
3636
repo: littlefs
@@ -44,15 +44,21 @@ pkg.deps:
4444
pkg.source_dirs:
4545
- "@littlefs/."
4646
- "src"
47-
4847
pkg.include_dirs:
4948
- "@littlefs/."
50-
51-
pkg.cflags.LITTLEFS_MIGRATE_V1:
52-
- -DLFS_MIGRATE
49+
pkg.ignore_dirs:
50+
- "bd"
51+
- "benches"
52+
- "runners"
53+
- "scripts"
54+
- "tests"
5355

5456
pkg.cflags.LITTLEFS_READONLY:
5557
- -DLFS_READONLY
58+
pkg.cflags.LITTLEFS_THREAD_SAFE:
59+
- -DLFS_THREADSAFE
60+
pkg.cflags.LITTLEFS_ENABLE_TRACE:
61+
- -DLFS_YES_TRACE
5662

5763
pkg.init:
58-
littlefs_pkg_init: 'MYNEWT_VAL(LITTLEFS_SYSINIT_STAGE)'
64+
littlefs_sysinit: 'MYNEWT_VAL(LITTLEFS_SYSINIT_STAGE)'

0 commit comments

Comments
 (0)