apps/system/zmodem: Allow stack size and priority to be configured.

This commit is contained in:
Gregory Nutt 2018-05-27 10:22:06 -06:00
parent 9ac16049b8
commit 22e5af9320
3 changed files with 26 additions and 10 deletions

View File

@ -16,6 +16,14 @@ menuconfig SYSTEM_ZMODEM
if SYSTEM_ZMODEM
config SYSTEM_ZMODEM_PRIORITY
int "rz/sz task priority"
default 100
config SYSTEM_ZMODEM_STACKSIZE
int "rz/ez stack size"
default 2048
config SYSTEM_ZMODEM_DEVNAME
string "Default Zmodem device"
default "/dev/console"

View File

@ -39,8 +39,19 @@ include $(APPDIR)/Make.defs
# Zmodem sz and rz commands
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 1536
CONFIG_SYSTEM_SZPROGNAME ?= sz$(EXEEXT)
SZ_PROGNAME = $(CONFIG_SYSTEM_SZPROGNAME)
CONFIG_SYSTEM_RZPROGNAME ?= rz$(EXEEXT)
RZ_PROGNAME = $(CONFIG_SYSTEM_RZPROGNAME)
CONFIG_SYSTEM_ZMODEM_PRIORITY ?= 100
CONFIG_SYSTEM_ZMODEM_STACKSIZE ?= 2048
PRIORITY = $(CONFIG_SYSTEM_ZMODEM_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_ZMODEM_STACKSIZE)
# Source/object files
ASRCS =
@ -77,12 +88,6 @@ else
INSTALL_DIR = $(BIN_DIR)
endif
CONFIG_SYSTEM_SZPROGNAME ?= sz$(EXEEXT)
SZ_PROGNAME = $(CONFIG_SYSTEM_SZPROGNAME)
CONFIG_SYSTEM_RZPROGNAME ?= rz$(EXEEXT)
RZ_PROGNAME = $(CONFIG_SYSTEM_RZPROGNAME)
ROOTDEPPATH = --dep-path .
# Common build

View File

@ -142,9 +142,12 @@ Using NuttX Zmodem with a Linux Host
Then use the sz command on Linux to send the file to the target:
$ sudo sz <filename> </dev/ttyS0 >/dev/ttyS0
$ sudo sz <filename> [-l nnnn] </dev/ttyS0 >/dev/ttyS0
Where <filename> is the file that you want to send.
Where <filename> is the file that you want to send. If -l nnnn is not
specified, then there will likely be packet buffer overflow errors.
nnnn should be set to a value less than or equal to
CONFIG_SYSTEM_ZMODEM_PKTBUFSIZE
The resulting file will be found where you have configured the Zmodem
"sandbox" via CONFIG_SYSTEM_ZMODEM_MOUNTPOINT.