zephyr/drivers/flash/Kconfig.simulator
Kamil Piszczek 6ae532a328 drivers: flash: flash_simulator enabled by default on qemu
Enabled Flash Simulator on the QEMU x86 platform by default.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-24 13:05:11 -07:00

95 lines
2.1 KiB
Plaintext

# Kconfig - Flash simulator config
#
# Copyright (c) 2018 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
menuconfig FLASH_SIMULATOR
bool
prompt "Flash simulator"
default y if BOARD_QEMU_X86
depends on FLASH
select STATS
select STATS_NAMES
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
help
Enable the flash simulator.
if FLASH_SIMULATOR
config FLASH_SIMULATOR_BASE_OFFSET
int
prompt "Base offset of the flash"
default 0
help
The base offset of the flash.
The address space of the simulated flash ranges from this value
to this value plus FLASH_SIMULATOR_ERASE_UNIT * FLASH_SIMULATOR_FLASH_SIZE.
config FLASH_SIMULATOR_ERASE_UNIT
int
prompt "Erase unit size in bytes"
default 4096
range 1 65536
help
The smallest area of flash memory that can be indipendently erased.
config FLASH_SIMULATOR_PROG_UNIT
int
prompt "Program unit size in bytes"
default 4
range 1 4096
help
The smallest area of flash memory that can be indipendently programmed.
config FLASH_SIMULATOR_FLASH_SIZE
int
prompt "Flash size in erase units"
default 4
range 1 65536
help
The size of the simulated flash area expressed in erase units.
config FLASH_SIMULATOR_DOUBLE_WRITES
bool
prompt "Allow program units to be programmed more than once"
default n
help
If selected, writing to a non-erased program unit will succeed, otherwise, it will return an error.
Keep in mind that write operations can only pull bits to zero, regardless.
config FLASH_SIMULATOR_ERASE_PROTECT
bool
prompt "Enable erase protection on write protection"
default y
help
If selected, turning on write protection will also prevent erasing.
config FLASH_SIMULATOR_SIMULATE_TIMING
bool
prompt "Enable hardware timing simulation"
if FLASH_SIMULATOR_SIMULATE_TIMING
config FLASH_SIMULATOR_MIN_READ_TIME_US
int
prompt "Minimum read time (µS)"
default 2
range 1 1000000
config FLASH_SIMULATOR_MIN_WRITE_TIME_US
int
prompt "Minimum write time (µS)"
default 100
range 1 1000000
config FLASH_SIMULATOR_MIN_ERASE_TIME_US
int
prompt "Minimum erase time (µS)"
default 2000
range 1 1000000
endif
endif # FLASH_SIMULATOR