-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
samples: usb: mass: demonstrate mounting littlefs file systems on Linux/FreeBSD hosts #24696
Changes from all commits
ad4a026
add25a9
f9fb46f
925b4cd
e5e34d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Storage is on MX25R64 | ||
CONFIG_NORDIC_QSPI_NOR=y | ||
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 | ||
|
||
# Must match the registered name for the selected disk access variant: | ||
# "RAM" via DISK_RAM_VOLUME_NAME for DISK_ACCESS_RAM | ||
# "NAND" via DISK_FLASH_VOLUME_NAME for DISK_ACCESS_FLASH | ||
CONFIG_MASS_STORAGE_DISK_NAME="NAND" | ||
|
||
CONFIG_FILE_SYSTEM=y | ||
CONFIG_FILE_SYSTEM_LITTLEFS=y | ||
CONFIG_FLASH_LOG_LEVEL_INF=y | ||
|
||
CONFIG_FLASH_MAP=y | ||
CONFIG_FLASH_PAGE_LAYOUT=y | ||
|
||
CONFIG_DISK_ACCESS_FLASH=y | ||
CONFIG_DISK_FLASH_DEV_NAME="MX25R64" | ||
CONFIG_DISK_FLASH_START=0x0 | ||
CONFIG_DISK_VOLUME_SIZE=0x10000 | ||
CONFIG_DISK_FLASH_MAX_RW_SIZE=4096 | ||
CONFIG_DISK_FLASH_ERASE_ALIGNMENT=0x1000 | ||
CONFIG_DISK_ERASE_BLOCK_SIZE=0x1000 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2019 Peter Bigot Consulting, LLC | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/delete-node/ &storage_partition; | ||
|
||
&mx25r64 { | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
partition@0 { | ||
label = "storage"; | ||
reg = <0x00000000 0x00010000>; | ||
}; | ||
}; | ||
}; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,8 +113,11 @@ static volatile u32_t defered_wr_sz; | |
* Keep block buffer larger than BLOCK_SIZE for the case | ||
* the dCBWDataTransferLength is multiple of the BLOCK_SIZE and | ||
* the length of the transferred data is not aligned to the BLOCK_SIZE. | ||
* | ||
* Align for cases where the underlying disk access requires word-aligned | ||
* addresses. | ||
*/ | ||
static u8_t page[BLOCK_SIZE + CONFIG_MASS_STORAGE_BULK_EP_MPS]; | ||
static u8_t __aligned(4) page[BLOCK_SIZE + CONFIG_MASS_STORAGE_BULK_EP_MPS]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most existing |
||
|
||
/* Initialized during mass_storage_init() */ | ||
static u32_t memory_size; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__aligned(sizeof(u32_t))
?