2007-02-18 00:21:28 +01:00
|
|
|
Architecture-Specific Code
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2007-03-02 23:44:29 +01:00
|
|
|
Table of Contents
|
|
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
o Architecture-Specific Code
|
|
|
|
o Summary of Files
|
|
|
|
o Supported Architectures
|
|
|
|
o Configuring NuttX
|
|
|
|
|
|
|
|
Architecture-Specific Code
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2007-03-27 23:27:41 +02:00
|
|
|
The NuttX configuration consists of:
|
|
|
|
|
|
|
|
o Processor architecture specific files. These are the files contained
|
|
|
|
in the arch/<arch-name>/ directory discussed in this README.
|
|
|
|
|
|
|
|
o Chip/SoC specific files. Each processor processor architecture
|
|
|
|
is embedded in chip or System-on-a-Chip (SoC) architecture. The
|
|
|
|
full chip architecture includes the processor architecture plus
|
|
|
|
chip-specific interrupt logic, general purpose I/O (GIO) logic, and
|
|
|
|
specialized, internal peripherals (such as UARTs, USB, etc.).
|
|
|
|
|
|
|
|
These chip-specific files are contained within chip-specific
|
|
|
|
sub-directories in the arch/<arch-name>/ directory and are selected
|
|
|
|
via the CONFIG_ARCH_name selection
|
|
|
|
|
|
|
|
o Board specific files. In order to be usable, the chip must be
|
|
|
|
contained in a board environment. The board configuration defines
|
|
|
|
additional properties of the board including such things as
|
|
|
|
peripheral LEDs, external peripherals (such as network, USB, etc.).
|
|
|
|
|
|
|
|
These board-specific configuration files can be found in the
|
|
|
|
configs/<board-name>/ sub-directories.
|
|
|
|
|
|
|
|
This README will address the processor architecture specific files
|
|
|
|
that are contained in the arch/<arch-name>/ directory. The file
|
|
|
|
include/nuttx/arch.h identifies all of the APIs that must
|
|
|
|
be provided by this architecture specific logic. (It also includes
|
2007-02-18 00:21:28 +01:00
|
|
|
arch/<arch-name>/arch.h as described below).
|
|
|
|
|
|
|
|
Directory Structure
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2007-03-23 03:25:54 +01:00
|
|
|
The arch directory contains architecture specific logic. The complete
|
|
|
|
board port in is defined by the architecture-specific code in this
|
|
|
|
directory (plus the board-specific configurations in the config/
|
|
|
|
subdirectory). Each architecture must provide a subdirectory <arch-name>
|
|
|
|
under arch/ with the following characteristics:
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
|
2007-03-27 23:27:41 +02:00
|
|
|
<arch-name>/
|
|
|
|
|-- include/
|
|
|
|
| |--<chip-name>/
|
|
|
|
| | `-- (chip-specific header files)
|
|
|
|
| |--<other-chips>/
|
2007-02-18 00:21:28 +01:00
|
|
|
| |-- arch.h
|
|
|
|
| |-- irq.h
|
|
|
|
| `-- types.h
|
2007-03-27 23:27:41 +02:00
|
|
|
`-- src/
|
|
|
|
|--<chip-name>/
|
|
|
|
| `-- (chip-specific source files)
|
|
|
|
|--<other-chips>/
|
2007-02-18 00:21:28 +01:00
|
|
|
|-- Makefile
|
|
|
|
`-- (architecture-specific source files)
|
|
|
|
|
|
|
|
Summary of Files
|
|
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
|
2007-03-27 23:27:41 +02:00
|
|
|
include/<chip-name>/
|
|
|
|
This sub-directory contains chip-specific header files.
|
|
|
|
|
2007-02-18 00:21:28 +01:00
|
|
|
include/arch.h
|
|
|
|
This is a hook for any architecture specific definitions that may
|
|
|
|
be needed by the system. It is included by include/nuttx/arch.h
|
|
|
|
|
|
|
|
include/types.h
|
|
|
|
This provides architecture/toolchain-specific definitions for
|
|
|
|
standard types. This file should typedef:
|
|
|
|
|
2007-02-21 22:55:16 +01:00
|
|
|
sbyte, ubyte, uint8, boolean, sint16, uint16, sint32, uint32
|
|
|
|
|
|
|
|
and
|
|
|
|
|
|
|
|
sint64, uint64
|
|
|
|
|
|
|
|
if the architecture supports 64-bit integers.
|
|
|
|
|
|
|
|
irqstate_t
|
|
|
|
|
|
|
|
Must be defined to the be the size required to hold the interrupt
|
|
|
|
enable/disable state.
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
This file will be included by include/sys/types.h and be made
|
|
|
|
available to all files.
|
|
|
|
|
|
|
|
include/irq.h
|
|
|
|
This file needs to define some architecture specific functions (usually
|
2007-02-21 00:16:24 +01:00
|
|
|
inline if the compiler supports inlining) and structure. These include:
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
- struct xcptcontext. This structures represents the saved context
|
|
|
|
of a thread.
|
|
|
|
|
2007-02-21 22:55:16 +01:00
|
|
|
- irqstate_t irqsave(void) -- Used to disable all interrupts.
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2007-02-21 22:55:16 +01:00
|
|
|
- void irqrestore(irqstate_t flags) -- Used to restore interrupt
|
2007-02-21 00:16:24 +01:00
|
|
|
enables to the same state as before irqsave was called.
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
This file must also define NR_IRQS, the total number of IRQs supported
|
|
|
|
by the board.
|
|
|
|
|
2007-03-27 23:27:41 +02:00
|
|
|
src/<chip-name>/
|
|
|
|
This sub-directory contains chip-specific source files.
|
|
|
|
|
2007-02-18 00:21:28 +01:00
|
|
|
src/Makefile
|
|
|
|
This makefile will be executed to build the targets src/libup.a and
|
|
|
|
src/up_head.o. The up_head.o file holds the entry point into the system
|
|
|
|
(power-on reset entry point, for example). It will be used in
|
|
|
|
the final link with libup.a and other system archives to generate the
|
|
|
|
final executable.
|
|
|
|
|
2007-03-02 23:44:29 +01:00
|
|
|
Supported Architectures
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2007-03-19 23:45:58 +01:00
|
|
|
arch/sim
|
|
|
|
A user-mode port of NuttX to the x86 Linux platform is available.
|
|
|
|
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.
|
|
|
|
|
2007-03-02 23:44:29 +01:00
|
|
|
arch/c5471
|
2007-03-19 23:45:58 +01:00
|
|
|
TI TMS320C5471 (also called TMS320DM180 or just C5471).
|
2007-03-02 23:44:29 +01:00
|
|
|
NuttX operates on the ARM7 of this dual core processor. This port
|
2007-03-23 03:25:54 +01:00
|
|
|
complete, verified, and included in the NuttX release 0.1.1.
|
2007-03-19 23:45:58 +01:00
|
|
|
|
|
|
|
arch/dm320
|
|
|
|
TI TMS320DM320 (also called just DM320).
|
2007-03-23 03:25:54 +01:00
|
|
|
NuttX operates on the ARM9EJS of this dual core processor. This port
|
|
|
|
complete, verified, and included in the NuttX release 0.2.1.
|
|
|
|
|
|
|
|
arch/m68322
|
|
|
|
A work in progress.
|
2007-03-02 23:44:29 +01:00
|
|
|
|
|
|
|
arch/pjrc-8051
|
2007-03-23 03:25:54 +01:00
|
|
|
8051 Microcontroller. This port is not quite ready for prime time.
|
2007-03-02 23:44:29 +01:00
|
|
|
|
|
|
|
Other ports for the for the TI TMS320DM270 and for MIPS are in various states
|
|
|
|
of progress
|
|
|
|
|
2007-02-18 00:21:28 +01:00
|
|
|
|