/littlefs-2.7.6/scripts/ |
D | explode_asserts.py | 188 'op': ['strcmp', 'memcmp', '->'], 205 p = '|'.join('(?P<%s>%s)' % (n, '|'.join(l)) 207 p = re.compile(p, re.DOTALL) 211 m = p.search(data) 250 def passert(p): argument 251 def pastr(p): argument 252 p.expect('assert') ; p.accept('ws') ; p.expect('(') ; p.accept('ws') 253 p.expect('strcmp') ; p.accept('ws') ; p.expect('(') ; p.accept('ws') 254 lh = pexpr(p) ; p.accept('ws') 255 p.expect(',') ; p.accept('ws') [all …]
|
D | readtree.py | 35 blocks[id(data[-1])] = block 38 mdir.blocks = tuple(blocks[id(p.data)] for p in mdir.pair) 107 print("%-47s%s" % ("littlefs v%s.%s" % version, 130 ' -> {%#x, %#x}' % struct.unpack('<II', mdir.tail.data) 144 ' ' if j == len(dir)-1 else 145 'v' if k == len(lines)-1 else 177 parser.add_argument('-l', '--log', action='store_true', 179 parser.add_argument('-a', '--all', action='store_true', 181 parser.add_argument('-T', '--no-truncate', action='store_true',
|
D | test.py | 27 ./scripts/explode_asserts.py $$< -o $$@ 31 -include tests/*.d 35 $(CC) $(CFLAGS) $^ $(LFLAGS) -o $@ 50 'LFS_BLOCK_CYCLES': -1, 217 print('truncate --size=0', disk) 223 # simulate power-loss after n cycles? 231 ncmd.extend(['-ex', 'r']) 233 ncmd.extend(['-ex', 'up 2']) 236 '-ex', 'b %s:%d' % (self.suite.path, self.code_lineno), 237 '-ex', 'r']) [all …]
|
/littlefs-2.7.6/bd/ |
D | lfs_rambd.c | 5 * SPDX-License-Identifier: BSD-3-Clause 11 LFS_RAMBD_TRACE("lfs_rambd_createcfg(%p {.context=%p, " in lfs_rambd_createcfg() 12 ".read=%p, .prog=%p, .erase=%p, .sync=%p, " in lfs_rambd_createcfg() 15 "%p {.erase_value=%"PRId32", .buffer=%p})", in lfs_rambd_createcfg() 16 (void*)cfg, cfg->context, in lfs_rambd_createcfg() 17 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_rambd_createcfg() 18 (void*)(uintptr_t)cfg->erase, (void*)(uintptr_t)cfg->sync, in lfs_rambd_createcfg() 19 cfg->read_size, cfg->prog_size, cfg->block_size, cfg->block_count, in lfs_rambd_createcfg() 20 (void*)bdcfg, bdcfg->erase_value, bdcfg->buffer); in lfs_rambd_createcfg() 21 lfs_rambd_t *bd = cfg->context; in lfs_rambd_createcfg() [all …]
|
D | lfs_testbd.c | 6 * SPDX-License-Identifier: BSD-3-Clause 15 LFS_TESTBD_TRACE("lfs_testbd_createcfg(%p {.context=%p, " in lfs_testbd_createcfg() 16 ".read=%p, .prog=%p, .erase=%p, .sync=%p, " in lfs_testbd_createcfg() 20 "%p {.erase_value=%"PRId32", .erase_cycles=%"PRIu32", " in lfs_testbd_createcfg() 22 ".buffer=%p, .wear_buffer=%p})", in lfs_testbd_createcfg() 23 (void*)cfg, cfg->context, in lfs_testbd_createcfg() 24 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_testbd_createcfg() 25 (void*)(uintptr_t)cfg->erase, (void*)(uintptr_t)cfg->sync, in lfs_testbd_createcfg() 26 cfg->read_size, cfg->prog_size, cfg->block_size, cfg->block_count, in lfs_testbd_createcfg() 27 path, (void*)bdcfg, bdcfg->erase_value, bdcfg->erase_cycles, in lfs_testbd_createcfg() [all …]
|
D | lfs_filebd.c | 5 * SPDX-License-Identifier: BSD-3-Clause 15 LFS_FILEBD_TRACE("lfs_filebd_createcfg(%p {.context=%p, " in lfs_filebd_createcfg() 16 ".read=%p, .prog=%p, .erase=%p, .sync=%p, " in lfs_filebd_createcfg() 20 "%p {.erase_value=%"PRId32"})", in lfs_filebd_createcfg() 21 (void*)cfg, cfg->context, in lfs_filebd_createcfg() 22 (void*)(uintptr_t)cfg->read, (void*)(uintptr_t)cfg->prog, in lfs_filebd_createcfg() 23 (void*)(uintptr_t)cfg->erase, (void*)(uintptr_t)cfg->sync, in lfs_filebd_createcfg() 24 cfg->read_size, cfg->prog_size, cfg->block_size, cfg->block_count, in lfs_filebd_createcfg() 25 path, (void*)bdcfg, bdcfg->erase_value); in lfs_filebd_createcfg() 26 lfs_filebd_t *bd = cfg->context; in lfs_filebd_createcfg() [all …]
|
/littlefs-2.7.6/ |
D | lfs.c | 5 * SPDX-License-Identifier: BSD-3-Clause 10 #define LFS_BLOCK_NULL ((lfs_block_t)-1) 11 #define LFS_BLOCK_INLINE ((lfs_block_t)-2) 18 rcache->block = LFS_BLOCK_NULL; in lfs_cache_drop() 23 memset(pcache->buffer, 0xff, lfs->cfg->cache_size); in lfs_cache_zero() 24 pcache->block = LFS_BLOCK_NULL; in lfs_cache_zero() 32 if (block >= lfs->cfg->block_count || in lfs_bd_read() 33 off+size > lfs->cfg->block_size) { in lfs_bd_read() 40 if (pcache && block == pcache->block && in lfs_bd_read() 41 off < pcache->off + pcache->size) { in lfs_bd_read() [all …]
|
D | lfs_util.h | 5 * SPDX-License-Identifier: BSD-3-Clause 11 // LFS_CONFIG as a header file to include (-DLFS_CONFIG=lfs_config.h). 65 // macros must not have side-effects as the macros can be removed for a smaller 130 // toolchain-specific implementations. LFS_NO_INTRINSICS falls back to a more 133 // Min/max functions for unsigned 32-bit numbers 144 return a - (a % alignment); in lfs_aligndown() 148 return lfs_aligndown(a + alignment-1, alignment); in lfs_alignup() 154 return 32 - __builtin_clz(a-1); in lfs_npw2() 158 a -= 1; in lfs_npw2() 173 return lfs_npw2((a & -a) + 1) - 1; in lfs_ctz() [all …]
|
D | .travis.yml | 4 - CFLAGS=-Werror 5 - MAKEFLAGS=-j 11 - $HOME/.cache/apt 14 _: &install-common 16 - sudo apt-get install python3 python3-pip 17 - sudo pip3 install toml 18 # setup a ram-backed disk to speed up reentrant tests 19 - mkdir disks 20 - sudo mount -t tmpfs -o size=100m tmpfs disks 21 - export TFLAGS="$TFLAGS --disk=disks/disk" [all …]
|
D | SPEC.md | 10 | | | .---._____ 11 .-----. | | 12 --|o |---| littlefs | 13 --| |---| | 14 '-----' '----------' 20 - littlefs is a block-based filesystem. The disk is divided into an array of 23 - Block pointers are stored in 32 bits, with the special value `0xffffffff` 26 - In addition to the logical block size (which usually matches the erase 31 - By default, all values in littlefs are stored in little-endian byte order. 49 The high-level layout of a metadata block is fairly simple: [all …]
|