This is mostly untouched from the original documentation. It does not really belong to “quickstart”. Also, this needs cleanup.
This is included for reference, and it’s not necessary to know all the details at first.
The general directory layout for NuttX is very similar to the directory structure of the Linux kernel – at least at the most superficial layers. At the top level is the main makefile and a series of sub-directories identified below and discussed in the following paragraphs:
Configuration Files. The NuttX configuration consists of logic in processor architecture directories, chip/SoC directories, and board configuration directories. The complete configuration is specified by several settings in the NuttX configuration file.
Processor architecture specific files. These are the files contained in the
arch/<arch-name>/directory and are discussed in a paragraph below. As an example, all ARM processor architectures are provided under the
arch/arm/directory which is selected with the
Variants of the processor architecture may be provided in sub-directories of the Extending this example, the ARMv7-M ARM family is supported by logic in
arch/arm/src/armv7-mdirectories which are selected by the
Chip/SoC specific files. Each processor architecture is embedded in a System-on-a-Chip (SoC) architecture. The full SoC architecture includes the processor architecture plus chip-specific interrupt logic, clocking logic, general purpose I/O (GPIO) logic, and specialized, internal peripherals (such as UARTs, USB, etc.).
These chip-specific files are contained within chip-specific sub-directories also under the
arch/<arch-name>/directory and are selected via the
As an example, the STMicro STM32 SoC architecture is based on the ARMv7-M processor and is supported by logic in the
arch/arm/src/stm32directories which are selected with the
Board specific configurations. 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 networks, USB, etc.).
These board-specific configuration files can be found in the
boards/<arch-name>/<chip-name>/<board-name>/sub-directories and are discussed in a paragraph below.
boards/arm/stm32/stm32f4disovery/, as an example, holds board-specific logic for the STM32F4 Discovery board and is selected via the
This directory holds the NuttX documentation. It’s made with the Sphinx documentation system. See the README.md file for information on how to build it.
This sub-directory holds the NuttX supported architectures.
For details see Architecture-Specific Code.
binfmt/ subdirectory contains logic for loading binaries
in the file system into memory in a form that can be used to
audio/ subdirectory contains the NuttX audio sub-system.
boards/ subdirectory contains custom logic and board
configuration data for each board. These board-specific
configurations plus the architecture-specific configurations in
arch/ subdirectory complete define a customized port of
Boards Subdirectory Structure
boards/ directory contains board specific configuration
files. Each board must provide a sub-directory <board-name> under
See Boards Support for details.
This sub-directory holds the NuttX CMake functions.
For details see CMake Support.
This sub-directory holds the NuttX cryptographic sub-system.
For details see Crypto API Subsystem.
This directory holds architecture-independent device drivers.
For details see Device Drivers.
This directory contains the NuttX file system. This file system is described below.
This directory contains files for graphics/video support under NuttX.
For details see NX Graphics Subsystem.
This directory holds NuttX header files. Standard header files file retained in can be included in the normal fashion:
This directory holds a collection of standard libc-like functions with custom interfaces into NuttX.
For details see NuttX libraries.
This is the NuttX memory manager.
For details see Memory Management.
This directory contains the implementation of the NuttX networking layer including internal socket APIs.
For details see Network Support.
This directory contains OpenAMP support for NuttX.
For details see OpenAMP Support.
The files forming core of the NuttX RTOS reside here.
If NuttX is built as a separately compiled kernel (with
the contents of this directory are built. This directory holds a
syscall interface that can be used for communication between
user-mode applications and the kernel-mode RTOS.
For details see Syscall Layer.
This directory holds a collection of tools and scripts to simplify configuring, building and maintaining NuttX.
This directory holds support for video sub-system.
For details see Video Subsystem.
This directory holds support for hardware-independent wireless support.
For details see Wireless Subsystem.
Makefile in the
$(TOPDIR) directory contains
all of the top-level control logic to build NuttX.