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
|
2019-08-08 16:46:54 +02:00
|
|
|
boards/<arch>/<chip>/<board> sub-directories.
|
2007-03-27 23:27:41 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2019-03-17 20:42:44 +01:00
|
|
|
The arch/ directory contains architecture-specific logic. The complete
|
|
|
|
board port 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>
|
2007-03-23 03:25:54 +01:00
|
|
|
under arch/ with the following characteristics:
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
|
2011-03-04 23:25:03 +01:00
|
|
|
<arch-name>/
|
|
|
|
|-- include/
|
|
|
|
| |--<chip-name>/
|
|
|
|
| | `-- (chip-specific header files)
|
|
|
|
| |--<other-chips>/
|
|
|
|
| |-- arch.h
|
|
|
|
| |-- irq.h
|
|
|
|
| `-- types.h
|
|
|
|
`-- src/
|
|
|
|
|--<chip-name>/
|
|
|
|
| `-- (chip-specific source files)
|
|
|
|
|--<other-chips>/
|
|
|
|
|-- Makefile
|
|
|
|
`-- (architecture-specific source files)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
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:
|
|
|
|
|
2009-12-16 21:30:06 +01:00
|
|
|
_int8_t, _uint8_t, _int16_t, _uint16_t, _int32_t, _uint32_t
|
2007-02-21 22:55:16 +01:00
|
|
|
|
2019-03-17 20:42:44 +01:00
|
|
|
and if the architecture supports 64-bit integers:
|
2007-02-21 22:55:16 +01:00
|
|
|
|
2019-03-17 20:42:44 +01:00
|
|
|
_int24_t, _uint24_t, _int64_t, _uint64_t
|
2007-02-21 22:55:16 +01:00
|
|
|
|
2009-12-16 21:30:06 +01:00
|
|
|
NOTE that these type names have a leading underscore character. This
|
|
|
|
file will be included(indirectly) by include/stdint.h and typedef'ed to
|
|
|
|
the final name without the underscore character. This roundabout way of
|
|
|
|
doings things allows the stdint.h to be removed from the include/
|
|
|
|
directory in the event that the user prefers to use the definitions
|
2019-03-17 20:42:44 +01:00
|
|
|
provided by their toolchain header files.
|
2007-02-21 22:55:16 +01:00
|
|
|
|
|
|
|
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
|
2019-03-17 20:42:44 +01:00
|
|
|
This file needs to define some architecture-specific functions (usually
|
|
|
|
inline if the compiler supports inlining) and structures. These include:
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2019-03-17 20:42:44 +01:00
|
|
|
- struct xcptcontext. This structure represents the saved context
|
2007-02-18 00:21:28 +01:00
|
|
|
of a thread.
|
|
|
|
|
2016-02-14 23:11:25 +01:00
|
|
|
- irqstate_t up_irq_save(void) -- Used to disable all interrupts.
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2016-02-14 23:11:25 +01:00
|
|
|
- void upirq_restore(irqstate_t flags) -- Used to restore interrupt
|
|
|
|
enables to the same state as before up_irq_save was called.
|
|
|
|
|
|
|
|
NOTE: These interfaces are not available to application code but can
|
2019-03-17 20:42:44 +01:00
|
|
|
only be used within the operating system code. And, in general,
|
2016-02-14 23:11:25 +01:00
|
|
|
these functions should *never* be called directly, not unless you
|
|
|
|
know absolutely well what you are doing. Rather you shoudl typically
|
|
|
|
use the wrapper functions enter_critical_section() and leave_critical_section()
|
|
|
|
as prototyped in include/nuttx/irq.h.
|
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
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
2016-05-30 19:52:07 +02:00
|
|
|
NOTE: nuttx/Documentation/NuttX.html for current information about the
|
|
|
|
state of these MCU ports.
|
2007-03-02 23:44:29 +01:00
|
|
|
|
2008-11-07 01:28:42 +01:00
|
|
|
arch/sim - Linux/Cygwin simulation
|
2007-03-19 23:45:58 +01:00
|
|
|
A user-mode port of NuttX to the x86 Linux platform is available.
|
2008-02-07 15:41:11 +01:00
|
|
|
The purpose of this port is primarily to support OS feature development.
|
2007-03-19 23:45:58 +01:00
|
|
|
This port does not support interrupts or a real timer (and hence no
|
|
|
|
round robin scheduler) Otherwise, it is complete.
|
|
|
|
|
2008-02-14 21:53:15 +01:00
|
|
|
arch/arm - ARM-based micro-controllers
|
2007-04-28 22:07:05 +02:00
|
|
|
This directory holds common ARM architectures. At present, this includes
|
|
|
|
the following subdirectories:
|
2007-03-19 23:45:58 +01:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
Architecture Support
|
|
|
|
arch/arm/include and arch/arm/src/common
|
|
|
|
arch/arm/src/arm and arch/arm/include/arm
|
2016-08-06 23:43:27 +02:00
|
|
|
arch/arm/src/armv7-a and arch/arm/include/armv6-m
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/src/armv7-a and arch/arm/include/armv7-a
|
|
|
|
arch/arm/src/armv7-m and arch/arm/include/armv7-m
|
2016-08-06 23:43:27 +02:00
|
|
|
arch/arm/src/armv7-r and arch/arm/include/armv7-r
|
2016-05-30 19:52:07 +02:00
|
|
|
|
|
|
|
MCU support
|
2016-08-06 23:43:27 +02:00
|
|
|
arch/arm/include/a1x and arch/arm/src/a1x
|
2019-01-06 16:05:38 +01:00
|
|
|
arch/arm/include/am335x and arch/arm/src/am335x
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/c5471 and arch/arm/src/c5471
|
|
|
|
arch/arm/include/dm320 and arch/arm/src/dm320
|
|
|
|
arch/arm/include/efm32 and arch/arm/src/efm32
|
|
|
|
arch/arm/include/imx1 and arch/arm/src/imx1
|
|
|
|
arch/arm/include/imx6 and arch/arm/src/imx6
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/imx6 and arch/arm/src/imrt
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/kinetis and arch/arm/src/kinetis
|
|
|
|
arch/arm/include/kl and arch/arm/src/kl
|
2019-07-12 00:16:11 +02:00
|
|
|
arch/arm/include/lc823450 and arch/arm/src/lc823450
|
2019-07-11 18:50:00 +02:00
|
|
|
arch/arm/include/lpc17xx_40xx and arch/arm/src/lpc17xx_40xx
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/lpc214x and arch/arm/src/lpc214x
|
|
|
|
arch/arm/include/lpc2378 and arch/arm/src/lpc2378.
|
|
|
|
arch/arm/include/lpc31xx and arch/arm/src/lpc31xx
|
|
|
|
arch/arm/include/lpc43xx and arch/arm/src/lpc43xx
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/lpc43xx and arch/arm/src/lpc54xx
|
|
|
|
arch/arm/include/lpc43xx and arch/arm/src/max236xx
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/moxart and arch/arm/src/moxart
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/nuc1xx and arch/arm/src/nrf52
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/nuc1xx and arch/arm/src/nuc1xx
|
|
|
|
arch/arm/include/sam34 and arch/arm/src/sam34
|
|
|
|
arch/arm/include/sama45 and arch/arm/src/sama5
|
2018-07-22 23:54:12 +02:00
|
|
|
arch/arm/include/samd2l2 and arch/arm/src/samd2l2
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/samd2l2 and arch/arm/src/samd5e5
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/samv7 and arch/arm/src/samv7
|
|
|
|
arch/arm/include/stm32 and arch/arm/src/stm32
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/stm32f7 and arch/arm/src/stm32f0
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/stm32f7 and arch/arm/src/stm32f7
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/stm32l4 and arch/arm/src/stm32h7
|
2016-05-30 19:52:07 +02:00
|
|
|
arch/arm/include/stm32l4 and arch/arm/src/stm32l4
|
|
|
|
arch/arm/include/str71x and arch/arm/src/str71x
|
|
|
|
arch/arm/include/tiva and arch/arm/src/tiva
|
|
|
|
arch/arm/include/tms570 and arch/arm/src/tms570
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/arm/include/tms570 and arch/arm/src/xmc4
|
2007-04-29 23:50:53 +02:00
|
|
|
|
2010-10-04 17:24:20 +02:00
|
|
|
arch/avr
|
|
|
|
This directory is dedicated to ports to the Atmel AVR (8-bit) and AVR32 (32-bit)
|
|
|
|
MCU families. STATUS: Under development.
|
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
Architecture Support
|
|
|
|
arch/avr/include/avr and arch/avr/src/avr
|
|
|
|
arch/avr/include/avr32 and arch/avr/src/avr32
|
2011-06-09 02:02:24 +02:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
MCU support
|
|
|
|
arch/avr/include/atmega and arch/avr/src/atmega
|
|
|
|
arch/avr/include/at90usb and arch/avr/src/at90usb
|
|
|
|
arch/avr/include/at32uc3 and arch/avr/src/at32uc3
|
2010-10-04 17:24:20 +02:00
|
|
|
|
2009-12-22 01:41:38 +01:00
|
|
|
arch/hc
|
|
|
|
This directory is dedicated to ports to the Freescale HC family.
|
|
|
|
|
2011-03-04 23:25:03 +01:00
|
|
|
arch/arm/include/m9s12 and arch/arm/src/m9s12
|
2009-12-22 01:41:38 +01:00
|
|
|
|
2011-06-09 02:02:24 +02:00
|
|
|
arch/mips
|
|
|
|
This directory is dedicated to ports to the MIPS family.
|
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
Architecture Support
|
|
|
|
arch/mips/include/mips32 and arch/mips/src/mips32
|
2011-06-09 02:02:24 +02:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
MCU support
|
|
|
|
arch/mips/include/pic32mx and arch/mips/src/pic32mx
|
|
|
|
arch/mips/include/pic32mz and arch/mips/src/pic32mz
|
2011-06-09 02:02:24 +02:00
|
|
|
|
2016-08-06 21:33:41 +02:00
|
|
|
arch/renesas - Support for Renesas and legacy Hitachi microcontrollers.
|
|
|
|
This include SuperH and M16C.
|
|
|
|
|
|
|
|
Architecture Support
|
|
|
|
arch/renesas/include and arch/renesas/src/common
|
|
|
|
|
|
|
|
MCU support
|
|
|
|
arch/renesas/include/m16c and arch/renesas/src/m16c
|
|
|
|
arch/renesas/include/sh1 and arch/renesas/src/sh1
|
|
|
|
|
2018-04-26 19:22:28 +02:00
|
|
|
arch/or1k
|
|
|
|
This directory is dedicated to ports to OpenRISC architectures.
|
|
|
|
|
|
|
|
arch/or1k/include/mor1k and arch/or1k/src/mor1k
|
|
|
|
|
2016-10-16 17:47:07 +02:00
|
|
|
arch/risc-v
|
|
|
|
This directory is dedicated to ports to the RISC-V family.
|
|
|
|
|
|
|
|
Architecture Support
|
|
|
|
arch/risc-v/include/rv32im
|
|
|
|
|
|
|
|
MCU support
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/risc-v/include/gap8
|
2016-10-16 17:47:07 +02:00
|
|
|
arch/risc-v/include/nr5m100
|
|
|
|
|
2011-03-04 23:25:03 +01:00
|
|
|
arch/x86 - Intel x86 architectures
|
|
|
|
This directory holds related, 32- and 64-bit architectures from Intel.
|
|
|
|
At present, this includes the following subdirectories:
|
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
Architecture Support
|
|
|
|
arch/x86/include and arch/x86/src/common
|
2011-03-04 23:25:03 +01:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
MCU support
|
|
|
|
arch/x86/include/i486 and arch/x86/src/i486
|
|
|
|
arch/x86/include/qemu and arch/x86/src/qemu
|
2011-03-04 23:25:03 +01:00
|
|
|
|
2016-10-12 23:27:34 +02:00
|
|
|
arch/xtensa
|
|
|
|
|
|
|
|
Implementations based on the Cadence® Tensilica® Xtensa® processors,
|
|
|
|
such as the Xtensa LX6 dataplane processing units (DPUs). At
|
|
|
|
present, this includes the following subdirectories:
|
|
|
|
|
|
|
|
Common XTENSA support:
|
|
|
|
arch/xtensa/include and arch/xtensa/src/common
|
|
|
|
|
|
|
|
LX6 DPU support:
|
|
|
|
arch/xtensa/include/lx6 and arch/xtensa/xtensa/lx6
|
|
|
|
|
2019-09-17 18:46:23 +02:00
|
|
|
Expressif ESP32 implementation of the LX6 DPU:
|
2016-10-12 23:27:34 +02:00
|
|
|
arch/xtensa/include/esp32 and arch/xtensa/xtensa/esp32
|
|
|
|
|
2008-02-14 21:53:15 +01:00
|
|
|
arch/z16 - ZiLOG 16-bit processors
|
|
|
|
This directory holds related, 16-bit architectures from ZiLOG. At
|
|
|
|
present, this includes the following subdirectories:
|
2008-02-07 15:41:11 +01:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
Architecture Support
|
|
|
|
arch/z16/include and arch/z16/src/common
|
2008-02-14 21:53:15 +01:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
MCU support
|
|
|
|
arch/z16/include/z16f and arch/z16/src/z16f
|
2008-02-14 21:53:15 +01:00
|
|
|
|
|
|
|
arch/z80 - ZiLOG 8-bit microcontrollers
|
|
|
|
This directory holds related, 8-bit architectures from ZiLOG. At
|
|
|
|
present, this includes the following subdirectories:
|
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
Architecture Support
|
|
|
|
arch/z80/include and arch/z80/src/common
|
2008-11-07 01:28:42 +01:00
|
|
|
|
2016-05-30 19:52:07 +02:00
|
|
|
MCU support
|
|
|
|
arch/z80/include/ez80 and arch/z80/src/ez80
|
2018-11-16 20:17:47 +01:00
|
|
|
arch/z80/include/z80 and arch/z80/src/z180
|
|
|
|
arch/z80/include/z8 and arch/z80/src/z8
|
|
|
|
arch/z80/include/z80 and arch/z80/src/z80
|