forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out littlefs mbed-os implementation from 'ca7b5e8eed574a7295280…
…d9276de3f9bb7cb7f05' This is not a true subtree split due to the complication moves in the mbed-os tree. While I could patch the history together to keep the subtree intact, the ultimate goal for this split is to be merged in parallel to littlefs-v1. This would give us duplicate histories anyway so it's probably better to keep this split as a single squashed commit. source-dir: features/storage/filesystem/littlefs/littlefs source-hash: ca7b5e8
- Loading branch information
0 parents
commit 8b609ec
Showing
59 changed files
with
15,569 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
littlefs/emubd/ | ||
littlefs/tests/ | ||
TESTS/util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
script: | ||
# Check that example compiles | ||
- sed -n '/``` c++/,/```/{/```/d; p;}' README.md > main.cpp | ||
- PYTHONPATH=mbed-os python mbed-os/tools/make.py -t GCC_ARM -m K82F | ||
--source=. --build=BUILD/K82F/GCC_ARM -j0 | ||
|
||
# Check that tests compile | ||
- rm -rf main.cpp BUILD | ||
- PYTHONPATH=mbed-os python mbed-os/tools/test.py -t GCC_ARM -m K82F | ||
--source=. --build=BUILD/TESTS/K82F/GCC_ARM -j0 | ||
-n 'tests*' | ||
|
||
# Run littlefs functional tests | ||
- CFLAGS="-Wno-format" make -Clittlefs test QUIET=1 | ||
|
||
# Run littlefs functional tests with different configurations | ||
# Note: r/w size of 64 is default in mbed | ||
- CFLAGS="-Wno-format -DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64" | ||
make -Clittlefs test QUIET=1 | ||
- CFLAGS="-Wno-format -DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" | ||
make -Clittlefs test QUIET=1 | ||
- CFLAGS="-Wno-format -DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" | ||
make -Clittlefs test QUIET=1 | ||
- CFLAGS="-Wno-format -DLFS_BLOCK_COUNT=1023" | ||
make -Clittlefs test QUIET=1 | ||
- CFLAGS="-Wno-format -DLFS_LOOKAHEAD=2048" | ||
make -Clittlefs test QUIET=1 | ||
|
||
# Self-host with littlefs-fuse for fuzz test | ||
- CFLAGS="-Wno-format" make -C littlefs-fuse | ||
|
||
- littlefs-fuse/lfs --format /dev/loop0 | ||
- littlefs-fuse/lfs /dev/loop0 mount | ||
|
||
- ls mount | ||
- mkdir mount/littlefs | ||
- cp -r $(git ls-tree --name-only HEAD littlefs/) mount/littlefs | ||
- cd mount/littlefs | ||
- ls | ||
- CFLAGS="-Wno-format" make -B test_dirs QUIET=1 | ||
|
||
install: | ||
# Get arm-none-eabi-gcc | ||
- sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq gcc-arm-none-eabi --force-yes | ||
# Get dependencies | ||
- git clone https://github.com/armmbed/mbed-os.git | ||
- git clone https://github.com/armmbed/spiflash-driver.git | ||
# Install python dependencies | ||
- pip install --user -r mbed-os/requirements.txt | ||
# Install littlefs-fuse and dependencies | ||
- sudo apt-get install libfuse-dev | ||
- git clone https://github.com/geky/littlefs-fuse | ||
# Check versions | ||
- fusermount -V | ||
- arm-none-eabi-gcc --version | ||
- python --version | ||
- gcc --version | ||
|
||
before_script: | ||
# Patch littlefs-fuse | ||
- rm -rf littlefs-fuse/littlefs/* | ||
- cp -r $(git ls-tree --name-only HEAD littlefs/) littlefs-fuse/littlefs | ||
- echo '*' > littlefs-fuse/.mbedignore | ||
# Create file-backed disk | ||
- mkdir mount | ||
- sudo chmod a+rw /dev/loop0 | ||
- dd if=/dev/zero bs=512 count=2048 of=disk | ||
- losetup /dev/loop0 disk |
Oops, something went wrong.