mirror of
https://github.com/apache/nuttx.git
synced 2026-05-12 09:48:31 +08:00
Add an NSH configuration for the NuTiny-SDK-NUC120. Still does not work
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5678 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+16
-6
@@ -303,12 +303,22 @@ config ARCH_RAMFUNCS
|
||||
comment "Board Settings"
|
||||
|
||||
config BOARD_LOOPSPERMSEC
|
||||
int "Loops per millisecond"
|
||||
help
|
||||
Must be calibrated for correct operation of delay loops.
|
||||
You simply use a stop watch to measure the 100 second delay
|
||||
then adjust CONFIG_BOARD_LOOPSPERMSEC until it is actually
|
||||
is 100 seconds.
|
||||
int "Delay loops per millisecond"
|
||||
default 5000
|
||||
---help---
|
||||
Simple delay loops are used by some logic, especially during boot-up,
|
||||
driver initialization. These delay loops must be calibrated for each
|
||||
board in order to assure accurate timing by the delay loops.
|
||||
|
||||
config ARCH_CALIBRATION
|
||||
bool "Calibrate delay loop"
|
||||
default n
|
||||
---help---
|
||||
Enables some built in instrumentation that causes a 100 second delay
|
||||
during boot-up. This 100 second delay serves no purpose other than it
|
||||
allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop
|
||||
watch to measure the actual delay then adjust BOARD_LOOPSPERMSEC until
|
||||
the actual delay is 100 seconds.
|
||||
|
||||
config DRAM_START
|
||||
hex "DRAM start physical address"
|
||||
|
||||
@@ -251,22 +251,6 @@ config PAGING
|
||||
If set =y in your configation file, this setting will enable the on-demand
|
||||
paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html.
|
||||
|
||||
config BOARD_LOOPSPERMSEC
|
||||
int "Delay loops per millisecond"
|
||||
default 5000
|
||||
---help---
|
||||
Delay loops nust be calibrated for correct operation.
|
||||
|
||||
config ARCH_CALIBRATION
|
||||
bool "Calibrate delay loop"
|
||||
default n
|
||||
---help---
|
||||
Enables some built in instrumentation that causes a 100 second delay
|
||||
during boot-up. This 100 second delay serves no purpose other than it
|
||||
allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop
|
||||
watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until
|
||||
the delay actually is 100 seconds.
|
||||
|
||||
config DEBUG_HARDFAULT
|
||||
bool "Verbose Hard-Fault Debug"
|
||||
default n
|
||||
|
||||
@@ -299,7 +299,7 @@ void nuc_lowsetup(void)
|
||||
#endif
|
||||
|
||||
#if NUC_CONSOLE_2STOP != 0
|
||||
revgval |= UART_LCR_NSB;
|
||||
regval |= UART_LCR_NSB;
|
||||
#endif
|
||||
|
||||
putreg32(regval, NUC_CONSOLE_BASE + NUC_UART_LCR_OFFSET);
|
||||
|
||||
+105
-115
@@ -242,86 +242,64 @@ static uart_dev_t g_uart2port =
|
||||
};
|
||||
#endif /* CONFIG_NUC_UART2 */
|
||||
|
||||
/* Which UART with be tty0/console and which tty1? tty2? */
|
||||
/* Which UART with be tty0/console and which tty1? tty2? The console, if it
|
||||
* exists, will always be ttyS0. If there is no console then will use the
|
||||
* lowest numbered UART.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONSOLE
|
||||
# if defined(CONFIG_UART0_SERIAL_CONSOLE)
|
||||
# define CONSOLE_DEV g_uart0port /* UART0=console */
|
||||
# define TTYS0_DEV g_uart0port /* UART0=ttyS0 */
|
||||
# ifdef CONFIG_NUC_UART1
|
||||
# define TTYS1_DEV g_uart1port /* UART0=ttyS0;UART1=ttyS1 */
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS2_DEV g_uart2port /* UART0=ttyS0;UART1=ttyS1;UART2=ttyS2 */
|
||||
# else
|
||||
# undef TTYS2_DEV /* UART0=ttyS0;UART1=ttyS1;No ttyS2*/
|
||||
# endif
|
||||
# else
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS1_DEV g_uart2port /* UART0=ttyS0;UART2=ttyS1 */
|
||||
# undef TTYS2_DEV /* UART0=ttyS0;UART2=ttyS1;No ttyS2*/
|
||||
# else
|
||||
# undef TTYS1_DEV /* UART0=ttyS0;No ttyS1;No ttyS2 */
|
||||
# undef TTYS2_DEV /* No ttyS2 */
|
||||
# endif
|
||||
# endif
|
||||
# elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
||||
# define CONSOLE_DEV g_uart1port /* UART1=console */
|
||||
# define TTYS0_DEV g_uart1port /* UART1=ttyS0 */
|
||||
# ifdef CONFIG_NUC_UART0
|
||||
# define TTYS1_DEV g_uart0port /* UART1=ttyS0;UART0=ttyS1 */
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS2_DEV g_uart2port /* UART1=ttyS0;UART0=ttyS1;UART2=ttyS2 */
|
||||
# else
|
||||
# undef TTYS2_DEV /* UART1=ttyS0;UART0=ttyS1;No ttyS2 */
|
||||
# endif
|
||||
# else
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS1_DEV g_uart2port /* UART1=ttyS0;UART2=ttyS1 */
|
||||
# undef TTYS2_DEV /* UART1=ttyS0;UART2=ttyS1;No ttyS2 */
|
||||
# else
|
||||
# undef TTYS1_DEV /* UART1=ttyS0;No ttyS1;No ttyS2 */
|
||||
# undef TTYS2_DEV /* No ttyS2 */
|
||||
# endif
|
||||
# endif
|
||||
# elif defined(CONFIG_UART2_SERIAL_CONSOLE)
|
||||
# define CONSOLE_DEV g_uart2port /* UART2=console */
|
||||
# define TTYS0_DEV g_uart2port /* UART2=ttyS0 */
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS1_DEV g_uart0port /* UART2=ttyS0;UART0=ttyS1 */
|
||||
# ifdef CONFIG_NUC_UART1
|
||||
# define TTYS2_DEV g_uart1port /* UART2=ttyS0;UART0=ttyS1;UART1=ttyS2 */
|
||||
# else
|
||||
# undef TTYS2_DEV /* UART2=ttyS0;UART0=ttyS1;No ttyS2 */
|
||||
# endif
|
||||
# else
|
||||
# ifdef CONFIG_NUC_UART1
|
||||
# define TTYS1_DEV g_uart1port /* UART2=ttyS0;UART1=ttyS1 */
|
||||
# undef TTYS2_DEV /* UART2=ttyS0;UART1=ttyS1;No ttyS2 */
|
||||
# else
|
||||
# undef TTYS1_DEV /* UART2=ttyS0;No ttyS1;No ttyS2 */
|
||||
# undef TTYS2_DEV /* No ttyS2 */
|
||||
# endif
|
||||
# endif
|
||||
/* First pick the console and ttys0. This could be any of UART0-2 */
|
||||
|
||||
#if defined(CONFIG_UART0_SERIAL_CONSOLE)
|
||||
# define CONSOLE_DEV g_uart0port /* UART0 is console */
|
||||
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
|
||||
# define UART0_ASSIGNED 1
|
||||
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
||||
# define CONSOLE_DEV g_uart1port /* UART1 is console */
|
||||
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
||||
# define UART1_ASSIGNED 1
|
||||
#elif defined(CONFIG_UART2_SERIAL_CONSOLE)
|
||||
# define CONSOLE_DEV g_uart2port /* UART2 is console */
|
||||
# define TTYS0_DEV g_uart2port /* UART2 is ttyS0 */
|
||||
# define UART2_ASSIGNED 1
|
||||
#else
|
||||
# undef CONSOLE_DEV /* No console */
|
||||
# if defined(CONFIG_NUC_UART0)
|
||||
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
|
||||
# define UART0_ASSIGNED 1
|
||||
# elif defined(CONFIG_NUC_UART1)
|
||||
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
||||
# define UART1_ASSIGNED 1
|
||||
# elif defined(CONFIG_NUC_UART2)
|
||||
# define TTYS0_DEV g_uart2port /* UART2 is ttyS0 */
|
||||
# define UART2_ASSIGNED 1
|
||||
# endif
|
||||
#else /* No console */
|
||||
# define TTYS0_DEV g_uart0port /* UART0=ttyS0 */
|
||||
# ifdef CONFIG_NUC_UART1
|
||||
# define TTYS1_DEV g_uart1port /* UART0=ttyS0;UART1=ttyS1 */
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS2_DEV g_uart2port /* UART0=ttyS0;UART1=ttyS1;UART2=ttyS2 */
|
||||
# else
|
||||
# undef TTYS2_DEV /* UART0=ttyS0;UART1=ttyS1;No ttyS2 */
|
||||
# endif
|
||||
# else
|
||||
# ifdef CONFIG_NUC_UART2
|
||||
# define TTYS1_DEV g_uart2port /* UART0=ttyS0;UART2=ttyS1 */
|
||||
# undef TTYS2_DEV /* UART0=ttyS0;UART2=ttyS1;No ttyS2 */
|
||||
# else
|
||||
# undef TTYS1_DEV /* UART0=ttyS0;No ttyS1;No ttyS2 */
|
||||
# undef TTYS2_DEV /* No ttyS2 */
|
||||
# endif
|
||||
# endif
|
||||
#endif /* HAVE_CONSOLE */
|
||||
#endif
|
||||
|
||||
/* Pick ttys1. This could be any two of UART0-2 excluding the console UART. */
|
||||
|
||||
#if defined(CONFIG_NUC_UART0) && !defined(UART0_ASSIGNED)
|
||||
# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */
|
||||
# define UART0_ASSIGNED 1
|
||||
#elif defined(CONFIG_NUC_UART1) && !defined(UART1_ASSIGNED)
|
||||
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
|
||||
# define UART1_ASSIGNED 1
|
||||
#elif defined(CONFIG_NUC_UART2) && !defined(UART2_ASSIGNED)
|
||||
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
||||
# define UART2_ASSIGNED 1
|
||||
#endif
|
||||
|
||||
/* Pick ttys2. This could be one of UART1-2. It can't be UART0 because that
|
||||
* was either assigned as ttyS0 or ttys1. One of UART 1-2 could also be the
|
||||
* console.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_NUC_UART1) && !defined(UART1_ASSIGNED)
|
||||
# define TTYS2_DEV g_uart1port /* UART1 is ttyS2 */
|
||||
# define UART1_ASSIGNED 1
|
||||
#elif defined(CONFIG_NUC_UART2) && !defined(UART2_ASSIGNED)
|
||||
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
||||
# define UART2_ASSIGNED 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
@@ -391,46 +369,61 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
|
||||
/* Reset the TX FIFO */
|
||||
|
||||
regval = up_serialin(priv, NUC_UART_FCR_OFFSET
|
||||
regval |= UART_FCR_TFR
|
||||
up_serialout(priv, NUC_UART_FCR_OFFSET, regval);
|
||||
regval = up_serialin(priv, NUC_UART_FCR_OFFSET);
|
||||
up_serialout(priv, NUC_UART_FCR_OFFSET, regval | UART_FCR_TFR);
|
||||
|
||||
/* Reset the RX FIFO */
|
||||
|
||||
regval = up_serialin(priv, NUC_UART_FCR_OFFSET
|
||||
regval |= UART_FCR_RFR
|
||||
up_serialout(priv, NUC_UART_FCR_OFFSET, regval);
|
||||
up_serialout(priv, NUC_UART_FCR_OFFSET, regval | UART_FCR_RFR);
|
||||
|
||||
/* Set Rx Trigger Level */
|
||||
|
||||
regval &= ~UART_FCR_FRITL_MASK;
|
||||
regval &= ~(UART_FCR_FRITL_MASK | UART_FCR_TFR | UART_FCR_RFR);
|
||||
regval |= UART_FCR_FRITL_4;
|
||||
up_serialout(priv, NUC_UART_FCR_OFFSET, regval);
|
||||
|
||||
/* Set Parity & Data bits and Stop bits */
|
||||
|
||||
regval = 0;
|
||||
#if NUC_CONSOLE_BITS == 5
|
||||
regval |= UART_LCR_WLS_5;
|
||||
#elif NUC_CONSOLE_BITS == 6
|
||||
regval |= UART_LCR_WLS_6;
|
||||
#elif NUC_CONSOLE_BITS == 7
|
||||
regval |= UART_LCR_WLS_7;
|
||||
#elif NUC_CONSOLE_BITS == 8
|
||||
regval |= UART_LCR_WLS_8;
|
||||
#else
|
||||
error "Unknown console UART data width"
|
||||
#endif
|
||||
switch (priv->bits)
|
||||
{
|
||||
case 5:
|
||||
regval |= UART_LCR_WLS_5;
|
||||
break;
|
||||
|
||||
#if NUC_CONSOLE_PARITY == 1
|
||||
regval |= UART_LCR_PBE;
|
||||
#elif NUC_CONSOLE_PARITY == 2
|
||||
regval |= (UART_LCR_PBE | UART_LCR_EPE);
|
||||
#endif
|
||||
case 6:
|
||||
regval |= UART_LCR_WLS_6;
|
||||
break;
|
||||
|
||||
#if NUC_CONSOLE_2STOP != 0
|
||||
revgval |= UART_LCR_NSB;
|
||||
#endif
|
||||
case 7:
|
||||
regval |= UART_LCR_WLS_7;
|
||||
break;
|
||||
|
||||
default:
|
||||
case 8:
|
||||
regval |= UART_LCR_WLS_8;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (priv->parity)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
regval |= UART_LCR_PBE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
regval |= (UART_LCR_PBE | UART_LCR_EPE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (priv->stopbits2)
|
||||
{
|
||||
regval |= UART_LCR_NSB;
|
||||
}
|
||||
|
||||
up_serialout(priv, NUC_UART_LCR_OFFSET, regval);
|
||||
|
||||
@@ -441,7 +434,7 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
|
||||
/* Set the baud */
|
||||
|
||||
nuc_setbaud(CONSOLE_BASE, CONSOLE_BAUD);
|
||||
nuc_setbaud(priv->uartbase, priv->baud);
|
||||
|
||||
/* Set up the IER */
|
||||
|
||||
@@ -597,28 +590,25 @@ static int up_interrupt(int irq, void *context)
|
||||
{
|
||||
/* REVISIT: Do we clear this be reading the modem status register? */
|
||||
|
||||
volatile uint32_t status = up_serialin(priv, NUC_UART_MSR_OFFSET);
|
||||
vdbg("MSR: %08x\n", status);
|
||||
(void)up_serialin(priv, NUC_UART_MSR_OFFSET);
|
||||
}
|
||||
|
||||
/* Check for line status */
|
||||
|
||||
if ((status & UART_ISR_RLS_INT) != 0)
|
||||
{
|
||||
/* REVISIT: Do we clear this be reading the line status register? */
|
||||
/* REVISIT: Do we clear this be reading the FIFO status register? */
|
||||
|
||||
volatile uint32_t status = up_serialin(priv, NUC_UART_FSR_OFFSET);
|
||||
vdbg("LSR: %08x\n", status);
|
||||
(void)up_serialin(priv, NUC_UART_FSR_OFFSET);
|
||||
}
|
||||
|
||||
/* Check for buffer errors */
|
||||
|
||||
if ((status & UART_ISR_BUF_ERR_INT) != 0)
|
||||
{
|
||||
/* REVISIT: Do we clear this be reading the line status register? */
|
||||
/* REVISIT: Do we clear this by reading the FIFO status register? */
|
||||
|
||||
volatile uint32_t status = up_serialin(priv, NUC_UART_MSR_OFFSET);
|
||||
vdbg("MSR: %08x\n", status);
|
||||
(void)up_serialin(priv, NUC_UART_FSR_OFFSET);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,7 +641,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(user, dev, sizeof(struct nuc_dev_s));
|
||||
memcpy(user, priv, sizeof(struct nuc_dev_s));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -754,7 +744,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable)
|
||||
{
|
||||
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
||||
priv->ier |= (UART_IER_RDA_IEN | UART_IER_RLS_IEN | UART_IER_RTO_IEN |
|
||||
UART_IER_BUF_ERR_IEN UART_IER_TIME_OUT_EN);
|
||||
UART_IER_BUF_ERR_IEN | UART_IER_TIME_OUT_EN);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
||||
@@ -32,22 +32,6 @@ config ARCH_CHIP
|
||||
string
|
||||
default "pic32mx" if ARCH_CHIP_PIC32MX
|
||||
|
||||
config BOARD_LOOPSPERMSEC
|
||||
int "Delay loops per millisecond"
|
||||
default 5000
|
||||
---help---
|
||||
Delay loops nust be calibrated for correct operation.
|
||||
|
||||
config ARCH_CALIBRATION
|
||||
bool "Calibrate delay loop"
|
||||
default n
|
||||
---help---
|
||||
Enables some built in instrumentation that causes a 100 second delay
|
||||
during boot-up. This 100 second delay serves no purpose other than it
|
||||
allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop
|
||||
watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until
|
||||
the delay actually is 100 seconds.
|
||||
|
||||
source arch/mips/src/common/Kconfig
|
||||
source arch/mips/src/mips32/Kconfig
|
||||
source arch/mips/src/pic32mx/Kconfig
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
############################################################################
|
||||
# configs/nutiny-nuc120/nsh/Make.defs
|
||||
#
|
||||
# Copyright (C) 2013 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/armv6-m/Toolchain.defs
|
||||
|
||||
LDSCRIPT = ld.script
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
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)}"
|
||||
MAXOPTIMIZATION = -O2
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
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
|
||||
else
|
||||
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
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 =
|
||||
ifeq ($(CONFIG_HOST_WINDOWS),y)
|
||||
HOSTEXEEXT = .exe
|
||||
else
|
||||
HOSTEXEEXT =
|
||||
endif
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native host tools
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||
else
|
||||
# Linux/Cygwin-native host tools
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+75
@@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
# configs/nutiny-nuc120/nsh/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2013 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 RIDE
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the RIDE toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/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"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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}"
|
||||
Reference in New Issue
Block a user