Skip to content

Commit 626beaa

Browse files
committed
Add bdev commands
Add ls, mkdir, put and get commands to access block devices Currently only supports littlefs
1 parent 57ca5fa commit 626beaa

File tree

10 files changed

+7799
-0
lines changed

10 files changed

+7799
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ target_link_libraries(picotool
267267
elf2uf2
268268
errors
269269
nlohmann_json
270+
littlefs
270271
whereami)
271272

272273
if (NOT TARGET mbedtls)

lib/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ endif()
1818
set(JSON_BuildTests OFF CACHE INTERNAL "")
1919
add_subdirectory(nlohmann_json EXCLUDE_FROM_ALL)
2020

21+
add_subdirectory(littlefs EXCLUDE_FROM_ALL)
22+
2123
add_subdirectory(whereami EXCLUDE_FROM_ALL)
2224

2325
if(EXISTS "${PICO_SDK_PATH}/lib/mbedtls/CMakeLists.txt")

lib/littlefs/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
add_library(littlefs INTERFACE)
2+
3+
target_sources(littlefs INTERFACE
4+
${CMAKE_CURRENT_LIST_DIR}/lfs.c
5+
${CMAKE_CURRENT_LIST_DIR}/lfs_util.c)
6+
7+
target_include_directories(littlefs INTERFACE ${CMAKE_CURRENT_LIST_DIR})

lib/littlefs/LICENSE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2022, The littlefs authors.
2+
Copyright (c) 2017, Arm Limited. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
- Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
- Redistributions in binary form must reproduce the above copyright notice, this
10+
list of conditions and the following disclaimer in the documentation and/or
11+
other materials provided with the distribution.
12+
- Neither the name of ARM nor the names of its contributors may be used to
13+
endorse or promote products derived from this software without specific prior
14+
written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

lib/littlefs/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
littlefs library
2+
================
3+
4+
The upstream source for the files in this directory is
5+
https://github.com/littlefs-project/littlefs
6+
7+
The current files come from v2.8.2

0 commit comments

Comments
 (0)