diff --git a/configs/olimex-lpc2378/nsh/defconfig b/configs/olimex-lpc2378/nsh/defconfig index 8a08796ac9..d14a737e06 100644 --- a/configs/olimex-lpc2378/nsh/defconfig +++ b/configs/olimex-lpc2378/nsh/defconfig @@ -30,6 +30,7 @@ CONFIG_RAW_BINARY=y # # Customize Header Files # +# CONFIG_ARCH_STDINT_H is not set # CONFIG_ARCH_STDBOOL_H is not set # CONFIG_ARCH_MATH_H is not set # CONFIG_ARCH_FLOAT_H is not set @@ -116,6 +117,8 @@ CONFIG_LPC2378_CODE_BASE=0x00000000 CONFIG_LPC2378_PLL_SETUP=y CONFIG_LPC2378_PLL_CLKSRC=1 CONFIG_LPC2378_MAM_SETUP=y +CONFIG_LPC2378_LPC2378_MAMCR_VALUE=1 +CONFIG_LPC2378_LPC2378_MAMTIM_VALUE=3 # # LPC2378 Peripheral Support @@ -123,6 +126,9 @@ CONFIG_LPC2378_MAM_SETUP=y CONFIG_LPC2378_UART0=y # CONFIG_LPC2378_UART1 is not set CONFIG_LPC2378_UART2=y +# CONFIG_LPC2378_IC0 is not set +# CONFIG_LPC2378_IC1 is not set +# CONFIG_LPC2378_IC2 is not set # # Architecture Options @@ -138,6 +144,7 @@ CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_NAND_HWECC is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set # CONFIG_ARCH_HAVE_RAMFUNCS is not set # CONFIG_ARCH_HAVE_RAMVECTORS is not set @@ -286,9 +293,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set +# CONFIG_ARCH_HAVE_UART is not set CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y +# CONFIG_ARCH_HAVE_UART1 is not set CONFIG_ARCH_HAVE_UART2=y +# CONFIG_ARCH_HAVE_UART3 is not set +# CONFIG_ARCH_HAVE_UART4 is not set +# CONFIG_ARCH_HAVE_UART5 is not set +# CONFIG_ARCH_HAVE_UART6 is not set +# CONFIG_ARCH_HAVE_UART7 is not set +# CONFIG_ARCH_HAVE_UART8 is not set +# CONFIG_ARCH_HAVE_SCI0 is not set +# CONFIG_ARCH_HAVE_SCI1 is not set +# CONFIG_ARCH_HAVE_USART0 is not set +# CONFIG_ARCH_HAVE_USART1 is not set +# CONFIG_ARCH_HAVE_USART2 is not set +# CONFIG_ARCH_HAVE_USART3 is not set +# CONFIG_ARCH_HAVE_USART4 is not set +# CONFIG_ARCH_HAVE_USART5 is not set +# CONFIG_ARCH_HAVE_USART6 is not set +# CONFIG_ARCH_HAVE_USART7 is not set +# CONFIG_ARCH_HAVE_USART8 is not set # # USART Configuration @@ -296,7 +321,6 @@ CONFIG_ARCH_HAVE_UART2=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_UART0_SERIAL_CONSOLE=y -# CONFIG_UART1_SERIAL_CONSOLE is not set # CONFIG_UART2_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set @@ -312,18 +336,6 @@ CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# -# UART1 Configuration -# -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART1_BAUD=115200 -CONFIG_UART1_BITS=8 -CONFIG_UART1_PARITY=0 -CONFIG_UART1_2STOP=0 -# CONFIG_UART1_IFLOWCONTROL is not set -# CONFIG_UART1_OFLOWCONTROL is not set - # # UART2 Configuration # diff --git a/configs/olimex-lpc2378/nsh/setenv.sh b/configs/olimex-lpc2378/nsh/setenv.sh index 15808d32b7..e32bba679e 100755 --- a/configs/olimex-lpc2378/nsh/setenv.sh +++ b/configs/olimex-lpc2378/nsh/setenv.sh @@ -37,16 +37,32 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export LPC23XXSCRIPTS="$WD/configs/olimex-lpc2378/scripts" -export PATH="${BUILDROOT_BIN}:${LPC23XXSCRIPTS}:/sbin:/usr/sbin:${PATH_ORIG}" +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 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" + +# 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}" diff --git a/configs/olimex-lpc2378/src/Makefile b/configs/olimex-lpc2378/src/Makefile index af8cafe70d..f9624bead8 100644 --- a/configs/olimex-lpc2378/src/Makefile +++ b/configs/olimex-lpc2378/src/Makefile @@ -40,29 +40,30 @@ -include $(TOPDIR)/Make.defs -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src +ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src ifeq ($(WINTOOL),y) - CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/arm}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/sched}" + CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/arm}" \ + -I "${shell cygpath -w $(ARCH_SRCDIR)/sched}" else - CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/arm -I$(TOPDIR)/sched + CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/arm -I$(TOPDIR)/sched endif -ASRCS = -AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_leds.c -#CSRCS += up_spi.c +ASRCS = +AOBJS = $(ASRCS:.S=$(OBJEXT)) +CSRCS = lpc2378_leds.c + ifeq ($(CONFIG_NSH_ARCHINIT),y) -CSRCS += up_nsh.c +CSRCS += lpc2378_nsh.c endif -COBJS = $(CSRCS:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) +COBJS = $(CSRCS:.c=$(OBJEXT)) -CFLAGS += -I $(TOPDIR)/arch/$(CONFIG_ARCH)/src +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +CFLAGS += -I $(TOPDIR)/arch/$(CONFIG_ARCH)/src all: libboard$(LIBEXT) diff --git a/configs/olimex-lpc2378/src/up_leds.c b/configs/olimex-lpc2378/src/lpc2378_leds.c similarity index 97% rename from configs/olimex-lpc2378/src/up_leds.c rename to configs/olimex-lpc2378/src/lpc2378_leds.c index e9af220fdf..3afdd3a155 100644 --- a/configs/olimex-lpc2378/src/up_leds.c +++ b/configs/olimex-lpc2378/src/lpc2378_leds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/olimex-lpc2378/src/up_leds.c + * configs/olimex-lpc2378/src/lpc2378_leds.c * * Copyright (C) 2010 Rommel Marcelo. All rights reserved. * Author: Rommel Marcelo @@ -117,13 +117,13 @@ void board_led_off(int led) * olimex board STATUS LED ****************************************************************************/ -void up_statledoff(void) +void lpc2378_statledoff(void) { putled8(~STATLED, FIO1MASK2_OFFSET); putled8(STATLED, FIO1CLR2_OFFSET); } -void up_statledon(void) +void lpc2378_statledon(void) { putled8(~STATLED, FIO1MASK2_OFFSET); putled8(STATLED, FIO1SET2_OFFSET); diff --git a/configs/olimex-lpc2378/src/up_nsh.c b/configs/olimex-lpc2378/src/lpc2378_nsh.c similarity index 98% rename from configs/olimex-lpc2378/src/up_nsh.c rename to configs/olimex-lpc2378/src/lpc2378_nsh.c index 6ff285bfa6..903af225ef 100644 --- a/configs/olimex-lpc2378/src/up_nsh.c +++ b/configs/olimex-lpc2378/src/lpc2378_nsh.c @@ -1,6 +1,5 @@ /**************************************************************************** - * config/olimex-lpc2378/src/up_nsh.c - * arch/arm/src/board/up_nsh.c + * config/olimex-lpc2378/src/lpc2378_nsh.c * * Copyright (C) 2010 Rommel Marcelo. All rights reserved. * Author: Rommel Marcelo