NuttX
Standard NuttX with current PX4 patches
Install / Use
/learn @PX4/NuttXREADME
APACHE NUTTX (INCUBATING)
- Introduction
- Incubation Status
- Community
- Getting Help
- Mailing Lists
- Issue Tracker
- Source Code
- Website Source Code
- Environments
- Installing Cygwin
- Ubuntu Bash under Windows 10
- Using macOS
- Installation
- Download and Unpack
- Semi-Optional apps/ Package
- Installation Directories with Spaces in the Path
- Downloading from Repositories
- Related Repositories
- Notes about Header Files
- Configuring NuttX
- Instantiating "Canned" Configurations
- Refreshing Configurations
- NuttX Configuration Tool
- Finding Selections in the Configuration Menus
- Reveal Hidden Configuration Options
- Make Sure that You are on the Right Platform
- Comparing Two Configurations
- Making defconfig Files
- Incompatibilities with Older Configurations
- NuttX Configuration Tool under DOS
- Toolchains
- Cross-Development Toolchains
- NuttX Buildroot Toolchain
- Shells
- Building NuttX
- Building
- Re-building
- Build Targets and Options
- Native Windows Build
- Installing GNUWin32
- Cygwin Build Problems
- Strange Path Problems
- Window Native Toolchain Issues
- Documentation
INTRODUCTION
Apache NuttX (Incubating) is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
Extensive documentation can be found on the project wiki: https://cwiki.apache.org/NUTTX/NuttX
Incubation Status
Apache NuttX (Incubating) is an effort undergoing Incubation at The Apache Software Foundation (ASF), sponsored by the Incubator. For more on our incubation effort, please see the file DISCLAIMER-WIP, in the same directory as this README.
For brevity, the rest of this file will refer to it as Apache NuttX or simply NuttX.
COMMUNITY
Every volunteer project obtains its strength from the people involved in it. We invite you to participate as much or as little as you choose.
We encourage you to:
- Use our project and provide feedback.
- Provide us with use-cases.
- Report bugs and submit patches.
- Contribute code or documentation.
Getting Help
The best place to get help is the developer's mailing list. Please see the following section:
Mailing Lists
Get help using NuttX or contribute to the project on our mailing lists:
-
dev@nuttx.apache.org is for people who want to contribute code to NuttX.
- To subscribe, send an email to dev-subscribe@nuttx.apache.org.
- To unsubscribe, send an email to dev-unsubscribe@nuttx.apache.org.
- View the archives at: https://www.mail-archive.com/dev@nuttx.apache.org/
-
commits@nuttx.apache.org is a read-only list that notifies subscribers about commit messages and patches to NuttX.
- To subscribe, send an email to commits-subscribe@nuttx.apache.org.
- To unsubscribe, send an email to commits-unsubscribe@nuttx.apache.org.
- View the archives at: https://www.mail-archive.com/commits@nuttx.apache.org/
Reporting Security Issues
Found a vulnerability? See our security policy here.
Issue Tracker
Bug Reports:
Found bug? Send an email to the dev list: dev@nuttx.apache.org
Before submitting an issue, please:
-
Verify that the bug does in fact exist.
-
Search the mailing list archives to verify there is no existing issue reporting the bug you've found.
-
Consider tracking down the bug yourself in the NuttX source code and submitting a patch along with your bug report. This is a great time saver for the NuttX developers and helps ensure the bug will be fixed quickly.
Feature Requests:
Enhancement requests for new features are also welcome. The more concrete and rational the request is, the greater the chance it will incorporated into future releases.
Source Code
The project sources are in two Git repositories. The core OS is in incubator-nuttx and the apps repository is in incubator-nuttx-apps. These are housed in GitBox on ASF servers and also mirrored at GitHub. These are kept in sync, so you can use whichever option you prefer.
-
NuttX core OS repository:
-
Primary: https://gitbox.apache.org/repos/asf?p=incubator-nuttx.git
-
GitHub Mirror: https://github.com/apache/incubator-nuttx
-
-
Apps repository:
Website Source Code
The project website sources are accessible via the website source code repository which is also mirrored in GitHub:
-
Primary: https://gitbox.apache.org/repos/asf?p=incubator-nuttx-website.git
-
GitHub Mirror: https://github.com/apache/incubator-nuttx-website
ENVIRONMENTS
NuttX requires a POSIX development environment such as you would find under Linux or macOS. NuttX may also be installed and built on Windows system if you also provide such a POSIX development environment. Options for a POSIX development environment under Windows include:
-
An installation of Linux on a virtual machine (VM) in Windows. I have not been happy using a VM myself. I have had stability problems with open source VMs and commercial VMs cost more than I want to spend. Sharing files with Linux running in a VM is awkward; sharing devices connected to the Windows box with Linux in a VM is, at the very least, confusing; Using Windows tools (such as Segger J-Link) with files built under the Linux VM is not a possibility.
-
The Cygwin environment. Instructions for installation of Cygwin on a Windows system are provided in the following paragraph, "Installing Cygwin". Cygwin is a mature, well-tested, and very convenient environment. It is especially convenient if you need to integrate with Windows tools and files. Downsides are that the installation time is very long and the compile times are slow.
-
Ubuntu/Bash shell under Windows 10. This is a new option under Windows 10. See the section "Ubuntu Bash under Windows 10" below. This is an improvement over Cygwin if your concern is compile time; its build performance is comparable to native Linux, certainly better than the Cygwin build time. It also installs in a tiny fraction of the time as Cygwin, perhaps 20 minutes for the basic Ubuntu install (vs. more than a day for the complete Cygwin install).
There have been even more recent ports of Linux environment to Windows. I need to update this section to include some mention of these alternatives.
-
The MSYS environment. MSYS derives from an older version of Cygwin simplified and adapted to work more naturally in the Windows environment. See http://www.mingw.org/wiki/MSYS if you are interested in using MSYS. The advantages of the MSYS environment is that it is better integrted with the native Windows environment and lighter weight; it uses only a minimal number of add-on POSIX-land tools.
The download link in that Wiki takes you to the SourceForge download site. The SourceForge MSYS project has been stagnant for some time. The MSYS project has more recently moved to http://odsn.net/projects/sfnet_mingwbundle. Downloads of current .zip files are available there but no instructions for the installation.
-
MSYS2 appears to be a re-write of MSYS based on a newer version of Cygwin. Is it available at https://www.msys2.org. A windows installer is available at that site along with very good installation instructions. The download is relatively quick (at least compared to Cygwin) and the 'pacman' package management tool supports supports simple system updates. For example, 'pacman -S git' will install the GIT command line utilities.
-
Other POSIX environments. Check out:
- UnxUtils: https://sourceforge.net/projects/unxutils/, https://en.wikipedia.org/wiki/UnxUtils
- MobaXterm: https://mobaxterm.mobatek.net/
- Gow: https://github.com/bmatzelle/gow/wiki
Disclaimer: In principle, these should work. However, I have never used any of these environments and cannot guarantee that there is not some less-than-obvious issues.
NuttX can also be installed and built on a native Windows system, but with some potential tool-related issues (see the discussion "Native Windows Build" under "Building NuttX" below). GNUWin32 is used to provide compatible native windows tools.
Installing Cygwin
Installing Cygwin on your Windows PC is simple, but time consuming. See http://www.cygwin.com/ for installation instructions. Basically you just need to download a tiny setup.exe program and it does the real, network installation for you.
Some Cygwin installation tips:
-
Install at
C:\cygwin -
Install everything: "Only the minimal base packages from the Cygwin distribution are installed by default. Clicking on categories and packages in the setup.exe package installation screen will provide you with the ability to control what is installed or updated. Clicking on the "Default" field next to the "All" category will provide you with the opportunity to install every Cygwin package. Be advised that this will download and install hundreds of megabytes to your computer."
If you use the "default" installation, you will be missing many of the Cygwin utilities that you will need to build NuttX. The build will fail in numerous places because of missing packages.
NOTE: The last
