mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 07:28:38 +08:00
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
This commit is contained in:
parent
c241fb2128
commit
58cf518670
16 changed files with 111 additions and 40 deletions
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
46
Makefile
46
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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 .
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue