From feff83cc2bca59bfab0b6f4a2d72355f63276214 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 3 Nov 2008 13:39:27 +0000 Subject: Move LPC214X scripts to a subdirectory git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1126 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/mcu123-lpc214x/lpc21isp.sh | 65 ----------------------- nuttx/configs/mcu123-lpc214x/nsh/setenv.sh | 3 +- nuttx/configs/mcu123-lpc214x/ostest/setenv.sh | 3 +- nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh | 65 +++++++++++++++++++++++ nuttx/configs/mcu123-lpc214x/usbserial/Make.defs | 2 +- nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh | 3 +- nuttx/configs/mcu123-lpc214x/usbstorage/Make.defs | 2 +- nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh | 3 +- nuttx/configs/olimex-strp711/ostest/setenv.sh | 4 +- nuttx/configs/olimex-strp711/src/up_spi.c | 3 ++ 10 files changed, 80 insertions(+), 73 deletions(-) delete mode 100755 nuttx/configs/mcu123-lpc214x/lpc21isp.sh create mode 100755 nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh (limited to 'nuttx/configs') diff --git a/nuttx/configs/mcu123-lpc214x/lpc21isp.sh b/nuttx/configs/mcu123-lpc214x/lpc21isp.sh deleted file mode 100755 index ccb2025dd..000000000 --- a/nuttx/configs/mcu123-lpc214x/lpc21isp.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -############################################################################# -# configs/mcu123-lpc214x/lpc21isp.sh -# -# Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# 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. -# -############################################################################# -#set -x - -# The path to the built lpc21isp binary - -lpc21isp=../lpc2148/lpc21isp/lpc21isp - -# lpc21ips options - -options="-bin -control -verify" - -# The path to the NuttX raw binary format binary - -hxfile=nuttx.bin - -# The TTY to use for the download - -tty=/dev/ttyS0 - -# The BAUD rate supported by the lpc214x board - -baud=38400 - -# The LPC214X crystal frequency in KHz - -osckhz=12000 - -# Do it! - -sudo $lpc21isp $options $hxfile $tty $baud $osckhz - diff --git a/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh b/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh index 45a9c5c14..5b8fc1108 100755 --- a/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/nsh/setenv.sh @@ -41,6 +41,7 @@ if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi WD=`pwd` export BUILDROOT_BIN=${WD}/../buildroot/build_arm_nofpu/staging_dir/bin -export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG} +export LPC214XSCRIPTS=$WD/configs/mcu123-lpc214x/scripts +export PATH=${BUILDROOT_BIN}:${LPC214XSCRIPTS}:/sbin:/usr/sbin:${PATH_ORIG} echo "PATH : ${PATH}" diff --git a/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh b/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh index 12915788d..fa840b656 100755 --- a/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/ostest/setenv.sh @@ -41,6 +41,7 @@ if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi WD=`pwd` export BUILDROOT_BIN=${WD}/../buildroot/build_arm_nofpu/staging_dir/bin -export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG} +export LPC214XSCRIPTS=$WD/configs/mcu123-lpc214x/scripts +export PATH=${BUILDROOT_BIN}:${LPC214XSCRIPTS}:/sbin:/usr/sbin:${PATH_ORIG} echo "PATH : ${PATH}" diff --git a/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh b/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh new file mode 100755 index 000000000..ccb2025dd --- /dev/null +++ b/nuttx/configs/mcu123-lpc214x/scripts/lpc21isp.sh @@ -0,0 +1,65 @@ +#!/bin/sh +############################################################################# +# configs/mcu123-lpc214x/lpc21isp.sh +# +# Copyright (C) 2008 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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. +# +############################################################################# +#set -x + +# The path to the built lpc21isp binary + +lpc21isp=../lpc2148/lpc21isp/lpc21isp + +# lpc21ips options + +options="-bin -control -verify" + +# The path to the NuttX raw binary format binary + +hxfile=nuttx.bin + +# The TTY to use for the download + +tty=/dev/ttyS0 + +# The BAUD rate supported by the lpc214x board + +baud=38400 + +# The LPC214X crystal frequency in KHz + +osckhz=12000 + +# Do it! + +sudo $lpc21isp $options $hxfile $tty $baud $osckhz + diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs b/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs index 1e2c433e7..66d4d8045 100644 --- a/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs +++ b/nuttx/configs/mcu123-lpc214x/usbserial/Make.defs @@ -47,7 +47,7 @@ ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script +ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script CROSSDEV = arm-elf- CC = $(CROSSDEV)gcc diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh b/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh index 4fab9f2f9..fe9114e63 100755 --- a/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/usbserial/setenv.sh @@ -41,6 +41,7 @@ if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi WD=`pwd` export BUILDROOT_BIN=${WD}/../buildroot/build_arm_nofpu/staging_dir/bin -export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG} +export LPC214XSCRIPTS=$WD/configs/mcu123-lpc214x/scripts +export PATH=${BUILDROOT_BIN}:${LPC214XSCRIPTS}:/sbin:/usr/sbin:${PATH_ORIG} echo "PATH : ${PATH}" diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/Make.defs b/nuttx/configs/mcu123-lpc214x/usbstorage/Make.defs index cd04ff3ee..97a57de1f 100644 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/Make.defs +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/Make.defs @@ -47,7 +47,7 @@ ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script +ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script CROSSDEV = arm-elf- CC = $(CROSSDEV)gcc diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh b/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh index e24f06bf2..f5ca5a07e 100755 --- a/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh +++ b/nuttx/configs/mcu123-lpc214x/usbstorage/setenv.sh @@ -41,6 +41,7 @@ if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi WD=`pwd` export BUILDROOT_BIN=${WD}/../buildroot/build_arm_nofpu/staging_dir/bin -export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG} +export LPC214XSCRIPTS=$WD/configs/mcu123-lpc214x/scripts +export PATH=${BUILDROOT_BIN}:${LPC214XSCRIPTS}:/sbin:/usr/sbin:${PATH_ORIG} echo "PATH : ${PATH}" diff --git a/nuttx/configs/olimex-strp711/ostest/setenv.sh b/nuttx/configs/olimex-strp711/ostest/setenv.sh index c18224c19..0ebf1a2c9 100755 --- a/nuttx/configs/olimex-strp711/ostest/setenv.sh +++ b/nuttx/configs/olimex-strp711/ostest/setenv.sh @@ -41,7 +41,7 @@ if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi WD=`pwd` export BUILDROOT_BIN=${WD}/../buildroot/build_arm_nofpu/staging_dir/bin -export STR41XCFGS=$WD/configs/olimex-strp711/scripts -export PATH=${BUILDROOT_BIN}:${STR41XCFGS}:/sbin:/usr/sbin:${PATH_ORIG} +export STR41XSCRIPTS=$WD/configs/olimex-strp711/scripts +export PATH=${BUILDROOT_BIN}:${STR41XSCRIPTS}:/sbin:/usr/sbin:${PATH_ORIG} echo "PATH : ${PATH}" diff --git a/nuttx/configs/olimex-strp711/src/up_spi.c b/nuttx/configs/olimex-strp711/src/up_spi.c index a4d6074a3..707f7fa06 100644 --- a/nuttx/configs/olimex-strp711/src/up_spi.c +++ b/nuttx/configs/olimex-strp711/src/up_spi.c @@ -665,8 +665,10 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR ubyte *buffer, size_t b FAR struct spi_dev_s *up_spiinitialize(int port) { FAR struct spi_dev_s *ret; + irqstate_t flags; uint16 reg16; + flags = irqsave(); #ifdef CONFIG_STR71X_BSPI0 if (port == 0) { @@ -762,6 +764,7 @@ FAR struct spi_dev_s *up_spiinitialize(int port) { ret = NULL; } + irqrestore(flags); return ret; } -- cgit v1.2.3