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.
This commit is contained in:
Gregory Nutt 2014-12-13 10:36:37 -06:00
parent bffa1da92a
commit dabe412e70
6 changed files with 36 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>