SAMV71-XULT: Add a network-enabled NSH configuration
This commit is contained in:
parent
e57bb047c8
commit
2108499b4f
@ -87,9 +87,15 @@ The BASIC nsh configuration is fully function (as desribed below under
|
||||
Many drivers will port easily from either the SAM3/4 or from the SAMA5Dx.
|
||||
So there is still plenty to be done.
|
||||
|
||||
6. There has been a quick'n'dirty port of the SAMA5D4-EK Ethernet logic
|
||||
for the SAMV71-XULT. It does not work properly. Data on the line
|
||||
appears to be corrupted, probably at the level of the PHY.
|
||||
6. There is a port of the SAMA5D4-EK Ethernet driver to the SAMV71-XULT.
|
||||
Some basic functionality is present, but there are issues:
|
||||
|
||||
- There is a compiler optimization problem. At -O2, there is odd
|
||||
behavior on pings and ARP messages. But the behavior is OK with
|
||||
optimization disabled. This is clearly a compiler issue, but I
|
||||
will need eventually to find something better than -O0.
|
||||
- The driver has not been tested with I- and D-Caches enabled. There
|
||||
are likely issues in that configuration.
|
||||
|
||||
7. The USBHS device controller driver (DCD) is complete but non-functional.
|
||||
At this point, work has stopped because I am stuck. The problem is that
|
||||
@ -103,6 +109,8 @@ The BASIC nsh configuration is fully function (as desribed below under
|
||||
sample code and study of the data sheet, but I have not found the key to
|
||||
solving this.
|
||||
|
||||
- Could this be a compiler issue????
|
||||
|
||||
Serial Console
|
||||
==============
|
||||
|
||||
@ -755,7 +763,103 @@ Configuration sub-directories
|
||||
|
||||
nsh:
|
||||
|
||||
Configures the NuttShell (nsh) located at examples/nsh.
|
||||
Configures the NuttShell (nsh) located at examples/nsh. There are two
|
||||
NSH configurations:
|
||||
|
||||
- nsh. This configuration is focused on low level, command-line
|
||||
driver testing. It has not network.
|
||||
- netnsh. This configuration is focused on network testing and
|
||||
has only limited command support.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. The serial console is configured by default for use with and Arduino
|
||||
serial shield (UART3). You will need to reconfigure if you will
|
||||
to use a different U[S]ART.
|
||||
|
||||
2. Default stack sizes are large and should really be tuned to reduce
|
||||
the RAM footprint:
|
||||
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_IDLETHREAD_STACKSIZE=1024
|
||||
CONFIG_USERMAIN_STACKSIZE=2048
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=2048
|
||||
... and others ...
|
||||
|
||||
3. NSH built-in applications are supported.
|
||||
|
||||
Binary Formats:
|
||||
CONFIG_BUILTIN=y : Enable support for built-in programs
|
||||
|
||||
Application Configuration:
|
||||
CONFIG_NSH_BUILTIN_APPS=y : Enable starting apps from NSH command line
|
||||
|
||||
4. The network initialization thread is NOT enabled in this configuration.
|
||||
As a result, networking initialization is performed serially with
|
||||
NSH bring-up. The time from reset to the NSH prompt will be determined
|
||||
primarily by this network initialization time. And can be especially
|
||||
long, perhaps minutes, if the network cable is not connected!
|
||||
|
||||
If fast boot times are required, you need to perform asynchronous
|
||||
network initializatino as described about under "Network Initialization
|
||||
Thread"
|
||||
|
||||
5. SDRAM is NOT enabled in this configuration.
|
||||
|
||||
6. TWI/I2C
|
||||
|
||||
TWIHS0 is enabled in this configuration. The SAM V71 Xplained Ultra
|
||||
supports two devices on the one on-board I2C device on the TWIHS0 bus:
|
||||
(1) The AT24MAC402 serial EEPROM described above and (2) the Wolfson
|
||||
WM8904 audio CODEC. This device contains a MAC address for use with
|
||||
the Ethernet interface.
|
||||
|
||||
Relevant configuration settings:
|
||||
|
||||
CONFIG_SAMV7_TWIHS0=y
|
||||
CONFIG_SAMV7_TWIHS0_FREQUENCY=100000
|
||||
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_TRANSFER=y
|
||||
|
||||
7. TWIHS0 is used to support 256 byte non-volatile storage. This EEPROM
|
||||
holds the assigned MAC address which is necessary for networking. The
|
||||
EEPROM is also avaiable for storage of configuration data using the
|
||||
MTD configuration as described above under the heading, "MTD
|
||||
Configuration Data".
|
||||
|
||||
8. Support for HSMCI is built-in by default. The SAMV71-XULT provides
|
||||
one full-size SD memory card slot. Refer to the section entitled
|
||||
"SD card" for configuration-related information.
|
||||
|
||||
See "Open Issues" above for issues related to HSMCI.
|
||||
|
||||
The auto-mounter is not enabled. See the section above entitled
|
||||
"Auto-Mounter".
|
||||
|
||||
9. Performance-related Configuration settings:
|
||||
|
||||
CONFIG_ARMV7M_ICACHE=y : Instruction cache is enabled
|
||||
CONFIG_ARMV7M_DCACHE=y : Data cache is enabled
|
||||
CONFIG_ARCH_FPU=y : H/W floating point support is enabled
|
||||
CONFIG_ARCH_DPFPU=y : 64-bit H/W floating point support is enabled
|
||||
|
||||
# CONFIG_ARMV7M_ITCM is not set : Support not yet in place
|
||||
# CONFIG_ARMV7M_DTCM is not set : Support not yet in place
|
||||
|
||||
Stack sizes are also large to simplify the bring-up and should be
|
||||
tuned for better memory usages.
|
||||
|
||||
nsh:
|
||||
|
||||
Configures the NuttShell (nsh) located at examples/nsh. There are two
|
||||
NSH configurations:
|
||||
|
||||
- nsh. This configuration is focused on low level, command-line
|
||||
driver testing. It has not network.
|
||||
- netnsh. This configuration is focused on network testing and
|
||||
has only limited command support.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. The serial console is configured by default for use with and Arduino
|
||||
|
116
configs/samv71-xult/netnsh/Make.defs
Normal file
116
configs/samv71-xult/netnsh/Make.defs
Normal file
@ -0,0 +1,116 @@
|
||||
############################################################################
|
||||
# configs/samv71-xult/netnsh/Make.defs
|
||||
#
|
||||
# Copyright (C) 2015 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
|
||||
|
||||
ifeq ($(CONFIG_ARMV7M_DTCM),y)
|
||||
LDSCRIPT = flash-dtcm.ld
|
||||
else
|
||||
LDSCRIPT = flash-sram.ld
|
||||
endif
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mknulldeps.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.sh
|
||||
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)
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -fno-strict-aliasing
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
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-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
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 -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
1258
configs/samv71-xult/netnsh/defconfig
Normal file
1258
configs/samv71-xult/netnsh/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
77
configs/samv71-xult/netnsh/setenv.sh
Executable file
77
configs/samv71-xult/netnsh/setenv.sh
Executable file
@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
# configs/sam4e-ek/netnsh/Make.defs
|
||||
#
|
||||
# Copyright (C) 2015 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.
|
||||
#
|
||||
|
||||
if [ "$_" = "$0" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WD=`pwd`
|
||||
if [ ! -x "setenv.sh" ]; then
|
||||
echo "This script must be executed from the top-level NuttX build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${PATH_ORIG}" ]; then
|
||||
export PATH_ORIG="${PATH}"
|
||||
fi
|
||||
|
||||
# This is the Cygwin path to the location where I installed the Atmel GCC
|
||||
# toolchain under Windows. You will also have to edit this if you install
|
||||
# this toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I installed the CodeSourcery
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the CodeSourcery toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors"
|
||||
# You can this free toolchain here https://launchpad.net/gcc-arm-embedded
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2014q4/bin"
|
||||
|
||||
# This is the path to the location where I installed the devkitARM toolchain
|
||||
# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I build the buildroot
|
||||
# toolchain.
|
||||
# export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
|
||||
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
Loading…
Reference in New Issue
Block a user