summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-04-25 00:09:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-04-25 00:09:44 +0000
commitb4d75115f84e9ba0002214264e064e823d9df4e8 (patch)
tree4fa34dc4a4e5e5eb287dafc65c6987e418e4265a
parent170ec8f545ce2ea7928a00e112ffc70b0f0a5281 (diff)
downloadnuttx-b4d75115f84e9ba0002214264e064e823d9df4e8.tar.gz
nuttx-b4d75115f84e9ba0002214264e064e823d9df4e8.tar.bz2
nuttx-b4d75115f84e9ba0002214264e064e823d9df4e8.zip
Makesystem changes to better support different SoCs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@184 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/ChangeLog1
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html35
-rw-r--r--nuttx/Makefile46
-rw-r--r--nuttx/arch/c5471/src/c5471.h2
-rw-r--r--nuttx/arch/c5471/src/up_internal.h2
-rw-r--r--nuttx/arch/dm320/src/dm320.h2
-rw-r--r--nuttx/arch/pjrc-8051/src/up_internal.h2
-rw-r--r--nuttx/configs/README.txt13
-rw-r--r--nuttx/configs/c5471evm/Make.defs2
-rw-r--r--nuttx/configs/c5471evm/defconfig8
-rw-r--r--nuttx/configs/m68332evb/Make.defs2
-rw-r--r--nuttx/configs/m68332evb/defconfig8
-rw-r--r--nuttx/configs/ntosd-dm320/Make.defs2
-rw-r--r--nuttx/configs/ntosd-dm320/defconfig8
-rw-r--r--nuttx/configs/pjrc-8051/defconfig10
-rw-r--r--nuttx/configs/sim/defconfig8
16 files changed, 111 insertions, 40 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index b4364a331..84ef49523 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -114,4 +114,5 @@
0.2.4 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
* Verfied c5471 build under Cygwin on WinXP
+ * Makesystem changes to better support different SoCs.
* Started m68322
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 90dfcec54..c0cd8eaca 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -331,16 +331,24 @@
The purpose of this port is primarily to support OS feature developement.
This port does not support interrupts or a real timer (and hence no
round robin scheduler) Otherwise, it is complete.
+
<li><code>arch/c5471</code>:
TI TMS320C5471 (also called TMS320DM180 or just C5471).
NuttX operates on the ARM7 of this dual core processor.
This port is complete, verified, and included in the NuttX release 0.1.1.
+
+ <li><code>configs/mcu123-lpc214x</code>:
+ The mcu123.com lpc214x development board.
+ This is a work in progress.
+
<li><code>arch/dm320</code>:
- TI TMS320DM320 (also called just DM320).
- NuttX operates on the ARM9EJS of this dual core processor.
- This port complete, verified, and included in the NuttX release 0.2.1.
+ TI TMS320DM320 (also called just DM320).
+ NuttX operates on the ARM9EJS of this dual core processor.
+ This port complete, verified, and included in the NuttX release 0.2.1.
+
<li><code>arch/m68322</code>
- A work in progress.</li>
+ A work in progress.</li>
+
<li><code>arch/pjrc-8051</code>:
8051 Microcontroller. This port is not quite ready for prime time.</li>
</ul>
@@ -463,6 +471,10 @@
with a GNU arm-elf toolchain*. This port is complete, verified, and
included in the NuttX release.</li>
+ <li><code>configs/mcu123-lpc214x</code>:
+ This is a port to the mcu123.com lpc214x development board.
+ This OS is also built with the arm-elf toolchain*.</li>
+
<li><code>configs/ntosd-dm320</code>:
This port uses the Neuros OSD with a GNU arm-elf toolchain*.
See <a href="http://wiki.neurostechnology.com/index.php/Developer_Welcome">Neuros Wiki</a>
@@ -1035,8 +1047,19 @@ The system can be re-made subsequently by just typing <code>make</code>.
<h2>Architecture selection</h2>
<ul>
- <li><code>CONFIG_ARCH</code>: identifies the arch subdirectory
- <li><code>CONFIG_ARCH_name</code>: for use in C code
+ <li><code>CONFIG_ARCH</code>:
+ Identifies the arch subdirectory</li>
+ <li><code>CONFIG_ARCH_name</code>:
+ For use in C code</li>
+ <li><code>CONFIG_ARCH_CHIP</code>:
+ Identifies the arch/*/chip subdirectory</li>
+ <li><code>CONFIG_ARCH_CHIP_name</code>:
+ For use in C code</li>
+ <li><code>CONFIG_ARCH_BOARD</code>:
+ Identifies the configs subdirectory and hence, the board that supports
+ the particular chip or SoC.</li>
+ <li><code>CONFIG_ARCH_BOARD_name</code>:
+ For use in C code</li>
</ul>
<h2>General OS setup</h2>
diff --git a/nuttx/Makefile b/nuttx/Makefile
index 9a76f077a..b0af8e938 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -40,7 +40,7 @@ TOPDIR = ${shell pwd}
ARCH_DIR = arch/$(CONFIG_ARCH)
ARCH_SRC = $(ARCH_DIR)/src
ARCH_INC = $(ARCH_DIR)/include
-BOARD_DIR = configs/$(CONFIG_BOARD)
+BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
SUBDIRS = sched lib $(ARCH_SRC) mm fs drivers examples/$(CONFIG_EXAMPLE)
@@ -53,12 +53,15 @@ BIN = nuttx$(EXEEXT)
all: $(BIN)
.PHONY: clean context clean_context distclean
+# Build the mkconfig tool used to create include/nuttx/config.h
tools/mkconfig:
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) mkconfig
+# Create the include/nuttx/config.h file
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
tools/mkconfig $(TOPDIR) > include/nuttx/config.h
+# link the arch/<arch-name>/include dir to include/arch
include/arch: Make.defs
@if [ -e include/arch ]; then \
if [ -h include/arch ]; then \
@@ -70,6 +73,7 @@ include/arch: Make.defs
fi
@ln -s $(TOPDIR)/$(ARCH_DIR)/include include/arch
+# Link the configs/<board-name>/include dir to include/arch/board
include/arch/board: Make.defs include/arch
@if [ -e include/arch/board ]; then \
if [ -h include/arch/board ]; then \
@@ -81,6 +85,7 @@ include/arch/board: Make.defs include/arch
fi
@ln -s $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
+# Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
$(ARCH_SRC)/board: Make.defs
@if [ -e $(ARCH_SRC)/board ]; then \
if [ -h $(ARCH_SRC)/board ]; then \
@@ -92,10 +97,45 @@ $(ARCH_SRC)/board: Make.defs
fi
@ln -s $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
-context: check_context include/nuttx/config.h include/arch include/arch/board $(ARCH_SRC)/board
+# Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
+$(ARCH_SRC)/chip: Make.defs
+ifneq ($(CONFIG_ARCH_CHIP),)
+ @if [ -e $(ARCH_SRC)/chip ]; then \
+ if [ -h $(ARCH_SRC)/chip ]; then \
+ rm -f $(ARCH_SRC)/chip ; \
+ else \
+ echo "$(ARCH_SRC)/chip exists but is not a symbolic link" ; \
+ exit 1 ; \
+ fi ; \
+ fi
+ @ln -s $(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
+endif
+
+# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
+$(ARCH_INC)/chip: Make.defs
+ifneq ($(CONFIG_ARCH_CHIP),)
+ @if [ -e $(ARCH_INC)/chip ]; then \
+ if [ -h $(ARCH_INC)/chip ]; then \
+ rm -f $(ARCH_INC)/chip ; \
+ else \
+ echo "$(ARCH_INC)/chip exists but is not a symbolic link" ; \
+ exit 1 ; \
+ fi ; \
+ fi
+ @ln -s $(CONFIG_ARCH_CHIP) $(ARCH_INC)/chip
+endif
+
+dirlinks: include/arch include/arch/board $(ARCH_SRC)/board $(ARCH_SRC)/chip $(ARCH_INC)/chip
+
+context: check_context include/nuttx/config.h dirlinks
clean_context:
- rm -f include/nuttx/config.h include/arch $(ARCH_INC)/board $(ARCH_SRC)/board
+ @rm -f include/nuttx/config.h include/arch
+ @if [ -h include/arch ]; then rm -f include/arch ; fi
+ @if [ -h $(ARCH_INC)/board ]; then rm -f $(ARCH_INC)/board ; fi
+ @if [ -h $(ARCH_SRC)/board ]; then rm -f $(ARCH_SRC)/board ; fi
+ @if [ -h $(ARCH_INC)/chip ]; then rm -f $(ARCH_INC)/chip ; fi
+ @if [ -h $(ARCH_SRC)/chip ]; then rm -f $(ARCH_SRC)/chip ; fi
check_context:
@if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
diff --git a/nuttx/arch/c5471/src/c5471.h b/nuttx/arch/c5471/src/c5471.h
index b91c9f3d1..9c085d7d7 100644
--- a/nuttx/arch/c5471/src/c5471.h
+++ b/nuttx/arch/c5471/src/c5471.h
@@ -46,7 +46,7 @@
# include <sys/types.h>
#endif
-#if defined(CONFIG_BOARD_C5471EVM)
+#if defined(CONFIG_ARCH_BOARD_C5471EVM)
# include <arch/board/c5471evm.h>
#else
# warning "Undefined C5471 Board"
diff --git a/nuttx/arch/c5471/src/up_internal.h b/nuttx/arch/c5471/src/up_internal.h
index fc5f92f7b..c032fa543 100644
--- a/nuttx/arch/c5471/src/up_internal.h
+++ b/nuttx/arch/c5471/src/up_internal.h
@@ -42,7 +42,7 @@
#include <nuttx/config.h>
-#if defined(CONFIG_BOARD_C5471EVM)
+#if defined(CONFIG_ARCH_BOARD_C5471EVM)
# include <arch/board/c5471evm.h>
#else
# warning "Undefined C5471 Board"
diff --git a/nuttx/arch/dm320/src/dm320.h b/nuttx/arch/dm320/src/dm320.h
index 6f0f89e16..a147abd41 100644
--- a/nuttx/arch/dm320/src/dm320.h
+++ b/nuttx/arch/dm320/src/dm320.h
@@ -47,7 +47,7 @@
#include "arm9.h"
-#if defined(CONFIG_BOARD_NTOSD_DM320)
+#if defined(CONFIG_ARCH_BOARD_NTOSD_DM320)
# include <arch/board/ntosd.h>
#else
# warning "Unknown DM320 board"
diff --git a/nuttx/arch/pjrc-8051/src/up_internal.h b/nuttx/arch/pjrc-8051/src/up_internal.h
index 90ba556e9..8b2e2018a 100644
--- a/nuttx/arch/pjrc-8051/src/up_internal.h
+++ b/nuttx/arch/pjrc-8051/src/up_internal.h
@@ -43,7 +43,7 @@
#include <nuttx/config.h>
#include <arch/irq.h>
-#if defined(CONFIG_BOARD_PJRC_87C52)
+#if defined(CONFIG_ARCH_BOARD_PJRC_87C52)
# include <arch/board/pjrc.h>
#else
# warning "805x board not recognized"
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index f09046dff..ac1565f84 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -104,8 +104,13 @@ defconfig -- This is a configuration file similar to the Linux
Architecture selection:
- CONFIG_ARCH - identifies the arch/ subdirectory
- CONFIG_ARCH_name - for use in C code
+ CONFIG_ARCH - Identifies the arch/ subdirectory
+ CONFIG_ARCH_name - For use in C code
+ CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
+ CONFIG_ARCH_CHIP_name - For use in C code
+ CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
+ hence, the board that supports the particular chip or SoC.
+ CONFIG_ARCH_BOARD_name - For use in C code
General OS setup
@@ -220,6 +225,10 @@ configs/c5471evm
with a GNU arm-elf toolchain*. This port is complete, verified, and
included in the NuttX release.
+configs/mcu123-lpc214x
+ This is a port to the mcu123.com lpc214x development board.
+ This OS is also built with the the arm-elf toolchain*
+
configs/ntosd-dm320
This port uses the Neuros OSD with a GNU arm-elf toolchain*:
see http://wiki.neurostechnology.com/index.php/Developer_Welcome .
diff --git a/nuttx/configs/c5471evm/Make.defs b/nuttx/configs/c5471evm/Make.defs
index f0ef5c845..8baeb3f36 100644
--- a/nuttx/configs/c5471evm/Make.defs
+++ b/nuttx/configs/c5471evm/Make.defs
@@ -47,7 +47,7 @@ ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
-ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_BOARD)/ld.script
+ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ld.script
CROSSDEV = arm-elf-
CC = $(CROSSDEV)gcc
diff --git a/nuttx/configs/c5471evm/defconfig b/nuttx/configs/c5471evm/defconfig
index 2971805c5..3fd6a2e5d 100644
--- a/nuttx/configs/c5471evm/defconfig
+++ b/nuttx/configs/c5471evm/defconfig
@@ -40,9 +40,9 @@
# CONFIG_ARCH_name - for use in C code. This identifies the
# particular chip or SoC that the architecture is implemented
# in.
-# CONFIG_BOARD - identifies the configs subdirectory and, hence,
+# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
-# CONFIG_BOARD_name - for use in C code
+# CONFIG_ARCH_BOARD_name - for use in C code
# CONFIG_ROM_VECTORS - unique to c5471
# CONFIG_DRAM_END - the size of installed DRAM.
# Unique to c5471
@@ -51,8 +51,8 @@
#
CONFIG_ARCH=c5471
CONFIG_ARCH_C5471=y
-CONFIG_BOARD=c5471evm
-CONFIG_BOARD_C5471EVM=y
+CONFIG_ARCH_BOARD=c5471evm
+CONFIG_ARCH_BOARD_C5471EVM=y
CONFIG_ROM_VECTORS=n
CONFIG_DRAM_END=0x11000000
CONFIG_ARCH_LEDS=y
diff --git a/nuttx/configs/m68332evb/Make.defs b/nuttx/configs/m68332evb/Make.defs
index 2dc2d5b2b..74f14b967 100644
--- a/nuttx/configs/m68332evb/Make.defs
+++ b/nuttx/configs/m68332evb/Make.defs
@@ -47,7 +47,7 @@ ARCHPICFLAGS = -pic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
-ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_BOARD)/ld.script
+ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ld.script
CROSSDEV = m68k-elf-
CC = $(CROSSDEV)gcc
diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig
index c63dc6aa2..256256362 100644
--- a/nuttx/configs/m68332evb/defconfig
+++ b/nuttx/configs/m68332evb/defconfig
@@ -40,17 +40,17 @@
# CONFIG_ARCH_name - for use in C code. This identifies the
# particular chip or SoC that the architecture is implemented
# in.
-# CONFIG_BOARD - identifies the configs subdirectory and, hence,
+# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
-# CONFIG_BOARD_name - for use in C code
+# CONFIG_ARCH_BOARD_name - for use in C code
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
#
CONFIG_ARCH=m68332evb
CONFIG_ARCH_M68332=y
CONFIG_ARCH_M68332EVB=y
-CONFIG_BOARD=m68332evb
-CONFIG_BOARD_M68332EVB=y
+CONFIG_ARCH_BOARD=m68332evb
+CONFIG_ARCH_BOARD_M68332EVB=y
CONFIG_DRAM_SIZE=0x003000
CONFIG_DRAM_NUTTXENTRY=0x003000
CONFIG_ARCH_STACKDUMP=y
diff --git a/nuttx/configs/ntosd-dm320/Make.defs b/nuttx/configs/ntosd-dm320/Make.defs
index 8fbe74836..62302a2f4 100644
--- a/nuttx/configs/ntosd-dm320/Make.defs
+++ b/nuttx/configs/ntosd-dm320/Make.defs
@@ -47,7 +47,7 @@ ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
-ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_BOARD)/ld.script
+ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ld.script
CROSSDEV = arm-elf-
CC = $(CROSSDEV)gcc
diff --git a/nuttx/configs/ntosd-dm320/defconfig b/nuttx/configs/ntosd-dm320/defconfig
index 7ea06e217..bb20353e0 100644
--- a/nuttx/configs/ntosd-dm320/defconfig
+++ b/nuttx/configs/ntosd-dm320/defconfig
@@ -40,17 +40,17 @@
# CONFIG_ARCH_name - for use in C code. This identifies the
# particular chip or SoC that the architecture is implemented
# in.
-# CONFIG_BOARD - identifies the configs subdirectory and, hence,
+# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
-# CONFIG_BOARD_name - for use in C code
+# CONFIG_ARCH_BOARD_name - for use in C code
# CONFIG_ROM_VECTORS - unique to dm320
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
#
CONFIG_ARCH=dm320
CONFIG_ARCH_DM320=y
-CONFIG_BOARD=ntosd-dm320
-CONFIG_BOARD_NTOSD_DM320=y
+CONFIG_ARCH_BOARD=ntosd-dm320
+CONFIG_ARCH_BOARD_NTOSD_DM320=y
CONFIG_ROM_VECTORS=n
CONFIG_DRAM_SIZE=0x01000000
CONFIG_DRAM_NUTTXENTRY=0x01008000
diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig
index cc5da93bd..a3aabdbdb 100644
--- a/nuttx/configs/pjrc-8051/defconfig
+++ b/nuttx/configs/pjrc-8051/defconfig
@@ -39,17 +39,15 @@
# processor architecture.
# CONFIG_ARCH_8051 - Set if processor is 8051 family
# CONFIG_ARCH_8052 = Set if processor is 8052 family
-# CONFIG_BOARD - identifies the configs subdirectory and, hence,
+# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
-# CONFIG_BOARD_name - for use in C code
-# CONFIG_BOARD - identifies the configs subdirectory
-# CONFIG_BARD_name - for use in C code
+# CONFIG_ARCH_BOARD_name - for use in C code
#
CONFIG_ARCH=pjrc-8051
CONFIG_ARCH_8051=n
CONFIG_ARCH_8052=y
-CONFIG_BOARD=pjrc-8051
-CONFIG_BOARD_PJRC_87C52=y
+CONFIG_ARCH_BOARD=pjrc-8051
+CONFIG_ARCH_BOARD_PJRC_87C52=y
#
# Architecture-specific settings. These may mean nothing to
diff --git a/nuttx/configs/sim/defconfig b/nuttx/configs/sim/defconfig
index 935ca1db2..7736a65de 100644
--- a/nuttx/configs/sim/defconfig
+++ b/nuttx/configs/sim/defconfig
@@ -40,14 +40,14 @@
# CONFIG_ARCH_name - for use in C code. This identifies the
# particular chip or SoC that the architecture is implemented
# in.
-# CONFIG_BOARD - identifies the configs subdirectory and, hence,
+# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
-# CONFIG_BOARD_name - for use in C code
+# CONFIG_ARCH_BOARD_name - for use in C code
#
CONFIG_ARCH=sim
CONFIG_ARCH_SIM=y
-CONFIG_BOARD=sim
-CONFIG_BOARD_SIM=y
+CONFIG_ARCH_BOARD=sim
+CONFIG_ARCH_BOARD_SIM=y
#
# General OS setup