-
-
Notifications
You must be signed in to change notification settings - Fork 183
Add littlefs file system and update Sys.IO.FileSystem and stream #2911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
336 commits
Select commit
Hold shift + click to select a range
dc427e0
Add implementation for CreateDirectory in littlefs driver
josesimoes 814925a
Experimenting with using forward slash for directory separator
josesimoes 9c808fb
Add implementation for NativeFindFile
josesimoes efef209
Merge branch 'networkfusion-patch-fix-chibios' of https://github.com/…
josesimoes 844c799
Remove common Sys.IO.drive info as that requires platform implementation
josesimoes b44bfd9
Remove unrelated change
josesimoes ed68140
Bump littlefs version
josesimoes 6d25475
More fixes from code review
josesimoes 9e6bf01
Fix open file by using proper path var
josesimoes d896336
Fix get attributes to properly handle DIR entries
josesimoes 4a3479c
Fix create directory
josesimoes 8c5bf32
Fix NativeFindFile::GetNext
josesimoes 041b967
More fixes in dev container from code review
josesimoes 9ee9543
Fix access to NativeFileInfo fields
josesimoes 8ca5e6d
CreateFilenameString now joins path and file name
josesimoes ae06ea8
Fix FS_Driver::FindNext
josesimoes c2e2e89
Fix path construction for file file
josesimoes f683079
Extract function to normalize path
josesimoes d3ea183
NativeIO Delete now honours recursive parameter
josesimoes 17780b3
Improve NormalizePath
josesimoes 1cc933b
Improvements in SPI flash chip drivers
josesimoes d82e60f
Fix return type
josesimoes 9368512
Rework path creation to simplify code
josesimoes 1c74dd0
Fix return from SPI driver prog handler
josesimoes 7fdb5cb
Add debug code to hal_lfs_prog_1
josesimoes 4437b11
Revert wrong change with return size from program handlers
josesimoes e76950b
Another attempt to create directories with long paths
josesimoes 6531bf3
Comment out lfsFileSystemReady and usage
josesimoes a888f55
Update assembly declarations
josesimoes 5531570
Fix Driver::GetAttributes
josesimoes eb064bd
Fix Driver::SetAttributes
josesimoes 8549544
NormalizePath now removes trailing slash
josesimoes 591edd7
Fix Driver::Move to return false on dir not empty
josesimoes 924b256
Fix CLR_RT_FindFile::CreateInstance
josesimoes 4d2cafc
Disable inline files in littlefs configuration
josesimoes 4ba5e60
Code style fixes
josesimoes 06b7fb2
Rewrite QSPI_Write
josesimoes c6b7bb0
Add implementation of QSPI driver using ChibiOS HAL
josesimoes 5c7ecb0
Rename data buffer for LFS_SPI1
josesimoes 5c41ca3
Fix write size parameter
josesimoes 45d27ad
Improve write handlers to deal with full page write
josesimoes 655c6a6
Fix WSPI_WaitOnBusy
josesimoes b3d0eb9
Code clean-up
josesimoes b9ce03b
Create directory doesn't add leading slash anymore
josesimoes 9823eb3
More changes in default config
josesimoes 7032fa8
Fix compiler error
josesimoes 9451035
Change config for LFS1
josesimoes 5090d7d
Fix file attribute creation
josesimoes 4d68446
Fix System.IO.FileSystem vcxproj
josesimoes 954925b
Improve vcxproj files to include additional incudes from nf.props file
josesimoes d7aa51b
Include System.IO.FileSystem and littlfs in nanoCLR virtual device
josesimoes 48e49a8
Fix several declarations
josesimoes 0c51f8e
Fix declarations and formatting
josesimoes 7cf7845
Remove unused include
josesimoes dce4a2d
Clean up includes
josesimoes bbe19df
Add debug helper code
josesimoes c5538f0
Remove unused include
josesimoes 6c7039e
Fix include order
josesimoes 4d1ef9c
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 045bc4e
Fix declaration
josesimoes 2c2e449
Add remaining implementation of littlefs for nanoCLR
josesimoes d0a1809
Change type of file system handles to support both 32 and 64 bits arch
josesimoes c27515f
Remove unused usings
josesimoes 8330f54
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 01f262f
Fix issues with declarations
josesimoes fc251ef
Remove CLR_RT_FindFile
josesimoes 4ba2394
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 91b4d3c
Replace SPIFFs with littlefs in ORGPALX
josesimoes 7ffbe58
Change QSPI driver back to nano QSPI version
josesimoes 0edf7d1
More fixes in declarations and by ref params
josesimoes 50b7540
Clean-up code and fix code style
josesimoes ae593ff
Don't create root dir at format
josesimoes 60132da
More clean-up
josesimoes 247120c
Fix return flow on QSPI read
josesimoes f35d812
Move temp buffer for write check to global memory
josesimoes 469d3c2
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 24b420a
Remove unused code
josesimoes aea599e
Fix command to erase sub-sector
josesimoes 33d9c05
Fix multiple locals inits
josesimoes 5c03c0b
Fix buffer size
josesimoes 693358f
Code style fix
josesimoes 53ad066
Revert littlefs config to use single byte for read and program
josesimoes 21b6083
Remove unused commands
josesimoes 90c80f7
Remove unnecessary DSB instruction
josesimoes 103e1cf
Implement littlefs sync handler
josesimoes 18a7811
Add sleep to wait for W25Q128 to become available
josesimoes cc4f082
Remove unused declarations
josesimoes 5755b03
Migrating littlefs implementation from ORGPALX
josesimoes e7d35cd
Adjust block storage
josesimoes 3e5a2e1
Add check for existing index in fs
josesimoes 76992d1
Rename directory for coherence with original name
josesimoes 097b7c6
Fix case in path
josesimoes b405681
Move declaration of g_LITTLEFS_FILE_SYSTEM_DriverInterface to driver …
josesimoes e0513f4
Fix FS inits for ORGPALX
josesimoes 722ba3b
Add missing external declaration for FS interfaces
josesimoes 7403363
Fix CMake to add include to fat FS path
josesimoes 2b55663
Fix GetSizeInfo for littlefs
josesimoes b0a68aa
Fix declaration of some APIs
josesimoes c8045f6
Add correct implementation for ChibiOS GetDrivesNative
josesimoes e7ffd9b
Fix declaration of FS_MountVolume
josesimoes 028fb07
Fix declaration for GetVolumeLabel
josesimoes 7524339
InitializeVolume now take path parameter
josesimoes 7b08e74
Add FindVolume and GetNextFreeVolumeId
josesimoes ba91f8e
Rework implementation of FS_MountVolume and UnMountVolume
josesimoes e21f98e
Add FAT FS driver for ChibiOS
josesimoes 91df29d
Fix FS_AddVolumes for ChibiOS
josesimoes a35f507
Migrate USB MSD and SDCard code
josesimoes 3ddb347
Enable back SDCard support
josesimoes 2a6bef2
Add back m_label item to FileSystemVolum struct
josesimoes a425fd6
Update assembly declaration
josesimoes b9cbd47
Implement FS_MountRemovableVolumes in ORGPAL
josesimoes 3c59a60
Add implementation for Format in littlefs anf FATFS drivers
josesimoes 67b4ca5
Remove static declaration to allow calling it from target level code
josesimoes ffa5183
Remove unused code
josesimoes 7fdda27
Fix Format declaration for netcore
josesimoes 08eb009
Fix implementation for Format and GetAttributes
josesimoes bab76e3
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 2ac97c9
AddVolume now returns true if the volume already exists
josesimoes 8e3c5fd
Fixes in NativeGetChildren
josesimoes a9e4ec5
Better handling of call to Move in FS driver
josesimoes 1a14035
Global fix for create directory in all drivers
josesimoes 0a76c32
Various fixes in FAFFS driver
josesimoes 3e49144
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes f276213
Fix init SDCard with real default config
josesimoes 057c2d1
Remove cache invalidate from FATFS driver
josesimoes 562cd8b
Fix SetLength
josesimoes 6c75827
Bringing FATFS disk IO in sync with ChibiOS implementation
josesimoes 16d21bb
Change FatFS config to use LFN 2 to better use memory
josesimoes b54e17f
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes b701250
FATFS driver now implements internal driver
josesimoes acb0fd4
Add struct to map assigned FAT volumes
josesimoes f1adf30
Write and SetLength now sync file to media
josesimoes 64eeeec
GetSizeInfo now returns -1 for total and free size
josesimoes bc47fd6
Remove assert as this call can fail on occasions
josesimoes 4b80f32
Config MPU for cache free memory
josesimoes 2f552b2
Clean-up code in read and write handlers
josesimoes eb9c4c6
FATFS array is now in nocache memory
josesimoes 58cac2d
Porting last changes to ORGPALX
josesimoes 5140e2b
Fix GetAttributes to properly deal with home directory
josesimoes 2f460f4
Migration to W25Q512 chip
josesimoes 617282d
Fix FatFS config to deal with different volume configs
josesimoes 2ec8242
Fix define checks
josesimoes 29f33f4
More fixes in FatFS configuration
josesimoes 90e1c97
Remove unused define
josesimoes 2cdaa89
Adjust FatFS config for ST_STM32F769I_DISCOVERY
josesimoes e68b27d
More fixes in FatFS and related for target without storage
josesimoes 587d954
Fix FielStream stubs
josesimoes 357fee0
Remove unused file
josesimoes 004edc4
Fix compiler def usage
josesimoes 64a8fe7
Fix File System stubs
josesimoes cdf813e
Add missing unmount
josesimoes 62a7de6
Add implementation to mount USB MSD
josesimoes 4b05839
ORGPALX littlefs config now uses wear levelling
josesimoes ae8a9f5
Move littlefs buffers to nocache region
josesimoes 879924c
Enable nocache region for ORGPAL targets
josesimoes 4dd7751
Move all littlefs variables to nocache region
josesimoes 058e2ff
Add delay to wait for AT25SF641to become fully operational
josesimoes b80eca9
Remove unused command
josesimoes ba7853c
Fix comment
josesimoes a6e792e
Fix project property
josesimoes 34cbfdb
Update STM cube packages
josesimoes 59cbce2
Rename flash commands and memory organization
josesimoes 979a039
Fix GetSizeInfo for littlefs
josesimoes 8796206
Fix GetAttributes for littlefs
josesimoes 7ad546a
Fix ChibiOS cache definition for OSGPALX
josesimoes 0c522d7
Buffers for littlefs are no longer in no cache region
josesimoes 65b8ca0
QSPI_Write now used simple prog instruction
josesimoes 1e951f0
Setting up MPU for QSPI region
josesimoes 3390740
Improvement in workaround for unwanted busy flag in QSPI when reading
josesimoes 6c2ecbd
Remove unnecessary call to watchdog reset
josesimoes 5b5ffbc
Add CORTEX to STM32F7 Cube package
josesimoes 70f5433
littlefs common structs and vars are not longer stored in no cache re…
josesimoes 81dcdc8
littlefs driver now using own buffers to allow setting those from tar…
josesimoes c8bd0a3
littlefs sync handlers are now implemented in ORGPAL3
josesimoes d1e12bf
Remove unused comments
josesimoes 77f8025
Fix ChibiOS HAL config for no cache RAM
josesimoes d23079c
Add target provided buffers for littlefs driver
josesimoes 5c2a9cc
Remove unnecessary call to watchdog reset
josesimoes 5a0f9bf
Port changes from littlefs driver in ORGPALX
josesimoes e3aa9a8
Fix unmount volume for FATFS
josesimoes 8ababce
Rename buffers for FATFS driver for consistency
josesimoes 5d8253d
FATFS_FileHandle are now allocated from it's own memory pool
josesimoes c4bb769
Clear buffers processing file names and paths
josesimoes c0846ff
Add code to change drive on all handlers taking a volumeID
josesimoes b91fec8
Fix parameter for storage events
josesimoes 903b70a
Update declaration of sys io filesystem
josesimoes bf9387c
Add implementation for FindVolume
josesimoes a3190e0
Fix implementation for DriveInfo in ChibiOS implementation
josesimoes d108fe2
Update declaration for sys io filesystem
josesimoes f64e0c9
Work CI-CD
josesimoes e46cf55
Add missing header file
josesimoes 3bf220c
Update declaration of sys io filesystem
josesimoes 8594574
Add implementation for Format at file system library
josesimoes a078263
Update declaration
josesimoes d520294
System_IO_DriveInfo is now common
josesimoes 4585282
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes f6452e8
Fix sys io file system vcxp project
josesimoes 08697e4
Fix declarations of littlefs driver in netcore target
josesimoes a3f1535
Fix build job for AZDO
josesimoes d792c7a
Fix build of nanoCLR WIN32 and netcore solutions
josesimoes ed5ebb0
Add implementation of DriveInfo::Refresh
josesimoes 59a11ba
Add back nuget restore for nanoCLR
josesimoes 87b4015
Add header file to all platforms
josesimoes ffea6bb
Fix implementation of DriveInfo::Refresh
josesimoes 45e512d
Remove unused files from ChibiOS
josesimoes 7c5a5af
First pass migrating ESP32 to new file system
josesimoes 33a0646
Improve comment
josesimoes d19722d
Another stab at fixing nanoCLR build in AZDO
josesimoes 1dc560a
Fix NXP build on AZDO
josesimoes d319f9b
Comment wrong include
josesimoes d3e211f
More fixes to AZDO build
josesimoes 0a4e50a
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 9e6dec4
Fix forced inclusion of Sys.IO.FileSystem for NXP
josesimoes 25d5093
Comment more fatfs stuff in ESP32 targets
josesimoes 98df075
Fix build for NXP
josesimoes b4bc9bf
Fix declaration for ESP32 build
josesimoes 5e7ed27
Include file system header is now dependent of build option
josesimoes 556b68f
Fix dummy declarations
josesimoes 945d9de
Update declaration of FS_MountVolume
josesimoes 146664e
Working on ESP32 FATFS driver
josesimoes a9dc8b0
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 327c588
Update SDMMC inits following IDF 5.x
josesimoes 3c1beaa
Fix line end
josesimoes beb74b4
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 19c48e0
Don't change the default sdcard host flags and clock anymore
josesimoes dc5c187
Fix formatting
josesimoes d7ea326
Add littlefs as IDF component
josesimoes 2ab120a
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes cd0b415
Normalize line endings
josesimoes 1e3fca3
Fix merge
josesimoes e5760f0
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 1a79655
Fix wrong merge
josesimoes c9c917c
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes d4fd381
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 8733042
Fix dev containers versions
josesimoes ea1986c
Fix index in file system driver
josesimoes 685c77a
Rework inclusion of littlefs CMake option
josesimoes 68789da
Adding littlefs driver
josesimoes 806d478
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes a5ef29a
Fix call in release build
josesimoes acaf6c3
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes 2d003cc
Fix FS_Driver::Delete to properly handle files and directories (recur…
josesimoes 3074545
Fix FS_Driver::FindNext
josesimoes 10e63b1
Fix FS_Driver::GetAttributes
josesimoes 9eee366
Fix FS_Driver::FindNext
josesimoes cde34d9
Fix FS_Driver::FindOpen and FindNext
josesimoes 3dc3b6b
Fix NativeGetChildren to handle situations when volume isn't' found
josesimoes 4c8a528
Remove unused code
josesimoes 3a49985
Removing unnecessary checks
josesimoes 340d9b1
Final clean-up on sys io filesystem
josesimoes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
FROM ghcr.io/nanoframework/dev-container-all:v2.47 | ||
FROM ghcr.io/nanoframework/dev-container-all:v2.48 |
This file contains hidden or 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 hidden or 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 hidden or 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 @@ | ||
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.26 | ||
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.27 |
This file contains hidden or 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 hidden or 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 @@ | ||
FROM ghcr.io/nanoframework/dev-container-chibios:v1.27 | ||
FROM ghcr.io/nanoframework/dev-container-chibios:v1.28 |
This file contains hidden or 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 hidden or 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 @@ | ||
FROM ghcr.io/nanoframework/dev-container-ti:v1.22 | ||
FROM ghcr.io/nanoframework/dev-container-ti:v1.23 |
This file contains hidden or 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 hidden or 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 hidden or 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,52 @@ | ||
# | ||
# Copyright (c) .NET Foundation and Contributors | ||
# See LICENSE file in the project root for full license information. | ||
# | ||
|
||
include(FetchContent) | ||
FetchContent_GetProperties(littlefs) | ||
|
||
# List of the required include paths | ||
list(APPEND littlefs_INCLUDE_DIRS | ||
${littlefs_SOURCE_DIR} | ||
${CMAKE_SOURCE_DIR}/targets/${RTOS}/_littlefs) | ||
|
||
set(src_LITTLEFS | ||
|
||
lfs.c | ||
lfs_util.c | ||
|
||
# HAL implementation specific to a platform | ||
# has to be included at platform level | ||
hal_littlefs.c | ||
|
||
target_littlefs.c | ||
) | ||
|
||
foreach(SRC_FILE ${src_LITTLEFS}) | ||
|
||
set(LITTLEFS_SRC_FILE SRC_FILE -NOTFOUND) | ||
|
||
find_file(LITTLEFS_SRC_FILE ${SRC_FILE} | ||
PATHS | ||
|
||
${littlefs_SOURCE_DIR} | ||
${CMAKE_SOURCE_DIR}/targets/${RTOS}/_littlefs | ||
${TARGET_BASE_LOCATION} | ||
|
||
CMAKE_FIND_ROOT_PATH_BOTH | ||
) | ||
|
||
if (BUILD_VERBOSE) | ||
message("${SRC_FILE} >> ${LITTLEFS_SRC_FILE}") | ||
endif() | ||
|
||
list(APPEND littlefs_SOURCES ${LITTLEFS_SRC_FILE}) | ||
|
||
endforeach() | ||
|
||
set_source_files_properties(${littlefs_SOURCE_DIR}/lfs.c PROPERTIES COMPILE_FLAGS -Wno-shadow) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(littlefs DEFAULT_MSG littlefs_INCLUDE_DIRS littlefs_SOURCES) |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.