diff --git a/system/zmodem/Kconfig b/system/zmodem/Kconfig index f603df2da..956357305 100644 --- a/system/zmodem/Kconfig +++ b/system/zmodem/Kconfig @@ -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" diff --git a/system/zmodem/Makefile b/system/zmodem/Makefile index 6f96dc808..99bb7bb60 100644 --- a/system/zmodem/Makefile +++ b/system/zmodem/Makefile @@ -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 diff --git a/system/zmodem/README.txt b/system/zmodem/README.txt index 15fd638e2..620dfa998 100755 --- a/system/zmodem/README.txt +++ b/system/zmodem/README.txt @@ -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.