9
0
Fork 0

apps/ make changes + SLIP MTU notes

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3381 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-03-14 23:24:42 +00:00
parent 8c49dc8219
commit 7dcb594e52
7 changed files with 36 additions and 15 deletions

View File

@ -36,6 +36,6 @@
define REGISTER
@echo "Register: $1"
@echo "{ .name = $1, .priority = $2, .stacksize = $3, .main = $4 }," >> ../exec_nuttapp_list.h
@echo "{ .name = \"$1\", .priority = $2, .stacksize = $3, .main = $4 }," >> ../exec_nuttapp_list.h
@echo "EXTERN int $4(int argc, char *argv[]);" >> ../exec_nuttapp_proto.h
endef

View File

@ -87,7 +87,7 @@ $(BIN): $(OBJS)
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) \
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(call REGISTER, $(APPNAME), $(PRIORITY), $(STACKSIZE), $(APPNAME)_main)
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
@touch $@
# Register application

View File

@ -87,7 +87,7 @@ $(BIN): $(OBJS)
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) \
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(call REGISTER, $(APPNAME), $(PRIORITY), $(STACKSIZE), $(APPNAME)_main)
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
@touch $@
# Register application

View File

@ -309,13 +309,18 @@ o Network (net/, drivers/net)
function so that little of this incompatibilities need be exposed.
Description: The SLIP driver (drivers/net/slip.c) has had only the most superficial
testing. The main issue is the I haven't yet gotten a dual UART Linux
configuration that supports SLIP (I need one UART for SLIP and one for
the serial debug console). A second issue is that SLIP requires
hardware handshake and that has not been implemented in the UART
drivers on most platforms. It might be possible to use a special
cable to bypass the handshaking (but which may also result in data
overrun errors).
testing. Issues/Notes:
(1) The main issue is the I haven't yet gotten a dual UART Linux
configuration that supports SLIP (I need one UART for SLIP and
one for the serial debug console).
(2) A second issue is that SLIP requires hardware handshake and
that has not been implemented in the UART drivers on most platforms.
It might be possible to use a special cable to bypass the handshaking.
Tiy might also try the slattach' option -L which is supposed to
enable "3-wire operation." Either action which may also result in
data overrun errors).
(3) Finally, the Linux slip driver is hard-coded to use an MTU of 296
so setting CONFIG_NET_BUFSIZE to a 296 is also advised.
Status: Open
Priority: Medium

View File

@ -816,16 +816,15 @@ Where <subdir> is one of the following:
This should create an interface with a name like sl0, or sl1, etc.
Add -d to get debug output. This will show the interface name.
NOTE: The Linux slip module hard-codes its MTU size to 296. So you
might as well set CONFIG_NET_BUFSIZE to 296 as well.
4. After turning over the line to the SLIP driver, you must configure
the network interface. Again, you do this using the standard
ifconfig and route commands. Assume that we have connected to a
host PC with address 192.168.0.101 from your target with address
10.0.0.2. On the Linux PC you would execute the following as root:
$ ifconfig sl0 10.0.0.2/24 up
Or maybe,
$ ifconfig sl0 10.0.0.1 pointopoint 10.0.0.2 up
$ route add 10.0.0.2 dev sl0
@ -835,6 +834,10 @@ Where <subdir> is one of the following:
$ tcpdump -n -nn -i sl0 -x -X -s 1500
NOTES: Only UART1 supports the hardware handshake. If hardware
handshake is not available, then you might try the slattach option
-L which is supposed to enable "3-wire operation."
thttpd:
This builds the THTTPD web server example using the THTTPD and
the examples/thttpd application.

View File

@ -552,7 +552,7 @@ CONFIG_NET_MULTIBUFFER=y
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=16
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFSIZE=420
CONFIG_NET_BUFSIZE=296
CONFIG_NET_TCP=y
CONFIG_NET_TCP_CONNS=16
CONFIG_NET_NTCP_READAHEAD_BUFFERS=8

View File

@ -67,6 +67,11 @@
* Pre-processor Definitions
****************************************************************************/
/* NOTE: Slip requires UART hardware handshake. If hardware handshake is
* not available with your UART, then you might try the 'slattach' option
* -L which is supposed to enable "3-wire operation."
*/
/* Configuration ************************************************************/
#if UIP_LLH_LEN > 0
@ -85,6 +90,14 @@
# define CONFIG_SLIP_DEFPRIO 128
#endif
/* The Linux slip module hard-codes its MTU size to 296. So you
might as well set CONFIG_NET_BUFSIZE to 296 as well.
#if CONFIG_NET_BUFSIZE < 296
# error "CONFIG_NET_BUFSIZE >= 296 is required"
#elif CONFIG_NET_BUFSIZE > 296
# warning "CONFIG_NET_BUFSIZE == 296 is optimal"
#endif
/* SLIP special character codes *******************************************/
#define SLIP_END 0300 /* Indicates end of packet */