-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add disk storage support (SD cards) (#2584)
This PR extends the Storage system to support block-based devices such as SD cards. Storage sizes have been changed from `uint32_t` to `storage_size_t`. Default operation is unchanged, but this allows 64-bit offsets to be used to support devices greater than about 4GB. The existing `SDCard` library has been taken and reworked extensively with added GNU/Linux source code to handle MBR/GPT partitioning. The result is the `DiskStorage` base library, which is then used by the `SdStorage` library to provide specific SD card support, currently using SPI. Optional buffering for block devices is included to support other filing systems. LittleFS appears to work but Spiffs doesn't - it requires erased sectors to be 0xFF which is fundamentally incompatible. Finally, the `FatIFS` library has been added, using the current version of Chan's fatfs library. There are some minor modifications in the code to fix time handling and simplify use. Testing for these libraries has been implemented by verifying generated filesystem images using standard GNU/Linux tools.
- Loading branch information
Showing
42 changed files
with
482 additions
and
116 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
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
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
COMPONENT_INCDIRS += $(ESP8266_COMPONENTS)/spi_flash/include | ||
|
||
COMPONENT_DEPENDS := IFS |
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 |
---|---|---|
|
@@ -91,7 +91,8 @@ LIBDIRS += \ | |
EXTRA_LIBS += \ | ||
pico \ | ||
m \ | ||
stdc++ | ||
stdc++ \ | ||
gcc | ||
|
||
RP2040_CMAKE_OPTIONS := \ | ||
-G Ninja \ | ||
|
Submodule IFS
updated
25 files
+8 −0 | README.rst | |
+12 −0 | component.mk | |
+90 −15 | src/Arch/Host/FileSystem.cpp | |
+6 −6 | src/Arch/Host/include/IFS/Host/FileSystem.h | |
+3 −3 | src/FWFS/FileSystem.cpp | |
+34 −16 | src/FileCopier.cpp | |
+29 −14 | src/FileDevice.cpp | |
+17 −20 | src/FileSystem.cpp | |
+2 −2 | src/GdbFileSystem.cpp | |
+4 −4 | src/HYFS/FileSystem.cpp | |
+1 −3 | src/IFileSystem.cpp | |
+4 −4 | src/include/IFS/Directory.h | |
+3 −3 | src/include/IFS/FWFS/FileSystem.h | |
+22 −13 | src/include/IFS/File.h | |
+47 −10 | src/include/IFS/FileCopier.h | |
+14 −14 | src/include/IFS/FileSystem.h | |
+1 −1 | src/include/IFS/FsBase.h | |
+3 −3 | src/include/IFS/Gdb/FileSystem.h | |
+3 −3 | src/include/IFS/HYFS/FileSystem.h | |
+14 −11 | src/include/IFS/IFileSystem.h | |
+16 −10 | src/include/IFS/Profiler.h | |
+1 −1 | src/include/IFS/Stat.h | |
+5 −0 | src/include/IFS/TimeStamp.h | |
+19 −0 | src/include/IFS/Types.h | |
+11 −7 | src/include/Storage/FileDevice.h |
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
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
Empty file.
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
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
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
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
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
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
Oops, something went wrong.