2018-08-17 18:45:06 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
|
|
#
|
|
|
|
|
|
|
|
config SYSTEM_POPEN
|
|
|
|
bool "popen()/pclose() Functions"
|
|
|
|
default n
|
|
|
|
select SCHED_WAITPID
|
2018-08-18 15:54:53 +02:00
|
|
|
depends on NSH_LIBRARY
|
2018-08-17 18:45:06 +02:00
|
|
|
---help---
|
|
|
|
Enable support for the popen() and pclose() interfaces.
|
|
|
|
This will support execution of NSH commands from C code with
|
|
|
|
pipe communications with the shell.
|
|
|
|
|
|
|
|
if SYSTEM_POPEN
|
|
|
|
|
2018-08-18 15:54:53 +02:00
|
|
|
config SYSTEM_POPEN_SHPATH
|
|
|
|
string "Path to shell command"
|
2018-08-18 17:04:43 +02:00
|
|
|
default "/bin/nsh"
|
2019-10-03 22:10:32 +02:00
|
|
|
depends on SYSTEM_NSH=m
|
2018-08-18 15:54:53 +02:00
|
|
|
---help---
|
|
|
|
This is the full path to the program in a mounted file system that
|
|
|
|
implements the system() command. That is, a program that starts the
|
|
|
|
NSH shell, executes one command (in argv[1]), then exits.
|
|
|
|
|
2018-08-17 18:45:06 +02:00
|
|
|
config SYSTEM_POPEN_STACKSIZE
|
|
|
|
int "Shell stack size"
|
|
|
|
default 2048 if !ARCH_SIM
|
|
|
|
default 4096 if ARCH_SIM
|
|
|
|
---help---
|
|
|
|
The size of stack allocated for the shell.
|
|
|
|
|
|
|
|
NOTE: I needed to set the stack size quite large to get this example
|
|
|
|
working on the simulated target (perhaps because of the 64-bit
|
|
|
|
stack? Or perhaps that is a sneak call into the host libc that I
|
|
|
|
have not caught). I assume that a smaller stack would be okay on
|
|
|
|
real hardware, but I have not yet verified that.
|
|
|
|
|
|
|
|
config SYSTEM_POPEN_PRIORITY
|
|
|
|
int "Shell priority"
|
|
|
|
default 100
|
|
|
|
---help---
|
|
|
|
The priority of the shell.
|
|
|
|
|
|
|
|
endif
|