flash: flash_shell: Add flash read/write/erase speed test commands

Adds commands which can be used for timing flash device tasks and
outputting a rough speed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2023-01-25 13:13:49 +00:00 committed by Fabio Baltieri
commit 3c9d529899
2 changed files with 285 additions and 5 deletions

View file

@ -51,6 +51,26 @@ config FLASH_SHELL
Enable the flash shell with flash related commands such as test,
write, read and erase.
if FLASH_SHELL
config FLASH_SHELL_TEST_COMMANDS
bool "Flash read/write/erase test commands"
select CBPRINTF_FP_SUPPORT
help
Enable additional flash shell commands for performing
read/write/erase tests with speed output.
config FLASH_SHELL_BUFFER_SIZE
hex "Flash shell buffer size"
default 0x4000 if FLASH_SHELL_TEST_COMMANDS
default 0x1000
range 0x400 0x1000000
help
Size of the buffer used for flash commands, will determine the
maximum size that can be used with a read/write test.
endif # FLASH_SHELL
config FLASH_PAGE_LAYOUT
bool "API for retrieving the layout of pages"
depends on FLASH_HAS_PAGE_LAYOUT