Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nshlib/nsh_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static const struct cmdmap_s g_cmdmap[] =

#ifndef CONFIG_DISABLE_MOUNTPOINT
# if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD)
# ifdef CONFIG_MTD_CONFIG
# ifndef CONFIG_MTD_CONFIG_NONE
CMD_MAP("lomtd", cmd_lomtd, 3, 10,
"[-d <dev-path>] | [[-o <offset>] [-e <erase-size>] "
"[-b <sect-size>] [-c <configdata>] <dev-path> <file-path>]]"),
Expand Down
8 changes: 4 additions & 4 deletions nshlib/nsh_fscmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
int sectsize = -1;
off_t offset = 0;
bool badarg = false;
# ifdef CONFIG_MTD_CONFIG
# ifndef CONFIG_MTD_CONFIG_NONE
int configdata = 0;
# endif
int ret = ERROR;
Expand All @@ -1324,7 +1324,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
* NOTE that the -o and -r options are accepted with the -d option, but
* will be ignored.
*/
# ifdef CONFIG_MTD_CONFIG
# ifndef CONFIG_MTD_CONFIG_NONE
while ((option = getopt(argc, argv, "d:o:e:b:c:")) != ERROR)
# else
while ((option = getopt(argc, argv, "d:o:e:b:")) != ERROR)
Expand All @@ -1349,7 +1349,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
sectsize = atoi(optarg);
break;

# ifdef CONFIG_MTD_CONFIG
# ifndef CONFIG_MTD_CONFIG_NONE
case 'c':
configdata = atoi(optarg);
break;
Expand Down Expand Up @@ -1435,7 +1435,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
setup.sectsize = sectsize; /* The sector size to use with the block device */
setup.erasesize = erasesize; /* The sector size to use with the block device */
setup.offset = offset; /* An offset that may be applied to the device */
# ifdef CONFIG_MTD_CONFIG
# ifndef CONFIG_MTD_CONFIG_NONE
setup.configdata = configdata; /* Is a loop mtdconfig device */
# endif

Expand Down
2 changes: 1 addition & 1 deletion system/cfgdata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
config SYSTEM_CFGDATA
tristate "Cfgdata Command"
default n
depends on MTD_CONFIG
depends on !MTD_CONFIG_NONE
---help---
Enable support for the CFGDATA tool.

Expand Down
10 changes: 5 additions & 5 deletions testing/fs/mtd_config_fs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
#
# ##############################################################################

if(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE)
if(CONFIG_TESTING_MTD_CONFIG_NVS)
nuttx_add_application(
NAME
${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME}
${CONFIG_TESTING_MTD_CONFIG_PROGNAME}
PRIORITY
${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY}
${CONFIG_TESTING_MTD_CONFIG_PRIORITY}
STACKSIZE
${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE}
${CONFIG_TESTING_MTD_CONFIG_STACKSIZE}
MODULE
${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE}
${CONFIG_TESTING_MTD_CONFIG_NVS}
SRCS
mtd_config_fs_test_main.c)
endif()
22 changes: 11 additions & 11 deletions testing/fs/mtd_config_fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#

config TESTING_MTD_CONFIG_FAIL_SAFE
config TESTING_MTD_CONFIG_NVS
tristate "MTD Config fail-safe storage test"
default n
depends on MTD_CONFIG_FAIL_SAFE
depends on MTD_CONFIG_NVS
select MTD_CONFIG_NAMED
---help---
Enable the fail-safe storage test

if TESTING_MTD_CONFIG_FAIL_SAFE
if TESTING_MTD_CONFIG_NVS

config TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME
config TESTING_MTD_CONFIG_PROGNAME
string "Program name"
default "mtdconfig_fs_test"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

config TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME
config TESTING_MTD_CONFIG_MOUNTPT_NAME
string "MTD driver mount pt"
default "/dev/mtdnvs_flash"

config TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_MAXNAME
config TESTING_MTD_CONFIG_MOUNTPT_MAXNAME
int "MTD driver mount pt path len"
default 64

config TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
config TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
int "MTD flash section size"
default 4096

config TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_COUNT
config TESTING_MTD_CONFIG_FLASH_SECTION_COUNT
int "MTD flash section count"
default 3

config TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY
config TESTING_MTD_CONFIG_PRIORITY
int "MTD nvs test task priority"
default 100

config TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE
config TESTING_MTD_CONFIG_STACKSIZE
int "MTD nvs test stack size"
default 4096

config TESTING_MTD_CONFIG_FAIL_SAFE_VERBOSE
config TESTING_MTD_CONFIG_VERBOSE
bool "Verbose output"
default n

Expand Down
2 changes: 1 addition & 1 deletion testing/fs/mtd_config_fs/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
#
############################################################################

ifneq ($(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE),)
ifneq ($(CONFIG_TESTING_MTD_CONFIG_NVS),)
CONFIGURED_APPS += $(APPDIR)/testing/fs/mtd_config_fs
endif
8 changes: 4 additions & 4 deletions testing/fs/mtd_config_fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ include $(APPDIR)/Make.defs

# MTD nvs test application info

PROGNAME = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME)
PRIORITY = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE)
MODULE = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE)
PROGNAME = $(CONFIG_TESTING_MTD_CONFIG_PROGNAME)
PRIORITY = $(CONFIG_TESTING_MTD_CONFIG_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_MTD_CONFIG_STACKSIZE)
MODULE = $(CONFIG_TESTING_MTD_CONFIG_NVS)

# MTD nvs test

Expand Down
Loading
Loading