configs/same70-xplained: Added a network enabled NSH configuration
This commit is contained in:
parent
2e3f1327bd
commit
2e78fc7178
@ -29,10 +29,6 @@ Status/Open Issues
|
|||||||
via the EDBG VCOM and LED and buttons support. SDRAM and the HSMCI
|
via the EDBG VCOM and LED and buttons support. SDRAM and the HSMCI
|
||||||
SD card slot also appear to be fully functional.
|
SD card slot also appear to be fully functional.
|
||||||
|
|
||||||
WARNING: This README derives heavily from the SAMV71-XULT README file and
|
|
||||||
may still contain some logic that pertains only to that board. This is a
|
|
||||||
work in progress
|
|
||||||
|
|
||||||
See also configs/samv71-xult/README.txt
|
See also configs/samv71-xult/README.txt
|
||||||
|
|
||||||
Serial Console
|
Serial Console
|
||||||
@ -927,99 +923,11 @@ NOTES:
|
|||||||
Configuration sub-directories
|
Configuration sub-directories
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
knsh:
|
|
||||||
|
|
||||||
This is identical to the nsh configuration below except that NuttX
|
|
||||||
is built as a kernel-mode, monolithic module and the user applications
|
|
||||||
are built separately. There are three very similar NSH configurations:
|
|
||||||
|
|
||||||
- knsh. This is a somewhat simplified version of the nsh configuration
|
|
||||||
that builds using the protected build mode (CONFIG_BUILD_PROTECTED=y).
|
|
||||||
- nsh. This configuration is focused on low level, command-line
|
|
||||||
driver testing. It has no network.
|
|
||||||
- netnsh. This configuration is focused on network testing and
|
|
||||||
has only limited command support.
|
|
||||||
|
|
||||||
It is recommends to use a special make command; not just 'make' but make
|
|
||||||
with the following two arguments:
|
|
||||||
|
|
||||||
make pass1 pass2
|
|
||||||
|
|
||||||
In the normal case (just 'make'), make will attempt to build both user-
|
|
||||||
and kernel-mode blobs more or less interleaved. This actual works!
|
|
||||||
However, for me it is very confusing so I prefer the above make command:
|
|
||||||
Make the user-space binaries first (pass1), then make the kernel-space
|
|
||||||
binaries (pass2)
|
|
||||||
|
|
||||||
NOTES:
|
|
||||||
|
|
||||||
1. At the end of the build, there will be several files in the top-level
|
|
||||||
NuttX build directory:
|
|
||||||
|
|
||||||
PASS1:
|
|
||||||
nuttx_user.elf - The pass1 user-space ELF file
|
|
||||||
nuttx_user.hex - The pass1 Intel HEX format file (selected in defconfig)
|
|
||||||
User.map - Symbols in the user-space ELF file
|
|
||||||
|
|
||||||
PASS2:
|
|
||||||
nuttx - The pass2 kernel-space ELF file
|
|
||||||
nuttx.hex - The pass2 Intel HEX file (selected in defconfig)
|
|
||||||
System.map - Symbols in the kernel-space ELF file
|
|
||||||
|
|
||||||
The J-Link programmer will except files in .hex, .mot, .srec, and .bin
|
|
||||||
formats.
|
|
||||||
|
|
||||||
2. Combining .hex files. If you plan to use the .hex files with your
|
|
||||||
debugger or FLASH utility, then you may need to combine the two hex
|
|
||||||
files into a single .hex file. Here is how you can do that.
|
|
||||||
|
|
||||||
a. The 'tail' of the nuttx.hex file should look something like this
|
|
||||||
(with my comments added):
|
|
||||||
|
|
||||||
$ tail nuttx.hex
|
|
||||||
# 00, data records
|
|
||||||
...
|
|
||||||
:10 9DC0 00 01000000000800006400020100001F0004
|
|
||||||
:10 9DD0 00 3B005A0078009700B500D400F300110151
|
|
||||||
:08 9DE0 00 30014E016D0100008D
|
|
||||||
# 05, Start Linear Address Record
|
|
||||||
:04 0000 05 0800 0419 D2
|
|
||||||
# 01, End Of File record
|
|
||||||
:00 0000 01 FF
|
|
||||||
|
|
||||||
Use an editor such as vi to remove the 05 and 01 records.
|
|
||||||
|
|
||||||
b. The 'head' of the nuttx_user.hex file should look something like
|
|
||||||
this (again with my comments added):
|
|
||||||
|
|
||||||
$ head nuttx_user.hex
|
|
||||||
# 04, Extended Linear Address Record
|
|
||||||
:02 0000 04 0801 F1
|
|
||||||
# 00, data records
|
|
||||||
:10 8000 00 BD89 01084C800108C8110208D01102087E
|
|
||||||
:10 8010 00 0010 00201C1000201C1000203C16002026
|
|
||||||
:10 8020 00 4D80 01085D80010869800108ED83010829
|
|
||||||
...
|
|
||||||
|
|
||||||
Nothing needs to be done here. The nuttx_user.hex file should
|
|
||||||
be fine.
|
|
||||||
|
|
||||||
c. Combine the edited nuttx.hex and un-edited nuttx_user.hex
|
|
||||||
file to produce a single combined hex file:
|
|
||||||
|
|
||||||
$ cat nuttx.hex nuttx_user.hex >combined.hex
|
|
||||||
|
|
||||||
Then use the combined.hex file with the to write the FLASH image.
|
|
||||||
If you do this a lot, you will probably want to invest a little time
|
|
||||||
to develop a tool to automate these steps.
|
|
||||||
|
|
||||||
netnsh:
|
netnsh:
|
||||||
|
|
||||||
Configures the NuttShell (nsh) located at examples/nsh. There are three
|
Configures the NuttShell (nsh) located at examples/nsh. There are two
|
||||||
very similar NSH configurations:
|
very similar NSH configurations:
|
||||||
|
|
||||||
- knsh. This is a somewhat simplified version of the nsh configuration
|
|
||||||
that builds using the protected build mode (CONFIG_BUILD_PROTECTED=y).
|
|
||||||
- nsh. This configuration is focused on low level, command-line
|
- nsh. This configuration is focused on low level, command-line
|
||||||
driver testing. It has no network.
|
driver testing. It has no network.
|
||||||
- netnsh. This configuration is focused on network testing and
|
- netnsh. This configuration is focused on network testing and
|
||||||
@ -1027,9 +935,9 @@ Configuration sub-directories
|
|||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
|
||||||
1. The serial console is configured by default for use with and Arduino
|
1. The serial console is configured by default for use with the EDBG VCOM
|
||||||
serial shield (UART3). You will need to reconfigure if you will
|
(USART1). You will need to reconfigure if you will to use a different
|
||||||
to use a different U[S]ART.
|
U[S]ART.
|
||||||
|
|
||||||
2. Default stack sizes are large and should really be tuned to reduce
|
2. Default stack sizes are large and should really be tuned to reduce
|
||||||
the RAM footprint:
|
the RAM footprint:
|
||||||
@ -1122,11 +1030,9 @@ Configuration sub-directories
|
|||||||
|
|
||||||
nsh:
|
nsh:
|
||||||
|
|
||||||
Configures the NuttShell (nsh) located at examples/nsh. There are three
|
Configures the NuttShell (nsh) located at examples/nsh. There are two
|
||||||
very similar NSH configurations:
|
very similar NSH configurations:
|
||||||
|
|
||||||
- knsh. This is a somewhat simplified version of the nsh configuration
|
|
||||||
that builds using the protected build mode (CONFIG_BUILD_PROTECTED=y).
|
|
||||||
- nsh. This configuration is focused on low level, command-line
|
- nsh. This configuration is focused on low level, command-line
|
||||||
driver testing. It has no network.
|
driver testing. It has no network.
|
||||||
- netnsh. This configuration is focused on network testing and
|
- netnsh. This configuration is focused on network testing and
|
||||||
|
117
configs/same70-xplained/netnsh/Make.defs
Normal file
117
configs/same70-xplained/netnsh/Make.defs
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/same70-xplained/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 -Wundef -fno-strict-aliasing
|
||||||
|
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-pcrel.ld -no-check-sections
|
||||||
|
LDNXFLATFLAGS = -e main -s 2048
|
||||||
|
|
||||||
|
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 =
|
||||||
|
|
1251
configs/same70-xplained/netnsh/defconfig
Normal file
1251
configs/same70-xplained/netnsh/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
77
configs/same70-xplained/netnsh/setenv.sh
Normal file
77
configs/same70-xplained/netnsh/setenv.sh
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# configs/samv7-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.
|
||||||
|
#
|
||||||
|
|
||||||
|
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 2015q2/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}/../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}"
|
@ -137,10 +137,6 @@ void weak_function sam_netinitialize(void)
|
|||||||
phydbg("Configuring %08x\n", GPIO_EMAC0_INT);
|
phydbg("Configuring %08x\n", GPIO_EMAC0_INT);
|
||||||
sam_configgpio(GPIO_EMAC0_INT);
|
sam_configgpio(GPIO_EMAC0_INT);
|
||||||
|
|
||||||
/* Configure the PHY SIGDET input */
|
|
||||||
|
|
||||||
sam_configgpio(GPIO_EMAC0_SIGDET);
|
|
||||||
|
|
||||||
/* Configure PHY /RESET output */
|
/* Configure PHY /RESET output */
|
||||||
|
|
||||||
sam_configgpio(GPIO_EMAC0_RESET);
|
sam_configgpio(GPIO_EMAC0_RESET);
|
||||||
|
@ -818,7 +818,7 @@ CONFIG_NET_STATISTICS=y
|
|||||||
# Routing Table Configuration
|
# Routing Table Configuration
|
||||||
#
|
#
|
||||||
# CONFIG_NET_ROUTE is not set
|
# CONFIG_NET_ROUTE is not set
|
||||||
CONFIG_NET_HOSTNAME=""
|
CONFIG_NET_HOSTNAME="SAMV71-XULT"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Crypto API
|
# Crypto API
|
||||||
|
Loading…
Reference in New Issue
Block a user