2014-09-25 17:52:21 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 16:14:53 +02:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2014-09-25 17:52:21 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
config EXAMPLES_MTDRWB
|
2018-09-03 17:29:56 +02:00
|
|
|
tristate "MTD R/W buffer test"
|
2014-09-25 17:52:21 +02:00
|
|
|
default n
|
2020-04-29 11:14:04 +02:00
|
|
|
depends on (MTD_WRBUFFER || MTD_READAHEAD) && BUILD_FLAT
|
2021-03-17 00:28:45 +01:00
|
|
|
select BCH
|
2014-09-25 17:52:21 +02:00
|
|
|
---help---
|
|
|
|
Enable the MTD R/W buffer test example.
|
|
|
|
|
|
|
|
NOTE: This example uses some internal NuttX interfaces and, hence,
|
|
|
|
is not available in the kernel build.
|
|
|
|
|
|
|
|
if EXAMPLES_MTDRWB
|
|
|
|
|
|
|
|
config EXAMPLES_MTDRWB_PROGNAME
|
|
|
|
string "Program name"
|
|
|
|
default "mtdrwb"
|
|
|
|
---help---
|
2019-08-23 19:59:28 +02:00
|
|
|
This is the name of the program that will be used when the NSH ELF
|
2014-09-25 17:52:21 +02:00
|
|
|
program is installed.
|
|
|
|
|
|
|
|
config EXAMPLES_MTDRWB_ARCHINIT
|
|
|
|
bool "Architecture-specific initialization"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
The default is to use the RAM MTD device at drivers/mtd/rammtd.c.
|
|
|
|
But an architecture-specific MTD driver can be used instead by
|
|
|
|
defining EXAMPLES_MTDRWB_ARCHINIT. In this case, the
|
|
|
|
initialization logic will call mtdrwb_archinitialize() to obtain
|
|
|
|
the MTD driver instance.
|
|
|
|
|
|
|
|
if !EXAMPLES_MTDRWB_ARCHINIT
|
|
|
|
|
|
|
|
config EXAMPLES_MTDRWB_ERASESIZE
|
|
|
|
int "Size of one erase blocks (simulated)"
|
|
|
|
default 4096
|
|
|
|
depends on !EXAMPLES_MTDRWB_ARCHINIT
|
|
|
|
---help---
|
|
|
|
When EXAMPLES_MTDRWB_ARCHINIT is not defined, this test will use
|
|
|
|
the RAM MTD device at drivers/mtd/rammtd.c to simulate FLASH. In
|
|
|
|
this case, this value must be provided to give the size of one erase
|
|
|
|
simulated erase blocks one MTD RAM device.
|
|
|
|
|
|
|
|
The size of the allocated RAM drive will be:
|
|
|
|
|
|
|
|
EXAMPLES_MTDRWB_ERASESIZE * EXAMPLES_MTDRWB_NEBLOCKS
|
|
|
|
|
|
|
|
config EXAMPLES_MTDRWB_NEBLOCKS
|
|
|
|
int "Number of erase blocks (simulated)"
|
|
|
|
default 32
|
|
|
|
depends on !EXAMPLES_MTDRWB_ARCHINIT
|
|
|
|
---help---
|
|
|
|
When EXAMPLES_MTDRWB_ARCHINIT is not defined, this test will use
|
|
|
|
the RAM MTD device at drivers/mtd/rammtd.c to simulate FLASH. In
|
|
|
|
this case, this value must be provided to give the number of erase
|
|
|
|
blocks in MTD RAM device.
|
|
|
|
|
|
|
|
The size of the allocated RAM drive will be:
|
|
|
|
|
|
|
|
EXAMPLES_MTDRWB_ERASESIZE * EXAMPLES_MTDRWB_NEBLOCKS
|
|
|
|
|
|
|
|
endif # EXAMPLES_MTDRWB_ARCHINIT
|
|
|
|
endif # EXAMPLES_MTDRWB
|