From 032e3ec3df9f0551a651cb57bed0fea139f3e374 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 8 Feb 2012 00:05:36 +0000 Subject: Some changes to the Telnet/FTPD configuration git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4376 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/sim/src/up_idle.c | 2 +- nuttx/configs/stm3240g-eval/nsh/defconfig | 53 +++++++++++++++++++++++++++++- nuttx/configs/stm3240g-eval/nsh2/appconfig | 14 +++++++- nuttx/configs/stm3240g-eval/nsh2/defconfig | 53 +++++++++++++++++++++++++++++- nuttx/include/nuttx/ioctl.h | 2 +- 5 files changed, 119 insertions(+), 5 deletions(-) (limited to 'nuttx') diff --git a/nuttx/arch/sim/src/up_idle.c b/nuttx/arch/sim/src/up_idle.c index c66b3b770..f493a2dbd 100644 --- a/nuttx/arch/sim/src/up_idle.c +++ b/nuttx/arch/sim/src/up_idle.c @@ -136,7 +136,7 @@ void up_idle(void) #ifdef CONFIG_SIM_X11FB if (g_x11initialized) { - /* Driver the X11 event loop */ + /* Drive the X11 event loop */ #ifdef CONFIG_SIM_TOUCHSCREEN if (g_eventloop) diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index cd6f09907..3aee571a4 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -519,7 +519,7 @@ CONFIG_FDCLONE_DISABLE=n CONFIG_FDCLONE_STDIO=n CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=n -CONFIG_SCHED_WORKPRIORITY=50 +CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=(50*1000) CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 @@ -838,6 +838,27 @@ CONFIG_NET_MULTICAST=n CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 +# +# FTP Server +# +# CONFIG_FTPD_VENDORID - The vendor name to use in FTP communications. +# Default: "NuttX" +# CONFIG_FTPD_SERVERID - The server name to use in FTP communications. +# Default: "NuttX FTP Server" +# CONFIG_FTPD_CMDBUFFERSIZE - The maximum size of one command. Default: +# 512 bytes. +# CONFIG_FTPD_DATABUFFERSIZE - The size of the I/O buffer for data +# transfers. Default: 2048 bytes. +# CONFIG_FTPD_WORKERSTACKSIZE - The stacksize to allocate for each +# FTP daemon worker thread. Default: 2048 bytes. +# +# Other required configuration settings: Of course TCP networking support +# is required. But here are a couple that are less obvious: +# +# CONFIG_DISABLE_PTHREAD - pthread support is required +# CONFIG_DISABLE_POLL - poll() support is required +# + # # RTC Configuration # @@ -1306,6 +1327,36 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # CONFIG_EXAMPLES_PWM_DURATION - The initial PWM pulse train duration in sectonds. # as a percentage. Default: 5 seconds +# +# Settings for examples/ftpd +# +# CONFIG_EXAMPLES_FTPD_PRIO - Priority of the FTP daemon. +# Default: SCHED_PRIORITY_DEFAULT +# CONFIG_EXAMPLES_FTPD_STACKSIZE - Stack size allocated for the +# FTP daemon. Default: 2048 +# CONFIG_EXAMPLES_FTPD_NONETINIT - Define to suppress configuration of the +# network by apps/examples/ftpd. You would need to suppress network +# configuration if the network is configuration prior to running the +# example. +# +# NSH always initializes the network so if CONFIG_NSH_BUILTIN_APPS is +# defined, so is CONFIG_EXAMPLES_FTPD_NONETINIT (se it does not explicitly +# need to be defined in that case): +# +# CONFIG_NSH_BUILTIN_APPS - Build the FTPD daemon example test as an +# NSH built-in function. By default the FTPD daemon will be built +# as a standalone application. +# +# If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may +# be specified to customized the network configuration: +# +# CONFIG_EXAMPLE_FTPD_NOMAC - If the hardware has no MAC address of its +# own, define this =y to provide a bogus address for testing. +# CONFIG_EXAMPLE_FTPD_IPADDR - The target IP address. Default 10.0.0.2 +# CONFIG_EXAMPLE_FTPD_DRIPADDR - The default router address. Default +# 10.0.0.1 +# CONFIG_EXAMPLE_FTPD_NETMASK - The network mask. Default: 255.255.255.0 + # # Stack and heap information # diff --git a/nuttx/configs/stm3240g-eval/nsh2/appconfig b/nuttx/configs/stm3240g-eval/nsh2/appconfig index 843c00e04..83ff084aa 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/appconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/appconfig @@ -42,13 +42,17 @@ CONFIGURED_APPS += examples/nsh CONFIGURED_APPS += system/readline CONFIGURED_APPS += nshlib -# Networking libraries +# Networking libraries. +# Uncomment netutils/ftpc to include an FTP client library +# Uncomment netutils/ftpd to include an FTP server library ifeq ($(CONFIG_NET),y) CONFIGURED_APPS += netutils/uiplib CONFIGURED_APPS += netutils/resolv CONFIGURED_APPS += netutils/webclient CONFIGURED_APPS += netutils/tftpc +#CONFIGURED_APPS += netutils/ftpc +#CONFIGURED_APPS += netutils/ftpd ifeq ($(CONFIG_NSH_TELNET),y) CONFIGURED_APPS += netutils/telnetd endif @@ -71,3 +75,11 @@ endif ifeq ($(CONFIG_I2C),y) CONFIGURED_APPS += system/i2c endif + +# Uncomment examples/ftpc to include the FTP client example +# Uncomment examples/ftpd to include the FTP daemon example + +ifeq ($(CONFIG_NET),y) +#CONFIGURED_APPS += examples/ftpc +#CONFIGURED_APPS += examples/ftpd +endif diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index ce524b359..804fc270e 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -1,7 +1,7 @@ ############################################################################ # configs/stm3240g-eval/nsh2/defconfig # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -838,6 +838,27 @@ CONFIG_NET_MULTICAST=n CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 +# +# FTP Server +# +# CONFIG_FTPD_VENDORID - The vendor name to use in FTP communications. +# Default: "NuttX" +# CONFIG_FTPD_SERVERID - The server name to use in FTP communications. +# Default: "NuttX FTP Server" +# CONFIG_FTPD_CMDBUFFERSIZE - The maximum size of one command. Default: +# 512 bytes. +# CONFIG_FTPD_DATABUFFERSIZE - The size of the I/O buffer for data +# transfers. Default: 2048 bytes. +# CONFIG_FTPD_WORKERSTACKSIZE - The stacksize to allocate for each +# FTP daemon worker thread. Default: 2048 bytes. +# +# Other required configuration settings: Of course TCP networking support +# is required. But here are a couple that are less obvious: +# +# CONFIG_DISABLE_PTHREAD - pthread support is required +# CONFIG_DISABLE_POLL - poll() support is required +# + # # RTC Configuration # @@ -1306,6 +1327,36 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n # CONFIG_EXAMPLES_PWM_DURATION - The initial PWM pulse train duration in sectonds. # as a percentage. Default: 5 seconds +# +# Settings for examples/ftpd +# +# CONFIG_EXAMPLES_FTPD_PRIO - Priority of the FTP daemon. +# Default: SCHED_PRIORITY_DEFAULT +# CONFIG_EXAMPLES_FTPD_STACKSIZE - Stack size allocated for the +# FTP daemon. Default: 2048 +# CONFIG_EXAMPLES_FTPD_NONETINIT - Define to suppress configuration of the +# network by apps/examples/ftpd. You would need to suppress network +# configuration if the network is configuration prior to running the +# example. +# +# NSH always initializes the network so if CONFIG_NSH_BUILTIN_APPS is +# defined, so is CONFIG_EXAMPLES_FTPD_NONETINIT (se it does not explicitly +# need to be defined in that case): +# +# CONFIG_NSH_BUILTIN_APPS - Build the FTPD daemon example test as an +# NSH built-in function. By default the FTPD daemon will be built +# as a standalone application. +# +# If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may +# be specified to customized the network configuration: +# +# CONFIG_EXAMPLE_FTPD_NOMAC - If the hardware has no MAC address of its +# own, define this =y to provide a bogus address for testing. +# CONFIG_EXAMPLE_FTPD_IPADDR - The target IP address. Default 10.0.0.2 +# CONFIG_EXAMPLE_FTPD_DRIPADDR - The default router address. Default +# 10.0.0.1 +# CONFIG_EXAMPLE_FTPD_NETMASK - The network mask. Default: 255.255.255.0 + # # Stack and heap information # diff --git a/nuttx/include/nuttx/ioctl.h b/nuttx/include/nuttx/ioctl.h index dd76c879f..b39bd65cb 100644 --- a/nuttx/include/nuttx/ioctl.h +++ b/nuttx/include/nuttx/ioctl.h @@ -171,7 +171,7 @@ #define _TSIOCVALID(c) (_IOC_TYPE(c)==_TSIOCBASE) #define _TSIOC(nr) _IOC(_TSIOCBASE,nr) -/* NuttX sensor ioctl definitions (see nuttx/sensor/*.h) ********************/ +/* NuttX sensor ioctl definitions (see nuttx/sensor/xxx.h) ******************/ #define _SNIOCVALID(c) (_IOC_TYPE(c)==_SNIOCBASE) #define _SNIOC(nr) _IOC(_SNIOCBASE,nr) -- cgit v1.2.3