nuttx/arch
Gregory Nutt 2fc0fbcf7e Squashed commit of the following:
commit 89e9d426e91c056e659fccf5e5c4392618f8f777
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 16:44:19 2017 -0600

    Update some comments

commit 9c5d8a5833350006ed389e898b11c8c8a20e5f4f
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 16:15:54 2017 -0600

    Spirit:  Rename drivers/wireless/spirit/src to lib.  Move Spirit network driver out of IEEE802.15.4 into drivers/wireless/spirit/drivers

commit cabc0ec9e6eb558dcb715ab17264383aa0105e7a
Merge: 87b616414a 6bd744c4b3
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 15:38:40 2017 -0600

    Merge remote-tracking branch 'origin/master' into spirit

commit 87b616414a79c01a71acea78f8258e05325c1996
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 15:37:27 2017 -0600

    Spirit radio driver is mutating into a standalone network driver.

commit 507798233868a661ae8adad3e3aa117075a7a146
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 13:32:08 2017 -0600

    Spirit: More radio initialization logic

commit 33af25704ce9ca83d576300d153cfe31cc6d2576
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 12:19:14 2017 -0600

    Spirit:  Beginning of radio initialization logic

commit 97b20014c016e55952a8f9d8f4ae29e2cc555b23
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Mon Jul 24 09:42:06 2017 -0600

    Spirit: More initialization logic.

commit 295d8e27824c0417fccea2344b30bb5c93ffbabe
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sun Jul 23 15:39:53 2017 -0600

    Spirit:  Add header file containing enumeration of commands.

commit 8a2d9dd8eb9cc70cbcdd1b913fc9022b9c9ec8da
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sun Jul 23 11:33:50 2017 -0600

    Spirit:  Add GPIO initialization logic

commit 8b6d80c44f92024c45a6ba63ba1af3fdafe94dc3
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sun Jul 23 10:07:25 2017 -0600

    Spirit:  Add interrupt control logic.

commit 423f846fe5c914f92a4bfea4d9d1fa33de1c77a5
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 19:06:52 2017 -0600

    Spirit: Yet a little more radio initialization logic.

commit 5895b979823e51ddde5ad52e6de66a8ad662e883
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 15:36:05 2017 -0600

    Spirit: A little more radio initialization logic.

commit 86311ab30aad386203c181c792847dd1d37f9a02
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 13:02:32 2017 -0600

    Spirit: A miniscule amount of radio initialization logic.

commit ad55e89d5ee12ea1eeea95fcd38ff3da0db4416a
Merge: 90a7666655 f4e46b0da7
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 10:56:30 2017 -0600

    Merge remote-tracking branch 'origin/master' into spirit

commit 90a766665534b05da0157dbc383cb06a98c86a79
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 10:52:52 2017 -0600

    Spirit1:  A few fixes for a clean build of initial configuration (not much there yet)

commit bbbf04c223230a52a7705a2161128265cfbaa480
Merge: 623d54a7f7 2319ea53a9
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 09:53:57 2017 -0600

    Merge remote-tracking branch 'origin/master' into spirit

commit 623d54a7f719e9032099f88f38203efee4b80722
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 09:43:52 2017 -0600

    b-l475e-iot01a: Add a configuration for testing sprit radio.

commit d309d73d9f4665f9d870eb03531f450043d9389d
Merge: 52c3ddfae6 d88dc9b2e5
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 09:02:06 2017 -0600

    Merge remote-tracking branch 'origin/master' into spirit

commit 52c3ddfae6802e111c2b5cf1207baf21a61dd00b
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Sat Jul 22 08:33:04 2017 -0600

    Spirit:  Add register definition header file.

commit 8d842ab5e8f9ca653b42f9ee88dc279f06b4fa98
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Jul 21 17:27:03 2017 -0600

    b-l475e-iot01a: Add initial, unverified support for the SPSRGF/Spirit1 module.

commit 73d902a1048616fb9c2dd2147cabcd8ee78e19ac
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Jul 21 15:49:43 2017 -0600

    Spirit: Fixes to get skeleton IEEE 802.15.4 driver build.

commit ebc5a8387bb94f0cc3827533795f3e4a33207e67
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Jul 21 15:16:29 2017 -0600

    Spirit1:  Add framework for IEEE 802.15.4 driver.  Does not yet build.

commit 52e195a7ae14ddb18bdd56258f4877381d2501ca
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Jul 21 14:02:42 2017 -0600

    Spirit:  A little more SPI logic.

commit 90048d0c5b8a5af4d81a15d99535c84ed38d8ae9
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Jul 21 11:19:06 2017 -0600

    Spirit: Build directories setup.  Some initial files added, mostly just to verify build.

commit 8273a381ac1f6bb081b292b5e73226185e9e634c
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Jul 21 08:34:04 2017 -0600

    USB composite:  Remove references to CDC/ACM and USB MSC from composite logic.  They are no longer coupled.
2017-07-24 16:46:30 -06:00
..
arm Squashed commit of the following: 2017-07-24 16:46:30 -06:00
avr arch/: Remove dangling space at the end of lines. 2017-06-28 13:16:48 -06:00
hc IOBs: Move from driver/iob to a better location in mm/iob 2017-05-09 07:35:30 -06:00
mips arch/: Remove dangling space at the end of lines. 2017-06-28 13:16:48 -06:00
misoc arch/: Remove dangling space at the end of lines. 2017-06-28 13:16:48 -06:00
renesas Based on the last PR, review all serial driver vector attachment. Found one additional error and updated all relevant drivers to current interrupt parameter passing. 2017-06-12 06:22:35 -06:00
risc-v arch/: Remove dangling space at the end of lines. 2017-06-28 13:16:48 -06:00
sim sim arch: fix mkdir issue in GNU target 2017-07-22 09:01:24 -06:00
x86 IOBs: Move from driver/iob to a better location in mm/iob 2017-05-09 07:35:30 -06:00
xtensa arch/: Remove dangling space at the end of lines. 2017-06-28 13:16:48 -06:00
z16 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
z80 IOBs: Move from driver/iob to a better location in mm/iob 2017-05-09 07:35:30 -06:00
Kconfig Kconfig: Rename CONFIG_ARM_TOOLCHAIN_IAR to CONFIG_ARCH_TOOLCHAIN_IAR 2017-05-13 16:01:38 -06:00
README.txt Remove Calypso architecture support and support for Calypso SERCOMM driver. 2016-12-13 18:35:52 -06:00

Architecture-Specific Code
^^^^^^^^^^^^^^^^^^^^^^^^^^
Table of Contents
^^^^^^^^^^^^^^^^^

  o Architecture-Specific Code
  o Summary of Files
  o Supported Architectures
  o Configuring NuttX

Architecture-Specific Code
^^^^^^^^^^^^^^^^^^^^^^^^^^

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
arch/<arch-name>/arch.h as described below).

Directory Structure
^^^^^^^^^^^^^^^^^^^

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:


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

Summary of Files
^^^^^^^^^^^^^^^^

include/<chip-name>/
  This sub-directory contains chip-specific header files.

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:

    _int8_t, _uint8_t, _int16_t, _uint16_t, _int32_t, _uint32_t

  and if the architecture supports 64-bit integers.

    _int24_t, _uint24_t, int64_t, uint64_t

  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
  provided by their toolchain header files

    irqstate_t

  Must be defined to the be the size required to hold the interrupt
  enable/disable state.

  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
  inline if the compiler supports inlining) and structure.  These include:

  - struct xcptcontext.  This structures represents the saved context
    of a thread.

  - irqstate_t up_irq_save(void) -- Used to disable all interrupts.

  - 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
  only be used withint the operating system code.  And, in general,
  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.

  This file must also define NR_IRQS, the total number of IRQs supported
  by the board.

src/<chip-name>/
  This sub-directory contains chip-specific source files.

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.

Supported Architectures
^^^^^^^^^^^^^^^^^^^^^^^
NOTE: nuttx/Documentation/NuttX.html for current information about the
state of these MCU ports.

arch/sim - Linux/Cygwin simulation
    A user-mode port of NuttX to the x86 Linux platform is available.
    The purpose of this port is primarily to support OS feature development.
    This port does not support interrupts or a real timer (and hence no
    round robin scheduler)  Otherwise, it is complete.

arch/arm - ARM-based micro-controllers
    This directory holds common ARM architectures.  At present, this includes
    the following subdirectories:

    Architecture Support
      arch/arm/include and arch/arm/src/common
      arch/arm/src/arm and arch/arm/include/arm
      arch/arm/src/armv7-a and arch/arm/include/armv6-m
      arch/arm/src/armv7-a and arch/arm/include/armv7-a
      arch/arm/src/armv7-m and arch/arm/include/armv7-m
      arch/arm/src/armv7-r and arch/arm/include/armv7-r

    MCU support
      arch/arm/include/a1x and arch/arm/src/a1x
      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
      arch/arm/include/kinetis and arch/arm/src/kinetis
      arch/arm/include/kl and arch/arm/src/kl
      arch/arm/include/lpc11xx and arch/arm/src/lpc11xx
      arch/arm/include/lpc17xx and arch/arm/src/lpc17xx
      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
      arch/arm/include/moxart and arch/arm/src/moxart
      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
      arch/arm/include/samdl and arch/arm/src/samdl
      arch/arm/include/samv7 and arch/arm/src/samv7
      arch/arm/include/stm32 and arch/arm/src/stm32
      arch/arm/include/stm32f7 and arch/arm/src/stm32f7
      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

arch/avr
    This directory is dedicated to ports to the Atmel AVR (8-bit) and AVR32 (32-bit)
    MCU families.  STATUS:  Under development.

    Architecture Support
      arch/avr/include/avr and arch/avr/src/avr
      arch/avr/include/avr32 and arch/avr/src/avr32

    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

arch/hc
    This directory is dedicated to ports to the Freescale HC family.

    arch/arm/include/m9s12 and arch/arm/src/m9s12

arch/mips
    This directory is dedicated to ports to the MIPS family.

    Architecture Support
      arch/mips/include/mips32 and arch/mips/src/mips32

    MCU support
      arch/mips/include/pic32mx and arch/mips/src/pic32mx
      arch/mips/include/pic32mz and arch/mips/src/pic32mz

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

arch/risc-v
    This directory is dedicated to ports to the RISC-V family.

    Architecture Support
      arch/risc-v/include/rv32im

    MCU support
      arch/risc-v/include/nr5m100

arch/x86 - Intel x86 architectures
    This directory holds related, 32- and 64-bit architectures from Intel.
    At present, this includes the following subdirectories:

    Architecture Support
      arch/x86/include and arch/x86/src/common

    MCU support
      arch/x86/include/i486 and arch/x86/src/i486
      arch/x86/include/qemu and arch/x86/src/qemu

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

    Expressif ESP32 implemenation of the LX6 DPU:
      arch/xtensa/include/esp32 and arch/xtensa/xtensa/esp32

arch/z16 - ZiLOG 16-bit processors
    This directory holds related, 16-bit architectures from ZiLOG.  At
    present, this includes the following subdirectories:

    Architecture Support
      arch/z16/include and arch/z16/src/common

    MCU support
      arch/z16/include/z16f and arch/z16/src/z16f

arch/z80 - ZiLOG 8-bit microcontrollers
    This directory holds related, 8-bit architectures from ZiLOG.  At
    present, this includes the following subdirectories:

    Architecture Support
      arch/z80/include and arch/z80/src/common

    MCU support
      arch/z80/include/z80 and arch/z80/src/z80
      arch/z80/include/z8 and arch/z80/src/z8
      arch/z80/include/ez80 and arch/z80/src/ez80