Add usbnsh config to Bambino 200E board
This commit is contained in:
parent
4043dd4aa0
commit
1b996f1c7c
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/lpc43xx/lpc43_uart.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -60,105 +60,88 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Select UART parameters for the selected console */
|
||||
#if defined HAVE_UART && defined HAVE_CONSOLE
|
||||
/* Select UART parameters for the selected console */
|
||||
|
||||
#if defined(CONFIG_USART0_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_USART0_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_USART0_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_USART0_BAUD
|
||||
# define CONSOLE_BITS CONFIG_USART0_BITS
|
||||
# define CONSOLE_PARITY CONFIG_USART0_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_USART0_2STOP
|
||||
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_UART1_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_UART1_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_UART1_BAUD
|
||||
# define CONSOLE_BITS CONFIG_UART1_BITS
|
||||
# define CONSOLE_PARITY CONFIG_UART1_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_UART1_2STOP
|
||||
#elif defined(CONFIG_USART2_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_USART2_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_USART2_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_USART2_BAUD
|
||||
# define CONSOLE_BITS CONFIG_USART2_BITS
|
||||
# define CONSOLE_PARITY CONFIG_USART2_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_USART2_2STOP
|
||||
#elif defined(CONFIG_USART3_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_USART3_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_USART3_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_USART3_BAUD
|
||||
# define CONSOLE_BITS CONFIG_USART3_BITS
|
||||
# define CONSOLE_PARITY CONFIG_USART3_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_USART3_2STOP
|
||||
#elif defined(HAVE_CONSOLE)
|
||||
# error "No CONFIG_UARTn_SERIAL_CONSOLE Setting"
|
||||
#endif
|
||||
# if defined(CONFIG_USART0_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_USART0_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_USART0_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_USART0_BAUD
|
||||
# define CONSOLE_BITS CONFIG_USART0_BITS
|
||||
# define CONSOLE_PARITY CONFIG_USART0_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_USART0_2STOP
|
||||
# elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_UART1_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_UART1_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_UART1_BAUD
|
||||
# define CONSOLE_BITS CONFIG_UART1_BITS
|
||||
# define CONSOLE_PARITY CONFIG_UART1_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_UART1_2STOP
|
||||
# elif defined(CONFIG_USART2_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_USART2_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_USART2_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_USART2_BAUD
|
||||
# define CONSOLE_BITS CONFIG_USART2_BITS
|
||||
# define CONSOLE_PARITY CONFIG_USART2_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_USART2_2STOP
|
||||
# elif defined(CONFIG_USART3_SERIAL_CONSOLE)
|
||||
# define CONSOLE_BASE LPC43_USART3_BASE
|
||||
# define CONSOLE_BASEFREQ BOARD_USART3_BASEFREQ
|
||||
# define CONSOLE_BAUD CONFIG_USART3_BAUD
|
||||
# define CONSOLE_BITS CONFIG_USART3_BITS
|
||||
# define CONSOLE_PARITY CONFIG_USART3_PARITY
|
||||
# define CONSOLE_2STOP CONFIG_USART3_2STOP
|
||||
# elif defined(HAVE_CONSOLE)
|
||||
# error "No CONFIG_UARTn_SERIAL_CONSOLE Setting"
|
||||
# endif
|
||||
|
||||
/* Get word length setting for the console */
|
||||
/* Get word length setting for the console */
|
||||
|
||||
#if CONSOLE_BITS == 5
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_5BIT
|
||||
#elif CONSOLE_BITS == 6
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_6BIT
|
||||
#elif CONSOLE_BITS == 7
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_7BIT
|
||||
#elif CONSOLE_BITS == 8
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_8BIT
|
||||
#elif defined(HAVE_CONSOLE)
|
||||
# error "Invalid CONFIG_UARTn_BITS setting for console "
|
||||
#endif
|
||||
# if CONSOLE_BITS == 5
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_5BIT
|
||||
# elif CONSOLE_BITS == 6
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_6BIT
|
||||
# elif CONSOLE_BITS == 7
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_7BIT
|
||||
# elif CONSOLE_BITS == 8
|
||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_8BIT
|
||||
# elif defined(HAVE_CONSOLE)
|
||||
# error "Invalid CONFIG_UARTn_BITS setting for console "
|
||||
# endif
|
||||
|
||||
/* Get parity setting for the console */
|
||||
/* Get parity setting for the console */
|
||||
|
||||
#if CONSOLE_PARITY == 0
|
||||
# define CONSOLE_LCR_PAR 0
|
||||
#elif CONSOLE_PARITY == 1
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_ODD)
|
||||
#elif CONSOLE_PARITY == 2
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_EVEN)
|
||||
#elif CONSOLE_PARITY == 3
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK1)
|
||||
#elif CONSOLE_PARITY == 4
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK0)
|
||||
#elif defined(HAVE_CONSOLE)
|
||||
# if CONSOLE_PARITY == 0
|
||||
# define CONSOLE_LCR_PAR 0
|
||||
# elif CONSOLE_PARITY == 1
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_ODD)
|
||||
# elif CONSOLE_PARITY == 2
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_EVEN)
|
||||
# elif CONSOLE_PARITY == 3
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK1)
|
||||
# elif CONSOLE_PARITY == 4
|
||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK0)
|
||||
# elif defined(HAVE_CONSOLE)
|
||||
# error "Invalid CONFIG_UARTn_PARITY setting for CONSOLE"
|
||||
# endif
|
||||
|
||||
/* Get stop-bit setting for the console and USART0/2/3, UART1 */
|
||||
|
||||
# if CONSOLE_2STOP != 0
|
||||
# define CONSOLE_LCR_STOP UART_LCR_STOP
|
||||
# else
|
||||
# define CONSOLE_LCR_STOP 0
|
||||
# endif
|
||||
|
||||
/* LCR and FCR values for the console */
|
||||
|
||||
# define CONSOLE_LCR_VALUE (CONSOLE_LCR_WLS | CONSOLE_LCR_PAR | \
|
||||
CONSOLE_LCR_STOP)
|
||||
# define CONSOLE_FCR_VALUE (UART_FCR_RXTRIGGER_8 | UART_FCR_TXRST |\
|
||||
UART_FCR_RXRST | UART_FCR_FIFOEN)
|
||||
|
||||
#endif
|
||||
|
||||
/* Get stop-bit setting for the console and USART0/2/3, UART1 */
|
||||
|
||||
#if CONSOLE_2STOP != 0
|
||||
# define CONSOLE_LCR_STOP UART_LCR_STOP
|
||||
#else
|
||||
# define CONSOLE_LCR_STOP 0
|
||||
#endif
|
||||
|
||||
/* LCR and FCR values for the console */
|
||||
|
||||
#define CONSOLE_LCR_VALUE (CONSOLE_LCR_WLS | CONSOLE_LCR_PAR | \
|
||||
CONSOLE_LCR_STOP)
|
||||
#define CONSOLE_FCR_VALUE (UART_FCR_RXTRIGGER_8 | UART_FCR_TXRST |\
|
||||
UART_FCR_RXRST | UART_FCR_FIFOEN)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -384,6 +384,11 @@ as follow:
|
||||
|
||||
Where <subdir> is one of the following:
|
||||
|
||||
netnsh:
|
||||
-------
|
||||
Configures the NuttShell (nsh) located at examples/nsh. This
|
||||
configuration is focused on network testing.
|
||||
|
||||
nsh:
|
||||
----
|
||||
This configuration is the NuttShell (NSH) example at examples/nsh/.
|
||||
@ -451,3 +456,49 @@ Where <subdir> is one of the following:
|
||||
be found on the lpcware.com website. In this build sceneario, you must
|
||||
also provide the patch to the external SPIFI library be defining the make
|
||||
variable EXTRA_LIBS in the top-level Make.defs file. Good luck!
|
||||
|
||||
usbnsh:
|
||||
-------
|
||||
|
||||
This is another NSH example. If differs from other 'nsh' configurations
|
||||
in that this configurations uses a USB serial device for console I/O.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. This configuration does have UART1 output enabled and set up as
|
||||
the system logging device:
|
||||
|
||||
CONFIG_SYSLOG_CHAR=y : Use a character device for system logging
|
||||
CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" : UART1 will be /dev/ttyS0
|
||||
|
||||
However, there is nothing to generate SYLOG output in the default
|
||||
configuration so nothing should appear on UART1 unless you enable
|
||||
some debug output or enable the USB monitor.
|
||||
|
||||
NOTE: Using the SYSLOG to get debug output has limitations. Among
|
||||
those are that you cannot get debug output from interrupt handlers.
|
||||
So, in particularly, debug output is not a useful way to debug the
|
||||
USB device controller driver. Instead, use the USB monitor with
|
||||
USB debug off and USB trace on (see below).
|
||||
|
||||
4. Enabling USB monitor SYSLOG output. If tracing is enabled, the USB
|
||||
device will save encoded trace output in in-memory buffer; if the
|
||||
USB monitor is enabled, that trace buffer will be periodically
|
||||
emptied and dumped to the system logging device (UART2 in this
|
||||
configuration):
|
||||
|
||||
CONFIG_USBDEV_TRACE=y : Enable USB trace feature
|
||||
CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory
|
||||
CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH
|
||||
CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor
|
||||
CONFIG_USBMONITOR=y : Enable the USB monitor daemon
|
||||
CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size
|
||||
CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority
|
||||
CONFIG_USBMONITOR_INTERVAL=2 : Dump trace data every 2 seconds
|
||||
|
||||
CONFIG_USBMONITOR_TRACEINIT=y : Enable TRACE output
|
||||
CONFIG_USBMONITOR_TRACECLASS=y
|
||||
CONFIG_USBMONITOR_TRACETRANSFERS=y
|
||||
CONFIG_USBMONITOR_TRACECONTROLLER=y
|
||||
CONFIG_USBMONITOR_TRACEINTERRUPTS=y
|
||||
|
||||
|
132
configs/bambino-200e/usbnsh/Make.defs
Normal file
132
configs/bambino-200e/usbnsh/Make.defs
Normal file
@ -0,0 +1,132 @@
|
||||
############################################################################
|
||||
# configs/bambino-200e/usbnsh/Make.defs
|
||||
#
|
||||
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@yahoogroups.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
# Setup for the kind of memory that we are executing from
|
||||
|
||||
ifeq ($(CONFIG_LPC43_BOOT_SRAM),y)
|
||||
LDSCRIPT = ramconfig.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC43_BOOT_SPIFI),y)
|
||||
LDSCRIPT = spificonfig.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC43_BOOT_FLASHA),y)
|
||||
LDSCRIPT = flashaconfig.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC43_BOOT_FLASHB),y)
|
||||
LDSCRIPT = flashaconfig.ld
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC43_BOOT_CS0FLASH),y)
|
||||
LDSCRIPT = cs0flash.ld
|
||||
endif
|
||||
|
||||
# Setup for Windows vs Linux/Cygwin/OSX environments
|
||||
|
||||
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 = $(ARCROSSDEV)ar rcs
|
||||
NM = $(ARCROSSDEV)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-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
ASMEXT = .S
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT = .elf
|
||||
|
||||
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 =
|
||||
|
1014
configs/bambino-200e/usbnsh/defconfig
Normal file
1014
configs/bambino-200e/usbnsh/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
96
configs/bambino-200e/usbnsh/setenv.sh
Normal file
96
configs/bambino-200e/usbnsh/setenv.sh
Normal file
@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
# configs/bambino-200e/usbnsh/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@yahoogroups.com>
|
||||
#
|
||||
# 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 Code Red
|
||||
# toolchain under windows. You will have to edit this if you install the
|
||||
# Code Red toolchain in any other location or if you install a different
|
||||
# version
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/code_red/RedSuite_4.2.3_379/redsuite/Tools/bin"
|
||||
#export SCRIPT_BIN="/cygdrive/c/code_red/RedSuite_4.2.3_379/redsuite/bin"
|
||||
#export SCRIPT_BIN="/cygdrive/c/nxp/LPCXpresso_4.2.3_292/lpcxpresso/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 SCRIPT_BIN=
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the Atollic toolchain in any other location. /usr/bin is added before
|
||||
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
|
||||
# at those locations as well.
|
||||
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
|
||||
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
|
||||
#export SCRIPT_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 Cygwin path to the location where I build the buildroot
|
||||
# toolchain.
|
||||
#export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
|
||||
#export SCRIPT_BIN=
|
||||
|
||||
# And add the selected toolchain path[s] to the PATH variable
|
||||
|
||||
export PATH="/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
if [ ! -z ${SCRIPT_BIN} ]; then
|
||||
export PATH="${SCRIPT_BIN}:${PATH}"
|
||||
fi
|
||||
|
||||
export PATH="${TOOLCHAIN_BIN}:${PATH}"
|
||||
echo "PATH : ${PATH}"
|
||||
|
||||
# Set an alias that can be used to put the LPC43xx in boot mode
|
||||
|
||||
alias lpc43xx='${SCRIPT_BIN}/Scripts/bootLPCXpresso.cmd winusb'
|
Loading…
Reference in New Issue
Block a user