samples: subsys: usb: mass: add support for Adafruit feather nRF52840
Add configuration and overlay files for Adafruit feather nRF52840. README has also been updated and improved. Documentation related to littlefs has been moved to an independent section as it could apply to any sample. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
ec1a8377ab
commit
c8cca16c20
|
@ -79,9 +79,7 @@ nrf52840dk_nrf52840 Example
|
|||
|
||||
This board configures to use the external 64 MiBi QSPI flash chip with a
|
||||
64 KiBy `littlefs`_ partition compatible with the one produced by the
|
||||
:ref:`littlefs-sample`. While a FAT-based file system can be mounted by
|
||||
many systems automatically, mounting the littlefs file system on a Linux
|
||||
or FreeBSD system can be accomplished using the `littlefs-FUSE`_ utility.
|
||||
:ref:`littlefs-sample`.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/subsys/usb/mass
|
||||
|
@ -113,7 +111,47 @@ different):
|
|||
F 5 newfile
|
||||
End of files
|
||||
|
||||
Determine the local device name from the system log, e.g.:
|
||||
For information on mounting littlefs file system on Linux or FreeBSD
|
||||
systems refer to the "littlefs Usage" section below.
|
||||
|
||||
adafruit_feather_nrf52840 Example
|
||||
=================================
|
||||
|
||||
This board configures to use the external 16 MiBi QSPI flash chip with a
|
||||
2 MiBy FAT partition.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/subsys/usb/mass
|
||||
:board: adafruit_feather_nrf52840
|
||||
:goals: build
|
||||
:compact:
|
||||
|
||||
After you have built and flashed the sample app image to your board,
|
||||
connect the board's USB connector to a host capable of mounting FAT
|
||||
drives. The output to the console will look something like this
|
||||
(file system contents will be different):
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
*** Booting Zephyr OS build zephyr-v2.3.0-1991-g4c8d1496eafb ***
|
||||
Area 4 at 0x0 on GD25Q16 for 2097152 bytes
|
||||
Mount /NAND:: 0
|
||||
/NAND:: bsize = 512 ; frsize = 1024 ; blocks = 2028 ; bfree = 1901
|
||||
/NAND: opendir: 0
|
||||
F 0 SAMPLE.TXT
|
||||
End of files
|
||||
[00:00:00.077,423] <inf> main: The device is put in USB mass storage mode.
|
||||
|
||||
On most operating systems the drive will be automatically mounted.
|
||||
|
||||
littlefs Usage
|
||||
==============
|
||||
|
||||
While a FAT-based file system can be mounted by many systems automatically,
|
||||
mounting the littlefs file system on a Linux or FreeBSD system can be
|
||||
accomplished using the `littlefs-FUSE`_ utility.
|
||||
|
||||
First determine the local device name from the system log, e.g.:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# qspi NOR driver
|
||||
CONFIG_NORDIC_QSPI_NOR=y
|
||||
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
|
||||
|
||||
# flash
|
||||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
|
||||
# mass storage
|
||||
CONFIG_MASS_STORAGE_DISK_NAME="NAND"
|
||||
|
||||
# disk
|
||||
CONFIG_DISK_ACCESS_FLASH=y
|
||||
CONFIG_DISK_FLASH_DEV_NAME="GD25Q16"
|
||||
CONFIG_DISK_FLASH_START=0x0
|
||||
CONFIG_DISK_VOLUME_SIZE=0x200000
|
||||
CONFIG_DISK_FLASH_MAX_RW_SIZE=4096
|
||||
CONFIG_DISK_FLASH_ERASE_ALIGNMENT=0x1000
|
||||
CONFIG_DISK_ERASE_BLOCK_SIZE=0x1000
|
||||
|
||||
# file system
|
||||
CONFIG_FILE_SYSTEM=y
|
||||
CONFIG_FAT_FILESYSTEM_ELM=y
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/delete-node/ &storage_partition;
|
||||
|
||||
&gd25q16 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "storage";
|
||||
reg = <0x00000000 0x00200000>;
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue