NuttX

From Wikipedia, the free encyclopedia
NuttX
NuttX logo.png
NuttX logo
DeveloperGregory Nutt
Written inC, C++, assembly
OS familyPOSIX
Working stateCurrent
Source modelOpen source
Initial release2007; 15 years ago (2007)
Latest release10.2.0 / November 23, 2021; 2 months ago (2021-11-23) [1]
Repository
Marketing targetEmbedded systems
PlatformsARM, AVR, AVR32, HCS12, LM32, MIPS, RISC-V, SuperH, Xtensa, x86, x86-64, Z80
Kernel typeReal-time microkernel
LicenseApache License 2.0
Official websitenuttx.apache.org

NuttX is a real-time operating system (RTOS) with an emphasis on technical standards compliance and small size. Scalable from 8-bit to 64-bit microcontroller environments, the main governing standards in NuttX are from the Portable Operating System Interface (POSIX) and the American National Standards Institute (ANSI). Further standard application programming interfaces (APIs) from Unix and other common RTOSes (such as VxWorks) are adopted for functions unavailable under these standards, or inappropriate for deeply embedded environments, such as the fork() system call.

NuttX was first released in 2007 by Gregory Nutt as free and open-source software under the permissive BSD license. Since December 2019, it has been undergoing incubation at The Apache Software Foundation.[2]

Implementation[]

NuttX is written almost exclusively in the programming language C and uses Kconfig to configure and generate GNU makefiles for the system. The program distribution combines the kernel and a substantial amount of middleware and code for board support and device drivers. The kernel and much of the other code was written by the original author, Gregory Nutt. He maintains the source code exclusively, and must approve all community contributions.

Key features[]

  • Standards compliant
  • Task management
    • Core task management
    • Processes (optional)
    • Task controls modeled on Portable Operating System Interface (POSIX) and American National Standards Institute (ANSI)
  • Modular design
  • Fully preemptible
  • Naturally scalable
  • Highly configurable
  • Easily extensible to new processor architectures, SoC architecture, or board architectures
  • Schedulers
  • Real-time, deterministic, with support for priority inheritance
  • Tickless operation
  • IPC
    • named message queues
    • counting semaphores
    • signals
    • clocks/timers
    • environment variables
  • POSIX Threads (pthreads)
  • Multiple file systems (see section below)
  • VxWorks-like task management and watchdog timers
  • Berkeley Software Distribution (BSD) socket interface
  • Extensions to manage preemption
  • Symmetric multiprocessing (SMP)
  • Loadable kernel modules
  • Memory configurations
    1. flat embedded build
    2. protected build with MPU
    3. kernel build with MMU
  • Memory allocators
    1. standard heap memory allocation
    2. granule allocator
    3. shared memory
    4. dynamically sized, per-process heaps
  • Thread local storage (TLS)
  • Inheritable controlling terminals, pseudoterminals (PTY) and input/output (I/O) redirection
  • On-demand paging
  • System logging
  • May be built either as an open, flat embedded RTOS or as a separately built, secure kernel with a system call gate interface
  • Built-in, per-thread CPU load measurements
  • Custom NuttX C standard library (libc)

Supported platforms[]

  • ARM
    • ARM7TDMI (TI TMS320 C6571, Calypso, MoxART, NXP LPC214x, LPC2378, STMicro STR71x)
    • ARM920T (Freescale i.MX1)
    • ARM926EJS (TI DM320, NXP LPC31xx)
    • ARM Cortex-A5 (Atmel SAMA5D2, SAMA5D3, SAMA5D4)
    • ARM Cortex-A8 (Allwinner A10)
    • ARM Cortex-A9 (NXP/Freescale i.MX6)
    • ARM Cortex-R4/R4F (TI TMS570, Samsung Artik)
    • ARM Cortex-M0 (nuvoTon: NUC120, NXP: KL25Z, KL26Z, LPC11xx, Atmel: SAMD20/21, SAML21, ST Micro STM32 F0, Raspberry Pi RP2040[3])
    • ARM Cortex-M3 (ST Micro STM32 F1/F2/L1, TI/Stellaris LM3S, NXP LPC17xx, Atmel SAM3U/3X, SiliconLabs EFM32)
    • ARM Cortex-M4 (with/without floating point unit: ST Micro STM32 F3/F4/L4/L4+, TI/Stellaris LM4F/TM4C, NXP LPC43xx/LPC54xx, Freescale Kinetis K20/K28/K40/60/64/66, Atmel SAM4C/4E/4S/4L, Infineon XMC4xxx, Nordic NRF52xxx, Sony CXD5602/Spresense[4])
    • ARM Cortex-M7 (Atmel SAMV71/SAME70, ST Micro STM32 F7/H7, NXP i.MX RT)
  • Atmel AVR
    • Atmel 8-bit AVR (AT90USB, ATmega)
    • AVR32
  • Freescale M68HCS12
  • Intel
    • x86 (80x86)
  • MIPS
    • MicroChip PIC32MX (MIPS32 24Kc), PIC32MZ (MIPS32 M14k)
  • Misoc
    • LM32 (QEMU)
  • OpenRISC
    • mor1kx
  • Renesas/Hitachi
    • SuperH
    • Renesas M16C/26
  • RISC-V
    • SiFive FE310 (RV32IM)
    • Kendryte K210 (RV64GC)
    • Enjoy Digital LITEX (RV32IMA)
    • NEXT RISC-V NR5Mxx (RV32IM)
    • GreenWaves GAP8 (RV32IM)
    • BouffaloLab BL602 (RV32IMFC)
    • Espressif Systems ESP32-C3 (RV32IMC)
  • Xtensa
    • Expressif Systems ESP32 (LX6)
    • Expressif Systems ESP32-S2 (LX7)
  • Zilog

File system[]

  • Tiny in-memory, root pseudo-file-system
  • Virtual file system (VFS)
  • Mountable volumes. Bind mountpoint, file system, and block device driver
  • Generic system logging (SYSLOG) support
  • File Allocation Table (FAT) 12/16/32 file system support
  • Network File System (NFS) client, supports NFS, version 3, UDP
  • NXFFS: a tiny wear-leveling flash memory file system
  • SMART: flash file system from Ken Pettit
  • Generic driver for SPI-based cards: MultiMediaCard (MMC) and Secure Digital (SD/SDHC)
  • Romfs file system support
  • BINFS pseudo-file system support
  • HOSTFS file system support (simulation only)
  • Union file system: supports combining and overlaying file systems
  • PROCFS (/proc) pseudo-file system
  • A Binary Loader with support for the following formats:
    • Separately linked Executable and Linkable Format (ELF) modules
    • Separately linked modules for NXFLAT: a binary format that can be XIP from a file system
  • PATH variable support
  • File transfers via TFTP and FTP (get and put), HTML (wget), and Zmodem (sz and rz)
  • Intel HEX conversions

Device drivers[]

  • VFS supports character and block drivers
  • Asynchronous I/O (AIO)
  • Network, USB (host), USB (device), serial, I2C, I2S, NAND, Controller Area Network (CAN bus), ADC, DAC, PWM, Quadrature Encoder, and watchdog timer driver architectures
  • RAM drive or disk, pipes, FIFO, /dev/null, /dev/zero drivers
  • Generic driver for SPI-based or SDIO-based MMC/SD/SDH cards
  • Power management subsystem
  • Modbus support provided by built-in FreeModBus version 1.5.0
  • Graphics devices: framebuffer drivers, graphic and segment LCD drivers
  • Audio subsystem: Codecs, audio input and output drivers. Command line and graphic media player applications
  • Cryptographic subsystem
  • Input devices: touchscreen, USB keyboard, USB mouse, GPIO-based buttons and keypads
  • Memory technology devices
  • Analog devices: support for analog-to-digital converter (ADC), digital-to-analog converter (DAC), multiplexers, and amplifiers
  • System logging devices
  • Porting guide[5]

C/C++ library[]

  • Standard C library fully integrated into the OS
  • Includes floating point support via a Standard Math Library
  • Add-on uClibc++[6] module provides Standard C++ Library supporting input/output (C++) (iostreams), strings, Standard Template Library (STL), run-time type information (RTTI), exceptions, etc. (LGPL)

Networking[]

The network stack included with NuttX is derived from uIP (micro IP), originally developed by Adam Dunkels.

  • Multiple network interface support; multiple network link layer support
  • IPv4, IPv6, Internet protocol suite (TCP/IP), User Datagram Protocol (UDP), Internet Control Message Protocol (ICMP), Internet Group Management Protocol (IGMP) version 2 (client) stacks
  • Stream and datagram sockets
  • Raw socket and local, Unix domain socket support
  • DNS name resolution, NetDB
  • IEEE 802.11 (WiFi) FullMac
  • IEEE 802.15.4 MAC + 6loWPAN
  • Serial Line Internet Protocol (SLIP), TUN/PPP, local loopback devices
  • A cJSON[7] port
  • Small size (based on uIP)
  • BSD compatible socket layer
  • Networking utilities (Dynamic Host Configuration Protocol (DHCP) server and client, Simple Mail Transfer Protocol (SMTP) client, Telnet client, File Transfer Protocol (FTP) server and client, Trivial File Transfer Protocol (TFTP) client, Hypertext Transfer Protocol (HTTP) server and client, Network Time Protocol (NTP) client); inheritable Telnet sessions (as controlling terminal). VNC server
  • Network File System (NFS) client, supports NFS, version 3, UDP
  • ICMPv6 autonomous auto-configuration
  • A NuttX port of Jef Poskanzer's thttpd HTTP server integrated with NXFLAT to provide embedded CGI
  • PHY link status management
  • UDP network discovery, XML RPC server
  • XML RPC server
  • Support for network modules (such as the TI CC3000 WLAN module)

Flash support[]

  • Memory Technology Device (MTD) inspired interface for MTD devices
  • FTL: simple flash Translation Layer support file systems on Flash
  • NAND Support
  • NXFFS: a wear-leveling flash memory file system
  • Support for Serial Peripheral Interface (SPI) bus based flash devices

USB support[]

Host[]

  • USB host architecture for USB host controller drivers and device-dependent USB class drivers.
  • USB host controller drivers available for the Atmel SAMA5Dx, NXP LPC17xx, LPC31xx, and STmicro STM32.
  • Device-dependent USB class drivers available for USB mass storage and HID keyboard.
  • Seamless support for USB hubs.

Device[]

  • Gadget-like architecture for USB device controller drivers and device-dependent USB class drivers
  • USB device controller drivers available for the PIC32, Atmel AVR, SAM3, SAM4, and SAMA5Dx, NXP LPC17xx, LPC214x, LPC313x, and LPC43xx, Silicon Laboraties EFM32, STMicro STM32 F1, F2, F3, and F4, and TI DM320.
  • Device-dependent USB class drivers available for USB serial and for USB mass storage
  • Built-in USB trace functionality for USB debug

Graphics support[]

  • Framebuffer drivers
  • Liquid-crystal display (LCD) drivers for both parallel and SPI LCDs and organic light-emitting diode (OLED)
  • Segment LCD drivers
  • VNC Server
  • NX Graphics Subsystem: A graphics library, windowing system, and font support that works with either framebuffer or LCD drivers
  • NuttX Widgets:[8] A graphical user interface (GUI) written in conservative C++ that integrates with NX graphics
  • NuttX window manager:[9] tiny, based on the NX graphics subsystem and NuttX widgets

Projects using NuttX[]

  • Thingsee Internet of things (IoT) development device.[10]
  • PX4 autopilot uses NuttX to control a variety of autonomous platforms.[11]
  • Biffer Board supports many RTOSs including NuttX.[12]
  • MP3 player implemented with NuttX.[13]
  • OsmocomBB uses NuttX to develop an operating system for cell phones.[14]
  • A homebrew steer-by-wire system implemented using NuttX.[15]
  • Video Performance Measurement Device.[16]
  • Low Power Embedded Software Optimization for the NuttX RTOS.[17]
  • Motorola Moto Z.[18][19]
  • Sony uses NuttX in their audio processors.[20]
  • Samsung announces TizenRT based on NuttX RTOS.[21]

References[]

  1. ^ "NuttX-10.2.0 Released". Retrieved 2021-10-11.
  2. ^ "Apache NuttX (Incubating)". incubator.apache.org. Retrieved 29 April 2021.
  3. ^ "The Raspberry Pi Pico, and RP2040, Get Full Dual-Core SMP Support in Apache's NuttX RTOS Port". Retrieved June 2, 2021.
  4. ^ "Spresense combines multi-core and power efficiency". Retrieved September 5, 2019.
  5. ^ "Porting Guide". Retrieved 22 November 2012.
  6. ^ "uClibc++". Retrieved 22 November 2012.
  7. ^ "cJSON". Retrieved 22 November 2012.
  8. ^ "NuttX Widgets". Retrieved 22 November 2012.
  9. ^ "NxWM". Retrieved 22 November 2012.
  10. ^ "Thingsee". Retrieved 27 July 2015.
  11. ^ "Autopilot PX4". Retrieved 3 May 2013.
  12. ^ "Bifferboard". Retrieved 22 November 2012.
  13. ^ "Nuttx playing MP3 in Detron Board". Retrieved 22 November 2012.
  14. ^ "OsmocomBB". Retrieved 22 November 2012.
  15. ^ "A Homebrew Steer-by-Wire System". Retrieved 22 November 2012.
  16. ^ "Design of an Embedded System for Video Performance Measurements. Petteri Aimonen's Master Thesis" (PDF). Retrieved 22 July 2014.
  17. ^ "Low Power Embedded Software Optimization for the NuttX RTOS. Diego Sánchez López's Monograph of Electric Engineering Graduation" (PDF). Retrieved 12 July 2015.
  18. ^ "Moto Mods Firmware: Overview". Retrieved 28 December 2016.
  19. ^ "Modular Moto Z Android phone supports DIY and RPi HAT add-ons". Retrieved 22 August 2016.
  20. ^ "Developing Audio Products with Cortex-M3/NuttX/C++11" (PDF). Archived from the original (PDF) on 20 January 2017. Retrieved 20 January 2017.
  21. ^ "Tizen RT". Retrieved 21 February 2017.

External links[]

Retrieved from ""