9
0
Fork 0

Makesystem changes to better support different SoCs

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@184 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2007-04-25 00:09:44 +00:00
parent 43d40e49e3
commit 914e17dbe8
16 changed files with 111 additions and 40 deletions

View File

@ -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

View File

@ -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>

View File

@ -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 \

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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 .

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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