mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Add board support at configs/zp214xpa for the The0.net ZP213X/4XPA board with the LPC2148; Add configurations sim/nxlines. convert mcu123-lpc214x/nsh to use the kconfig-frontends.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5465 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+13
-1
@@ -619,6 +619,14 @@ config ARCH_BOARD_Z8F64200100KIT
|
||||
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
|
||||
tools. The development environment is Cygwin under WinXP.
|
||||
|
||||
config ARCH_BOARD_ZP214XPA
|
||||
bool "The0.net LPC2148 Development Board"
|
||||
depends on ARCH_CHIP_LPC2148
|
||||
---help---
|
||||
This port is for the NXP LPC2148 as provided on the The0.net
|
||||
ZPA213X/4XPA development board. Includes support for the
|
||||
UG-2864AMBAG01 OLED also from The0.net
|
||||
|
||||
config ARCH_BOARD_SIM
|
||||
bool "User mode simulation"
|
||||
depends on ARCH_SIM
|
||||
@@ -700,6 +708,7 @@ config ARCH_BOARD
|
||||
default "z80sim" if ARCH_BOARD_Z80SIM
|
||||
default "z8encore000zco" if ARCH_BOARD_Z8ENCORE000ZCO
|
||||
default "z8f64200100kit" if ARCH_BOARD_Z8F64200100KIT
|
||||
default "zp214xpa" if ARCH_BOARD_ZP214XPA
|
||||
default "sim" if ARCH_BOARD_SIM
|
||||
default "" if ARCH_BOARD_CUSTOM
|
||||
|
||||
@@ -709,7 +718,7 @@ config ARCH_HAVE_LEDS
|
||||
bool
|
||||
|
||||
config ARCH_LEDS
|
||||
bool "Board LEDs support"
|
||||
bool "Board LED support"
|
||||
default y
|
||||
depends on ARCH_HAVE_LEDS
|
||||
---help---
|
||||
@@ -935,6 +944,9 @@ endif
|
||||
if ARCH_BOARD_Z8F64200100KIT
|
||||
source "configs/z8f64200100kit/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_ZP214XPA
|
||||
source "configs/zp214xpa/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_SIM
|
||||
source "configs/sim/Kconfig"
|
||||
endif
|
||||
|
||||
@@ -1936,6 +1936,11 @@ configs/z8f64200100kit
|
||||
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
|
||||
tools. The development environment is Cygwin under WinXP.
|
||||
|
||||
configs/zp214xpa
|
||||
This port is for the NXP LPC2148 as provided on the The0.net
|
||||
ZPA213X/4XPA development board. Includes support for the
|
||||
UG-2864AMBAG01 OLED also from The0.net
|
||||
|
||||
Configuring NuttX
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -349,8 +349,22 @@ nsh:
|
||||
Configures the NuttShell (nsh) located at examples/nsh. The
|
||||
Configuration enables only the serial NSH interfaces.
|
||||
|
||||
Default toolchain: Buildroot
|
||||
Output format: ELF and binary
|
||||
NOTES:
|
||||
|
||||
1. This configuration uses the mconf-based configuration tool. To
|
||||
change this configuration using that tool, you should:
|
||||
|
||||
a. Build and install the mconf tool. See nuttx/README.txt and
|
||||
misc/tools/
|
||||
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
2. Default platform/toolchain:
|
||||
|
||||
CONFIG_HOST_LINUX=y : Windows
|
||||
CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
|
||||
CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
|
||||
|
||||
ostest:
|
||||
-------
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,12 +35,12 @@
|
||||
|
||||
/* FLASH:
|
||||
* The lpc2148 has 512Kb of non-volatile memory beginning at address
|
||||
* 0x00000000. The OS entry point is via the reset vector at address
|
||||
* 0x00000000 (default MEMMAP mode assumed)
|
||||
* 0x0000:0000. The OS entry point is via the reset vector at address
|
||||
* 0x0000:0000 (default MEMMAP mode assumed)
|
||||
*
|
||||
* SRAM:
|
||||
* The lpc2148 has 32Kb of on-chip static RAM beginning at address
|
||||
* 0x40000000. The .data section will be relocated from _eronly
|
||||
* 0x4000:0000. The .data section will be relocated from _eronly
|
||||
* to _sdata at boot time.
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
############################################################################
|
||||
# configs/sim/nxlines/Make.defs
|
||||
#
|
||||
# Copyright (C) 2012 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
|
||||
|
||||
HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
else
|
||||
ARCHOPTIMIZATION = -O2
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS = -fno-builtin
|
||||
ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
|
||||
ARCHPICFLAGS = -fpic
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT =
|
||||
|
||||
ifeq ($(CONFIG_SIM_M32),y)
|
||||
ARCHCPUFLAGS += -m32
|
||||
ARCHCPUFLAGSXX += -m32
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
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
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
|
||||
ifeq ($(HOSTOS),Cygwin)
|
||||
EXEEXT = .exe
|
||||
else
|
||||
EXEEXT =
|
||||
endif
|
||||
|
||||
LDLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(LD)
|
||||
CCLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(CC)
|
||||
LDFLAGS = $(ARCHSCRIPT) # For backward compatibility, same as CCLINKFLAGS
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDLINKFLAGS += -g
|
||||
CCLINKFLAGS += -g
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SIM_M32),y)
|
||||
LDLINKFLAGS += -melf_i386
|
||||
CCLINKFLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
endif
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
HOSTLDFLAGS =
|
||||
File diff suppressed because it is too large
Load Diff
Regular → Executable
+18
-9
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/mcu123-lpc214x/nsh/appconfig
|
||||
#!/bin/bash
|
||||
# sim/nxlines/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -31,14 +31,23 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Path to example in apps/examples containing the user_start entry point
|
||||
if [ "$_" = "$0" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONFIGURED_APPS += examples/nsh
|
||||
WD=`pwd`
|
||||
if [ ! -x "setenv.sh" ]; then
|
||||
echo "This script must be executed from the top-level NuttX build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The NSH library
|
||||
if [ -z "${PATH_ORIG}" ]; then
|
||||
export PATH_ORIG="${PATH}"
|
||||
fi
|
||||
|
||||
CONFIGURED_APPS += system/readline
|
||||
CONFIGURED_APPS += nshlib
|
||||
#export NUTTX_BIN=
|
||||
#export PATH=${NUTTX_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_ZP214XPA
|
||||
endif
|
||||
@@ -0,0 +1,136 @@
|
||||
zp214xpa README FILE
|
||||
====================
|
||||
|
||||
The ZP213X/4XPA board from the0.net with LPC2148 installed.
|
||||
Includes support for the UG-2864AMBAG01 OLED from The0.net.
|
||||
|
||||
Contents
|
||||
========
|
||||
|
||||
o MCU Connections
|
||||
o Serial Console
|
||||
o Configurations
|
||||
|
||||
MCU Connections:
|
||||
================
|
||||
|
||||
Module Socket:
|
||||
--------------
|
||||
PIN NAME PIN NAME
|
||||
1 VBAT 56 VCC
|
||||
2 3V3 55 Vusb
|
||||
3 VREF 54 3V3
|
||||
4 P0.0 53 RESET
|
||||
5 P0.1 52 P1.31
|
||||
6 P0.2 51 P1.30
|
||||
7 P0.3 50 P1.29
|
||||
8 P0.4 49 P1.28
|
||||
9 P0.5 48 P1.27
|
||||
10 P0.6 47 P1.26
|
||||
11 P0.7 46 P1.25
|
||||
12 P0.8 45 P1.24
|
||||
13 P0.9 44 P1.23
|
||||
14 P0.10 43 P1.22
|
||||
15 P0.11 42 P1.21
|
||||
16 P0.12 41 P1.20
|
||||
17 P0.13 40 P1.19
|
||||
18 P0.14 39 P1.18
|
||||
19 P0.15 38 P1.17
|
||||
20 P0.16 37 P1.16
|
||||
21 P0.17 36 P0.31
|
||||
22 P0.18 35 P0.30
|
||||
23 P0.19 34 P0.29
|
||||
24 P0.20 33 P0.28
|
||||
25 P0.21 32 P0.27
|
||||
26 P0.22 31 P0.26
|
||||
27 P0.23 30 P0.25
|
||||
28 GND 29 GND
|
||||
|
||||
JTAG Debug:
|
||||
-----------
|
||||
PIN NAME PIN NAME
|
||||
1 VCC1 2 3V3
|
||||
3 P1.31 NTRST 4 GND
|
||||
5 P1.28 TDI 6 GND
|
||||
7 P1.30 TMS 8 GND
|
||||
9 P1.29 TCK 10 GND
|
||||
11 P1.26 RTCK 12 GND
|
||||
13 P1.27 TDO 14 GND
|
||||
15 RESET NRTS 16 GND
|
||||
17 N/C NC0 18 GND
|
||||
19 N/C NC1 20 GND
|
||||
|
||||
Z28160 Net Module:
|
||||
------------------
|
||||
PIN NAME PIN NAME
|
||||
1 P0.7 /CS 10 3V3 VCC
|
||||
2 P0.4 SCK 9 P1.24 RST
|
||||
3 P0.6 SI 8 N/C CLKOUT
|
||||
4 P0.5 SO 7 INT P1.25
|
||||
5 GND 6 N/C WOL
|
||||
|
||||
SPI LCD:
|
||||
--------
|
||||
PIN NAME
|
||||
1 3V3 3V3
|
||||
2 VCC 5V
|
||||
3 P0.18 RESET(DO)
|
||||
4 P0.19 DI
|
||||
5 P0.20 CS
|
||||
6 P0.17 SCK
|
||||
7 P0.23 A0(RESET)
|
||||
8 N/C LED-
|
||||
9 N/C LED+(BL)
|
||||
10 GND GND
|
||||
|
||||
USB Interface:
|
||||
--------------
|
||||
Vusb, P0.26, P0.27
|
||||
|
||||
Serial Console:
|
||||
===============
|
||||
|
||||
Both UART0 and UART1 are always enabled. UART0 is configured to be the
|
||||
serial console in these configurations.
|
||||
|
||||
P0.0/TXD0/PWM1 Module Socket, Pin 4
|
||||
P0.1/RxD0/PWM3/EINT0 Module Socket, Pin 5
|
||||
|
||||
P0.8/TXD1/PWM4/AD1.1 Module Socket, Pin 12
|
||||
P0.9/RxD1/PWM6/EINT3 Module Socket, Pin 13
|
||||
|
||||
Configurations:
|
||||
===============
|
||||
|
||||
Each NXP LPC214x configuration is maintained in a sudirectory and
|
||||
can be selected as follow:
|
||||
|
||||
cd tools
|
||||
./configure.sh zp214xpa/<subdir>
|
||||
cd -
|
||||
. ./setenv.sh
|
||||
|
||||
Where <subdir> is one of the following:
|
||||
|
||||
nsh:
|
||||
----
|
||||
|
||||
Configures the NuttShell (nsh) located at examples/nsh. The
|
||||
Configuration enables only the serial NSH interfaces.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. This configuration uses the mconf-based configuration tool. To
|
||||
change this configuration using that tool, you should:
|
||||
|
||||
a. Build and install the mconf tool. See nuttx/README.txt and
|
||||
misc/tools/
|
||||
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
2. Default platform/toolchain:
|
||||
|
||||
CONFIG_HOST_LINUX=y : Windows
|
||||
CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
|
||||
CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
|
||||
@@ -0,0 +1,68 @@
|
||||
/****************************************************************************
|
||||
* configs/zp214xpa/include/board.h
|
||||
*
|
||||
* Copyright (C) 2012 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_ZP214XPA_INCLUDE_BOARD_H
|
||||
#define __CONFIGS_ZP214XPA_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
/* Oscillator frequency */
|
||||
|
||||
#define LPC214X_FOSC 12000000
|
||||
|
||||
/* PLL0 settings CCLK = PLL_M * FOSC PCLK = CCLK/APBDIV */
|
||||
|
||||
#define LPC214X_PLL_M 5
|
||||
#define LPC214X_PLL_P 2
|
||||
#define LPC214X_APB_DIV 1
|
||||
|
||||
/* USB Pll settings -- 48 MHz needed. FUSB = PLL_M FOSC */
|
||||
|
||||
#define LPC214X_USBPLL_M 4
|
||||
#define LPC214X_USBPLL_P 2
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __CONFIGS_ZP214XPA_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,128 @@
|
||||
##############################################################################
|
||||
# configs/zp214xpa/nsh/Make.defs
|
||||
#
|
||||
# Copyright (C) 2012 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
|
||||
|
||||
# The default value for CROSSDEV can be overridden from the make command line:
|
||||
# make -- Will build for the NuttX buildroot toolchain
|
||||
# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
|
||||
# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
|
||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX buildroot toolchain
|
||||
|
||||
CROSSDEV = arm-nuttx-elf-
|
||||
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
|
||||
|
||||
HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
|
||||
|
||||
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 ($(ARCHCCMAJOR),4)
|
||||
ifneq ($(HOSTOS),Cygwin)
|
||||
OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
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/ld.script
|
||||
MAXOPTIMIZATION = -Os
|
||||
else
|
||||
WINTOOL = y
|
||||
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/ld.script}"
|
||||
MAXOPTIMIZATION = -O2
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
else
|
||||
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifeq ($(ARCHCCMAJOR),4)
|
||||
ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft
|
||||
else
|
||||
ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
ARCHDEFINES =
|
||||
|
||||
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-gotoff.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 =
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+65
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
# configs/zp214xpa/nsh/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2012 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 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"
|
||||
|
||||
# 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"
|
||||
|
||||
# The zp214xpa/tools directory
|
||||
export LPCTOOL_DIR="${WD}/configs/zp214xpa/tools"
|
||||
|
||||
# Add the path to the toolchain and tools directory to the PATH varialble
|
||||
export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
@@ -0,0 +1,120 @@
|
||||
/****************************************************************************
|
||||
* configs/zp214xpa/scripts/ld.script
|
||||
*
|
||||
* Copyright (C) 2012 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* FLASH:
|
||||
* The lpc2148 has 512Kb of non-volatile memory beginning at address
|
||||
* 0x0000:0000. The OS entry point is via the reset vector at address
|
||||
* 0x0000:0000 (default MEMMAP mode assumed)
|
||||
*
|
||||
* SRAM:
|
||||
* The lpc2148 has 32Kb of on-chip static RAM beginning at address
|
||||
* 0x4000:0000. The .data section will be relocated from _eronly
|
||||
* to _sdata at boot time.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K
|
||||
sram (rw) : ORIGIN = 0x40000000, LENGTH = 32K - 32
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_stext)
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
############################################################################
|
||||
# configs/zp214xpa/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2012 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)/Make.defs
|
||||
|
||||
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}"
|
||||
else
|
||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/arm -I$(TOPDIR)/sched
|
||||
endif
|
||||
|
||||
ASRCS =
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
CSRCS =
|
||||
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
CFLAGS += -I $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||
|
||||
all: libboard$(LIBEXT)
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libboard$(LIBEXT): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
$(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
$(call DELFILE, libboard$(LIBEXT))
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
$(call DELFILE, Make.dep)
|
||||
$(call DELFILE, .depend)
|
||||
|
||||
-include Make.dep
|
||||
Reference in New Issue
Block a user