diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-12-13 10:36:37 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-12-13 10:36:37 -0600 |
commit | 1675114a0fc2a49396f884df3093ace836f4d1b9 (patch) | |
tree | fec23dd5dc2aecad355e0e921e19002cec8c79cb /apps | |
parent | 26ebd60ef8a3983dcef6dca9d8370d56465be79b (diff) | |
download | px4-nuttx-1675114a0fc2a49396f884df3093ace836f4d1b9.tar.gz px4-nuttx-1675114a0fc2a49396f884df3093ace836f4d1b9.tar.bz2 px4-nuttx-1675114a0fc2a49396f884df3093ace836f4d1b9.zip |
Add a minimalist implemention of the 'cu' terminal program (part of Taylor UUCP for ages). Using it, you can simply open a serial port and interact with it. Using '~.' you can leave the terminal program and drop back to nsh.
This might come in handy for other people that have e.g. GSM modems, GPS receivers or other devices with text based serial communications attached to their Nuttx systems.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/system/Kconfig | 4 | ||||
-rw-r--r-- | apps/system/Make.defs | 4 | ||||
-rw-r--r-- | apps/system/Makefile | 4 | ||||
-rw-r--r-- | apps/system/cu/Kconfig | 16 | ||||
-rw-r--r-- | apps/system/cu/Makefile | 13 | ||||
-rw-r--r-- | apps/system/cu/cu_main.c | 4 |
6 files changed, 36 insertions, 9 deletions
diff --git a/apps/system/Kconfig b/apps/system/Kconfig index d2434afab..e3b9689ac 100644 --- a/apps/system/Kconfig +++ b/apps/system/Kconfig @@ -11,6 +11,10 @@ menu "EMACS-like Command Line Editor" source "$APPSDIR/system/cle/Kconfig" endmenu +menu "CU Minimal Terminal" +source "$APPSDIR/system/cu/Kconfig" +endmenu + menu "FLASH Program Installation" source "$APPSDIR/system/install/Kconfig" endmenu diff --git a/apps/system/Make.defs b/apps/system/Make.defs index 125a2ffec..23a8d69c5 100644 --- a/apps/system/Make.defs +++ b/apps/system/Make.defs @@ -42,6 +42,10 @@ ifeq ($(CONFIG_SYSTEM_COMPOSITE),y) CONFIGURED_APPS += system/composite endif +ifeq ($(CONFIG_SYSTEM_CUTERM),y) +CONFIGURED_APPS += system/cu +endif + ifeq ($(CONFIG_SYSTEM_FREE),y) CONFIGURED_APPS += system/free endif diff --git a/apps/system/Makefile b/apps/system/Makefile index e0806ebda..c93137cfa 100644 --- a/apps/system/Makefile +++ b/apps/system/Makefile @@ -35,9 +35,9 @@ -include $(TOPDIR)/.config # Current configuration -# Sub-directories containing system task +# Sub-directories containing system tasks/libraries -SUBDIRS = cdcacm cle composite flash_eraseall free i2c hex2bin inifile +SUBDIRS = cdcacm cle composite cu flash_eraseall free i2c hex2bin inifile SUBDIRS += install mdio nxplayer poweroff ramtest ramtron readline sdcard SUBDIRS += stackmonitor sudoku sysinfo usbmonitor usbmsc vi zmodem diff --git a/apps/system/cu/Kconfig b/apps/system/cu/Kconfig index 22d3dfd9e..c1400b58d 100644 --- a/apps/system/cu/Kconfig +++ b/apps/system/cu/Kconfig @@ -15,3 +15,19 @@ config SYSTEM_CUTERM This terminal might come in handy for other people that have e.g. GS modems, GPS receivers or other devices with text based serial communications attached to their Nuttx systems. + +if SYSTEM_CUTERM + +config SYSTEM_CUTERM_STACKSIZE + int "CU terminal stack size" + default 2048 + ---help--- + This is the stack size that will be used when starting the CU terminal. + +config SYSTEM_CUTERM_PRIORITY + int "CU terminal priority" + default 100 + ---help--- + This is the task priority that will be used when starting the CU terminal. + +endif # SYSTEM_CUTERM diff --git a/apps/system/cu/Makefile b/apps/system/cu/Makefile index 3a3416f8c..35ba6ad12 100644 --- a/apps/system/cu/Makefile +++ b/apps/system/cu/Makefile @@ -1,7 +1,7 @@ ############################################################################ -# apps/examples/cu/Makefile +# apps/sysem/cu/Makefile # -# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs -# USB terminal example +# Minimal CU terminal ASRCS = CSRCS = @@ -77,9 +77,12 @@ ROOTDEPPATH = --dep-path . # Built-in application info +CONFIG_SYSTEM_CUTERM_STACKSIZE ?= 2048 +CONFIG_SYSTEM_CUTERM_PRIORITY ?= SCHED_PRIORITY_DEFAULT + APPNAME = cu -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +PRIORITY = $(CONFIG_SYSTEM_CUTERM_PRIORITY) +STACKSIZE = $(CONFIG_SYSTEM_CUTERM_STACKSIZE) # Common build diff --git a/apps/system/cu/cu_main.c b/apps/system/cu/cu_main.c index b4fef578c..909c7f2ed 100644 --- a/apps/system/cu/cu_main.c +++ b/apps/system/cu/cu_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/cu/cu_main.c + * system/cu/cu_main.c * * Copyright (C) 2014 sysmocom - s.f.m.c. GmbH. All rights reserved. * Author: Harald Welte <hwelte@sysmocom.de> @@ -313,7 +313,7 @@ int cu_main(int argc, FAR char *argv[]) case 'r': rtscts = 0; break; - + case '?': print_help(); return EXIT_SUCCESS; |