Clicker2-STM32 + net/: Add configurations to support the endpoint and hub roles in a star topology. Fix various things that broke when IPv6 forwarding was enabled.
This commit is contained in:
parent
a93f130002
commit
6d8df90b79
@ -380,7 +380,10 @@ Configurations
|
||||
|
||||
NOTES:
|
||||
|
||||
1. This configuration differs from the mrf24j40-mac configuration in
|
||||
1. You must must have two clicker2-stm32 boards each with an MRF24J40
|
||||
click board in order to run these tests.
|
||||
|
||||
2. This configuration differs from the mrf24j40-mac configuration in
|
||||
that this configuration, like the usbnsh configuration, uses a USB
|
||||
serial device for console I/O. Such a configuration is useful on the
|
||||
Clicker2 STM32 which has no builtin RS-232 drivers and eliminates the
|
||||
@ -390,14 +393,14 @@ Configurations
|
||||
differences between the usbnsh or mrf24j40-mac configurations and this
|
||||
configuration are listed in these NOTES.
|
||||
|
||||
2. On most serial terminal programs that I have used, the USB
|
||||
3. On most serial terminal programs that I have used, the USB
|
||||
connection will be lost when the target board is reset. When that
|
||||
happens, you may have to reset your serial terminal program to adapt
|
||||
to the new USB connection. Using TeraTerm, I actually have to exit
|
||||
the serial program and restart it in order to detect and select the
|
||||
re-established USB serial connection.
|
||||
|
||||
3. This configuration does NOT have USART3 output enabled. This
|
||||
4. This configuration does NOT have USART3 output enabled. This
|
||||
configuration supports logging of debug output to a circular
|
||||
buffer in RAM. This feature is discussed fully in this Wiki page:
|
||||
http://nuttx.org/doku.php?id=wiki:howtos:syslog . Relevant
|
||||
@ -426,17 +429,17 @@ Configurations
|
||||
the system has crashed because (a) it will be unresponsive and (b)
|
||||
the LD2 will be blinking at about 2Hz.
|
||||
|
||||
4. IPv6 networking is enabled with TCP/IP, UDP, 6LoWPAN, and NSH
|
||||
5. IPv6 networking is enabled with TCP/IP, UDP, 6LoWPAN, and NSH
|
||||
Telnet support.
|
||||
|
||||
5. Configuration instructions: Basic PAN configuration is the same as
|
||||
6. Configuration instructions: Basic PAN configuration is the same as
|
||||
for the ieee802154-mac configuration with the exception that after
|
||||
the PAN has been configured with the i8sak utility, you must
|
||||
explicity bring the network up on each node:
|
||||
|
||||
nsh> ifup wpan0
|
||||
|
||||
6. examples/udp is enabled. This will allow two MRF24J40 nodes to
|
||||
7. examples/udp is enabled. This will allow two MRF24J40 nodes to
|
||||
exchange UDP packets. Basic instructions:
|
||||
|
||||
On the server node:
|
||||
@ -464,9 +467,11 @@ Configurations
|
||||
E: nsh> ifup wpan0
|
||||
C: nsh> udpserver &
|
||||
E: nsh> udpclient <server-ip> &
|
||||
E: nsh> dmesg
|
||||
|
||||
6. examples/nettest is enabled. This will allow two MRF24J40 nodes to
|
||||
The nsh> dmesg command can be use at any time on any node to see
|
||||
any debug output that you have selected.
|
||||
|
||||
8. examples/nettest is enabled. This will allow two MRF24J40 nodes to
|
||||
exchange TCP packets. Basic instructions:
|
||||
|
||||
On the server node:
|
||||
@ -494,9 +499,11 @@ Configurations
|
||||
E: nsh> ifup wpan0
|
||||
C: nsh> tcpserver &
|
||||
E: nsh> tcpclient <server-ip> &
|
||||
E: nsh> dmesg
|
||||
|
||||
7. The NSH Telnet deamon (server) is enabled. However, it cannot be
|
||||
The nsh> dmesg command can be use at any time on any node to see
|
||||
any debug output that you have selected.
|
||||
|
||||
9. The NSH Telnet deamon (server) is enabled. However, it cannot be
|
||||
started automatically. Rather, it must be started AFTER the network
|
||||
has been brought up using the NSH 'telnetd' command. You would want
|
||||
to start the Telent daemon only if you want the node to serve Telent
|
||||
@ -509,7 +516,7 @@ Configurations
|
||||
This is necessary because the IP address is assigned by the the
|
||||
Coordinator and may not be known a priori.
|
||||
|
||||
8. This configuration also includes the Telnet client program. This
|
||||
10. This configuration also includes the Telnet client program. This
|
||||
will allow you to execute a NSH one a node from the command line on
|
||||
a different node. Like:
|
||||
|
||||
@ -580,6 +587,80 @@ Configurations
|
||||
potentially be verifying only that the design is implemented
|
||||
incorrectly in compatible way on both the client and server sides.
|
||||
|
||||
mrf24j40-starhub and mrf24j40-starpoint
|
||||
|
||||
These two configurations implement hub and and star endpoint in a
|
||||
star topology. Both configurations derive from the mrf24j40-6lowpan
|
||||
configuration and most of the notes there apply here as well.
|
||||
|
||||
1. You must must have three clicker2-stm32 boards each with an MRF24J40
|
||||
click board in order to run these tests: One that servers as the
|
||||
star hub and at least two star endpoints.
|
||||
|
||||
2. The star point configuration differs from the primarily in the
|
||||
mrf24j40-6lowpan in following is also set:
|
||||
|
||||
CONFIG_NET_STAR=y
|
||||
CONFIG_NET_STARPOINT=y
|
||||
|
||||
The CONFIG_NET_STARPOINT selection informs the endpoint that is
|
||||
must send all frames to the hub of the star, rather than directly
|
||||
to the recipient.
|
||||
|
||||
The star hub configuration, on the other hand, differs from the
|
||||
mrf24j40-6lowpan in these fundamental ways:
|
||||
|
||||
CONFIG_NET_STAR=y
|
||||
CONFIG_NET_STARHUB=y
|
||||
CONFIG_NET_IPFORWARD=y
|
||||
|
||||
The CONFIG_NET_IPFORWARD selection informs the hub that if it
|
||||
receives any packets that are not destined for the hub, it should
|
||||
forward those packets appropriately.
|
||||
|
||||
3. Telnet: The star point configuration supports the Telnet daemon,
|
||||
but not the Telnet client; the star hub configuration supports
|
||||
the Telnet client, but not the Telnet daemon. Therefore, the
|
||||
star hub can Telnet to any point in the star, the star endpoints
|
||||
cannot initiate telnet sessions.
|
||||
|
||||
4. TCP and UDP Tests: The same TCP and UDP tests as described for
|
||||
the mrf24j40-6lowpan coniguration are supported on the star
|
||||
endpoints, but NOT on the star hub. Therefore, all network testing
|
||||
is between endpoints with the hub acting, well, only like a hub.
|
||||
|
||||
The modified usage of the TCP test is show below with E1 E2
|
||||
representing the two star endpoints and C: representing the
|
||||
coordinator/hub.
|
||||
|
||||
C: nsh> i8 /dev/ieee0 startpan
|
||||
C: nsh> 8 acceptassoc
|
||||
E1: nsh> i8 assoc
|
||||
E2: nsh> i8 assoc
|
||||
C: nsh> ifup wpan0
|
||||
E1: nsh> ifup wpan0
|
||||
E1: nsh> ifconfig <-- To get the IP address of E1 endpoint
|
||||
E1: nsh> telnetd <-- Starts the Telnet daemon
|
||||
E2: nsh> ifup wpan0
|
||||
E2: nsh> ifconfig <-- To get the IP address of E2 endpoint
|
||||
E2: nsh> telnetd <-- Starts the Telnet daemon
|
||||
E1: nsh> tcpserver &
|
||||
E2: nsh> tcpclient <server-ip> &
|
||||
|
||||
Where <server-ip> is the IP address of the E1 endpoint.
|
||||
|
||||
The nsh> dmesg command can be use at any time on any node to see
|
||||
any debug output that you have selected.
|
||||
|
||||
Telenet sessions may be initiated from the hub:
|
||||
|
||||
C: nsh> telnet <server-ip> <-- Runs the Telnet client
|
||||
|
||||
Where <server-ip> is the IP address of either the E1 or I2 endpoints.
|
||||
|
||||
STATUS:
|
||||
2017-06-29: Configurations added but not yet tested.
|
||||
|
||||
nsh:
|
||||
|
||||
Configures the NuttShell (nsh) located at examples/nsh. This
|
||||
|
@ -992,6 +992,9 @@ CONFIG_NET_6LOWPAN_MAXAGE=20
|
||||
CONFIG_NET_6LOWPAN_MAX_MACTRANSMITS=4
|
||||
CONFIG_NET_6LOWPAN_MTU=1294
|
||||
CONFIG_NET_6LOWPAN_TCP_RECVWNDO=1220
|
||||
CONFIG_NET_HAVE_STAR=y
|
||||
# CONFIG_NET_IPFORWARD is not set
|
||||
# CONFIG_NET_STAR is not set
|
||||
|
||||
#
|
||||
# Socket Support
|
||||
|
122
configs/clicker2-stm32/mrf24j40-starhub/Make.defs
Normal file
122
configs/clicker2-stm32/mrf24j40-starhub/Make.defs
Normal file
@ -0,0 +1,122 @@
|
||||
############################################################################
|
||||
# configs/clicker2-stm32/mrf24j40-starhub/Make.defs
|
||||
#
|
||||
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
|
||||
|
||||
LDSCRIPT = flash.ld
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
|
||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(CROSSDEV)ar rcs
|
||||
NM = $(CROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHDEFINES =
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
CMODULEFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
|
||||
|
||||
LDMODULEFLAGS = -r -e module_initialize
|
||||
ifeq ($(WINTOOL),y)
|
||||
LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libc/modlib/gnu-elf.ld}"
|
||||
else
|
||||
LDMODULEFLAGS += -T $(TOPDIR)/libc/modlib/gnu-elf.ld
|
||||
endif
|
||||
|
||||
ASMEXT = .S
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||
HOSTLDFLAGS =
|
1594
configs/clicker2-stm32/mrf24j40-starhub/defconfig
Normal file
1594
configs/clicker2-stm32/mrf24j40-starhub/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
122
configs/clicker2-stm32/mrf24j40-starpoint/Make.defs
Normal file
122
configs/clicker2-stm32/mrf24j40-starpoint/Make.defs
Normal file
@ -0,0 +1,122 @@
|
||||
############################################################################
|
||||
# configs/clicker2-stm32/mrf24j40-starpoint/Make.defs
|
||||
#
|
||||
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
|
||||
|
||||
LDSCRIPT = flash.ld
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
|
||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(CROSSDEV)ar rcs
|
||||
NM = $(CROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHDEFINES =
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
CMODULEFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
|
||||
|
||||
LDMODULEFLAGS = -r -e module_initialize
|
||||
ifeq ($(WINTOOL),y)
|
||||
LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libc/modlib/gnu-elf.ld}"
|
||||
else
|
||||
LDMODULEFLAGS += -T $(TOPDIR)/libc/modlib/gnu-elf.ld
|
||||
endif
|
||||
|
||||
ASMEXT = .S
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||
HOSTLDFLAGS =
|
1654
configs/clicker2-stm32/mrf24j40-starpoint/defconfig
Normal file
1654
configs/clicker2-stm32/mrf24j40-starpoint/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -556,6 +556,9 @@ CONFIG_NET_6LOWPAN_MAXAGE=20
|
||||
CONFIG_NET_6LOWPAN_MAX_MACTRANSMITS=4
|
||||
CONFIG_NET_6LOWPAN_MTU=1294
|
||||
CONFIG_NET_6LOWPAN_TCP_RECVWNDO=102
|
||||
CONFIG_NET_HAVE_STAR=y
|
||||
# CONFIG_NET_IPFORWARD is not set
|
||||
# CONFIG_NET_STAR is not set
|
||||
|
||||
#
|
||||
# Socket Support
|
||||
@ -713,6 +716,7 @@ CONFIG_IEEE802154_DEFAULT_EADDR=0x00fade00deadbeef
|
||||
CONFIG_MAC802154_HPWORK=y
|
||||
CONFIG_MAC802154_NTXDESC=3
|
||||
CONFIG_MAC802154_NNOTIF=3
|
||||
CONFIG_MAC802154_NPANDESC=5
|
||||
CONFIG_IEEE802154_IND_PREALLOC=20
|
||||
CONFIG_IEEE802154_IND_IRQRESERVE=10
|
||||
# CONFIG_IEEE802154_MACDEV is not set
|
||||
@ -894,6 +898,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=2048
|
||||
# CONFIG_EXAMPLES_MODBUS is not set
|
||||
# CONFIG_EXAMPLES_MOUNT is not set
|
||||
CONFIG_EXAMPLES_NETTEST=y
|
||||
CONFIG_EXAMPLES_NETTEST_SENDSIZE=4096
|
||||
CONFIG_EXAMPLES_NETTEST_STACKSIZE1=4096
|
||||
CONFIG_EXAMPLES_NETTEST_PRIORITY1=100
|
||||
CONFIG_EXAMPLES_NETTEST_LOOPBACK=y
|
||||
@ -1028,6 +1033,7 @@ CONFIG_NETUTILS_NETLIB=y
|
||||
# CONFIG_NETUTILS_NTPCLIENT is not set
|
||||
# CONFIG_NETUTILS_PPPD is not set
|
||||
# CONFIG_NETUTILS_SMTP is not set
|
||||
# CONFIG_NETUTILS_TELNETC is not set
|
||||
# CONFIG_NETUTILS_TELNETD is not set
|
||||
# CONFIG_NETUTILS_TFTPC is not set
|
||||
# CONFIG_NETUTILS_WEBCLIENT is not set
|
||||
@ -1103,6 +1109,7 @@ CONFIG_NSH_DISABLE_SHUTDOWN=y
|
||||
# CONFIG_NSH_DISABLE_SLEEP is not set
|
||||
# CONFIG_NSH_DISABLE_TIME is not set
|
||||
# CONFIG_NSH_DISABLE_TEST is not set
|
||||
# CONFIG_NSH_DISABLE_TELNETD is not set
|
||||
# CONFIG_NSH_DISABLE_UMOUNT is not set
|
||||
# CONFIG_NSH_DISABLE_UNAME is not set
|
||||
# CONFIG_NSH_DISABLE_UNSET is not set
|
||||
|
88
net/Kconfig
88
net/Kconfig
@ -285,15 +285,6 @@ menuconfig NET_IPv6
|
||||
source "net/neighbor/Kconfig"
|
||||
source "net/sixlowpan/Kconfig"
|
||||
|
||||
endmenu # Internet Protocol Selection
|
||||
|
||||
config NET_HAVE_STAR
|
||||
bool
|
||||
default n
|
||||
---help---
|
||||
Automatically enabled if at least one selected L2 protocol supports
|
||||
a STAR topology.
|
||||
|
||||
config NET_IPFORWARD
|
||||
bool "Enable L2 forwarding"
|
||||
default n
|
||||
@ -308,38 +299,7 @@ config NET_IPFORWARD
|
||||
reason why IPv4 forwarding has not been implemented, it just has
|
||||
not yet been done.
|
||||
|
||||
config NET_STAR
|
||||
bool "Enable star topology"
|
||||
default n
|
||||
depends on NET_HAVE_STAR && NET_IPv6
|
||||
---help---
|
||||
Enable support for a star network topology.
|
||||
|
||||
NOTE: Currently only supported by 6LoWPAN.
|
||||
NOTE: L2 forwarding only supported for IPv6.
|
||||
|
||||
choice
|
||||
prompt "Node role"
|
||||
depends on NET_STARTOPOLOGY
|
||||
default NET_STARTPOINT
|
||||
---help---
|
||||
Specifies the role of this not in the star configuration.
|
||||
|
||||
config NET_STARPOINT
|
||||
bool "Point node in star"
|
||||
---help---
|
||||
The node is a "point" in the star configuration and must send all
|
||||
packets to the star hub node.
|
||||
|
||||
config NET_STARHUB
|
||||
bool "Hub node of star"
|
||||
select NET_IPFORWARD
|
||||
---help---
|
||||
This is the "hub" node in the star configurations. It will receive
|
||||
packets packets from all "point" nodes and perform L2 forwarding of
|
||||
the packets that are not destined for this node.
|
||||
|
||||
endchoice # Node role
|
||||
endmenu # Internet Protocol Selection
|
||||
|
||||
source "net/socket/Kconfig"
|
||||
source "net/pkt/Kconfig"
|
||||
@ -361,10 +321,54 @@ config NET_STATISTICS
|
||||
---help---
|
||||
Network layer statistics on or off
|
||||
|
||||
config NET_HAVE_STAR
|
||||
bool
|
||||
default n
|
||||
---help---
|
||||
Automatically enabled if at least one selected L2 protocol supports
|
||||
a STAR topology. In order to support the star topology, the L2
|
||||
protocol must support relaying all packets to a well-known hub node.
|
||||
|
||||
menu "Network Topologies"
|
||||
|
||||
config NET_STAR
|
||||
bool "Enable star topology"
|
||||
default n
|
||||
depends on NET_HAVE_STAR && NET_IPv6
|
||||
---help---
|
||||
Enable support for a star network topology.
|
||||
|
||||
NOTE: Currently only supported by 6LoWPAN.
|
||||
NOTE: L2 forwarding only supported for IPv6.
|
||||
|
||||
choice
|
||||
prompt "Node role"
|
||||
depends on NET_STAR
|
||||
default NET_STARPOINT
|
||||
---help---
|
||||
Specifies the role of this not in the star configuration.
|
||||
|
||||
config NET_STARPOINT
|
||||
bool "Point node in star"
|
||||
---help---
|
||||
The node is a "point" in the star configuration and must send all
|
||||
packets to the star hub node.
|
||||
|
||||
config NET_STARHUB
|
||||
bool "Hub node of star"
|
||||
select NET_IPFORWARD
|
||||
---help---
|
||||
This is the "hub" node in the star configurations. It will receive
|
||||
packets packets from all "point" nodes and perform L2 forwarding of
|
||||
the packets that are not destined for this node.
|
||||
|
||||
endchoice # Node role
|
||||
endmenu # Network Topologies
|
||||
|
||||
source "net/route/Kconfig"
|
||||
|
||||
config NET_HOSTNAME
|
||||
string "Host name for current machine"
|
||||
string "Host name for this device"
|
||||
default ""
|
||||
---help---
|
||||
A unique name to identify device on the network
|
||||
|
@ -39,8 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/net/netdev.h>
|
||||
#include <nuttx/net/netstats.h>
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "sixlowpan/sixlowpan.h"
|
||||
#include "devif/devif.h"
|
||||
|
||||
@ -85,8 +90,6 @@ static int ipv6_packet_conversion(FAR struct net_driver_s *dev,
|
||||
#ifdef CONFIG_NET_UDP
|
||||
if (ipv6->proto == IP_PROTO_UDP)
|
||||
{
|
||||
FAR struct ipv6_hdr_s *ipv6 = (FAR struct ipv6_hdr_s *)dev->d_buf;
|
||||
|
||||
/* Let 6LoWPAN convert IPv6 UDP output into IEEE802.15.4 frames. */
|
||||
|
||||
sixlowpan_udp_send(dev, fwddev, ipv6);
|
||||
|
@ -250,6 +250,9 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
FAR struct ipv6_hdr_s *ipv6 = IPv6BUF;
|
||||
uint16_t hdrlen;
|
||||
uint16_t pktlen;
|
||||
#ifdef CONFIG_NET_IPFORWARD
|
||||
int ret;
|
||||
#endif
|
||||
|
||||
/* This is where the input processing starts. */
|
||||
|
||||
@ -350,7 +353,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
#ifdef CONFIG_NET_IPFORWARD
|
||||
/* Not destined for us, try to forward the packet */
|
||||
|
||||
ret = ipv6forward(dev, ipv6);
|
||||
ret = ipv6_forward(dev, ipv6);
|
||||
if (ret >= 0)
|
||||
{
|
||||
/* The packet was forwarded. Return success; d_len will
|
||||
|
@ -472,12 +472,9 @@ void sixlowpan_udp_send(FAR struct net_driver_s *dev,
|
||||
|
||||
sixlowpan_addrfromip(ipv6udp->ipv6.destipaddr, &destmac);
|
||||
|
||||
/* Get the IPv6 + UDP combined header length. The size of the UDP
|
||||
* header is encoded in the top 4 bits of the udpoffset field (in
|
||||
* units of 32-bit words).
|
||||
*/
|
||||
/* Get the IPv6 + UDP combined header length. */
|
||||
|
||||
hdrlen = IPv6_HDRLEN + (((uint16_t)ipv6udp->udp.udpoffset >> 4) << 2);
|
||||
hdrlen = IPv6_HDRLEN + UDP_HDRLEN;
|
||||
|
||||
/* Drop the packet if the buffer length is less than this. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user