2022-11-17 14:03:26 +01:00
|
|
|
# APACHE NUTTX
|
2020-07-28 18:47:30 +02:00
|
|
|
|
|
|
|
* Introduction
|
|
|
|
* 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
|
|
|
|
|
2022-11-17 14:03:26 +01:00
|
|
|
Apache NuttX is a real-time operating system (RTOS) with an emphasis on
|
|
|
|
standards compliance and small footprint. Scalable from 8-bit to 64-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()).
|
2020-07-28 18:47:30 +02:00
|
|
|
|
|
|
|
Extensive documentation can be found on the project wiki:
|
2020-10-19 06:09:06 +02:00
|
|
|
<https://cwiki.apache.org/NUTTX/NuttX>
|
2020-07-28 18:47:30 +02:00
|
|
|
|
2022-11-17 14:03:26 +01:00
|
|
|
For brevity, many parts of the documentation will refer to Apache NuttX as
|
2020-07-28 18:47:30 +02:00
|
|
|
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:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
|
|
|
- Use our project and provide feedback.
|
|
|
|
- Provide us with use-cases.
|
|
|
|
- Report bugs and submit patches.
|
|
|
|
- Contribute code or documentation.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Getting Help
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The best place to get help is the developer's mailing list. Please see
|
|
|
|
the following section:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Mailing Lists
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Get help using NuttX or contribute to the project on our mailing lists:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* <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/>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* <commits@nuttx.apache.org> is a read-only list that notifies subscribers
|
2020-04-24 16:17:36 +02:00
|
|
|
about commit messages and patches to NuttX.
|
2020-07-28 18:47:30 +02:00
|
|
|
* 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/>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-12-17 05:29:00 +01:00
|
|
|
## Reporting Security Issues
|
|
|
|
|
|
|
|
Found a vulnerability? See our security policy [here](.github/SECURITY.md).
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Issue Tracker
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Bug Reports:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Found bug? Send an email to the dev list: <dev@nuttx.apache.org>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Before submitting an issue, please:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
|
|
|
- Verify that the bug does in fact exist.
|
2020-07-28 18:47:30 +02:00
|
|
|
|
2020-04-24 16:17:36 +02:00
|
|
|
- Search the mailing list archives to verify there is no existing issue
|
|
|
|
reporting the bug you've found.
|
2020-07-28 18:47:30 +02:00
|
|
|
|
2020-04-24 16:17:36 +02:00
|
|
|
- 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.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Feature Requests:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
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.
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Source Code
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2022-11-22 19:59:48 +01:00
|
|
|
The project sources are in two Git repositories. The core OS is in nuttx
|
|
|
|
and the apps repository is in 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.
|
2020-04-24 16:17:36 +02:00
|
|
|
|
|
|
|
- NuttX core OS repository:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- Primary:
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://gitbox.apache.org/repos/asf?p=nuttx.git>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- GitHub Mirror:
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://github.com/apache/nuttx>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
|
|
|
- Apps repository:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- Primary:
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://gitbox.apache.org/repos/asf?p=nuttx-apps.git>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- GitHub Mirror:
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://github.com/apache/nuttx-apps>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Website Source Code
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The project website sources are accessible via the website source code
|
2020-04-24 16:17:36 +02:00
|
|
|
repository which is also mirrored in GitHub:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- Primary:
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://gitbox.apache.org/repos/asf?p=nuttx-website.git>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- GitHub Mirror:
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://github.com/apache/nuttx-website>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# ENVIRONMENTS
|
2009-11-28 16:10:08 +01:00
|
|
|
|
2017-01-02 20:54:07 +01:00
|
|
|
NuttX requires a POSIX development environment such as you would find under
|
2018-06-01 21:25:50 +02:00
|
|
|
Linux or macOS. NuttX may also be installed and built on Windows system
|
2017-07-08 14:55:50 +02:00
|
|
|
if you also provide such a POSIX development environment. Options for a
|
2017-01-01 15:35:49 +01:00
|
|
|
POSIX development environment under Windows include:
|
2016-12-31 20:20:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- 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:
|
|
|
|
|
|
|
|
1. Install at `C:\cygwin`
|
|
|
|
|
|
|
|
2. Install **everything**: "Only the minimal base packages from the
|
2010-11-06 22:58:45 +01:00
|
|
|
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."
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
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 time I installed **everything**, the download was
|
|
|
|
about 5GiB. The server I selected was also very slow so it took
|
|
|
|
over a day to do the whole install!
|
2010-11-06 22:58:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
NOTE: You don't really have to install **everything** but I cannot
|
|
|
|
answer the question "Then what should I install?" I don't know
|
|
|
|
the answer to that and so will continue to recommend installing
|
|
|
|
**everything**.
|
2019-07-02 23:05:05 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
You should certainly be able to omit "Science", "Math", and
|
|
|
|
"Publishing". You can try omitting KDE, Gnome, GTK, and other
|
|
|
|
graphics packages if you don't plan to use them.
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Perhaps a minimum set would be those packages listed below for the
|
|
|
|
"Ubuntu Bash under Windows 10" installation?
|
2015-09-05 00:49:06 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**UPDATE**: Sergey Frolov had success with the following minimal
|
|
|
|
Cygwin configuration:
|
2017-01-01 17:13:02 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
1. After starting the Cygwin installer, keep the recommended
|
|
|
|
packages that are pre-selected in the default configuration.
|
2019-07-02 23:05:05 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
2. Using the installation tools, add the following packages:
|
2019-07-02 23:05:05 +02:00
|
|
|
|
|
|
|
make (GNU make) bison libgmp3-dev
|
|
|
|
gcc-core byacc libmpfr-dev
|
|
|
|
gcc-g++ gperf libmpc-dev
|
|
|
|
flex gdb automake-1.15
|
2020-12-22 04:26:05 +01:00
|
|
|
libncurses-dev libgmp-dev curl
|
2019-07-02 23:05:05 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
After installing Cygwin, you will get lots of links for installed
|
|
|
|
tools and shells. I use the RXVT native shell. It is fast and reliable
|
|
|
|
and does not require you to run the Cygwin X server (which is neither
|
|
|
|
fast nor reliable). Unless otherwise noted, the rest of these
|
|
|
|
instructions assume that you are at a bash command line prompt in
|
|
|
|
either Linux or in Cygwin shell.
|
2010-11-06 22:58:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Using MSYS
|
2018-05-31 15:35:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
MSYS is an environment the derives from Cygwin. Thus, most things said
|
|
|
|
about Cygwin apply equally to MSYS. This section will, then, focus on
|
|
|
|
the differences when using MSYS, specifically MSYS2.
|
2018-05-31 15:35:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Here is it assumed that you have already downloaded and installed MSYS2
|
|
|
|
from https://www.msys2.org using the windows installer available at that
|
|
|
|
location. It is also assumed that you have brought in the necessary
|
|
|
|
tools using the 'pacman' package management tool Tools needed including:
|
2018-05-31 15:35:56 +02:00
|
|
|
|
|
|
|
pacman -S git
|
2018-05-31 19:53:09 +02:00
|
|
|
pacman -S make
|
|
|
|
pacman -S gcc
|
2018-09-27 02:00:46 +02:00
|
|
|
pacman -S gdb
|
2018-05-31 15:35:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
And possibly others depending upon your usage. Then you will need to
|
|
|
|
build and install kconfig-frontends per the instructions of the top-level
|
|
|
|
README.txt file in the tools repository. This requires the following
|
|
|
|
additional tools:
|
2018-05-31 19:53:09 +02:00
|
|
|
|
|
|
|
pacman -S bison
|
2020-12-22 04:26:05 +01:00
|
|
|
pacman -S curl
|
2018-05-31 19:53:09 +02:00
|
|
|
pacman -S gperf
|
|
|
|
pacman -S ncurses-devel
|
|
|
|
pacman -S automake-wrapper
|
|
|
|
pacman -S autoconf
|
|
|
|
pacman -S pkg-config
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Because of some versioning issues, I had to run 'aclocal' prior to
|
|
|
|
running the kconfig-frontends configure script. See "Configuring NuttX"
|
|
|
|
below for further information.
|
2018-05-31 21:25:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Unlike Cygwin, MSYS does not support symbolic links. The 'ln -s' command
|
|
|
|
will, in fact, copy a directory! This means that you Make.defs file will
|
|
|
|
have to include definitions like:
|
2018-05-31 21:25:04 +02:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_WINDOWS_MSYS),y)
|
|
|
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
|
|
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
|
|
|
endif
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This will force the directory copies to work in a way that can be handled
|
|
|
|
by the NuttX build system. NOTE: The default link.sh script has been
|
|
|
|
updated so that is should now be MSYS2 compatible. The above is preferred
|
|
|
|
but no longer necessary in the Make.defs file.
|
2018-05-31 21:25:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
To build the simulator under MSYS, you also need:
|
2018-05-31 21:25:04 +02:00
|
|
|
|
|
|
|
pacman -S zlib-devel
|
2018-05-31 15:35:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
It appears that you cannot use directory names with spaces in them like
|
|
|
|
"/c/Program\ Files \(86\)" in the MSYS path variable. I worked around this
|
|
|
|
by create Windows junctions like this:
|
|
|
|
|
|
|
|
1. Open the a windows command terminal,
|
|
|
|
|
|
|
|
2. cd to `c:\msys64`, then
|
|
|
|
|
|
|
|
3. `mklink /j programfiles "C:/Program\ Files"` and
|
|
|
|
|
|
|
|
4. `mklink /j programfiles86 "C:/Program\ Files\ \(x86\)"`
|
|
|
|
|
|
|
|
They then show up as `/programfiles` and `/programfiles86` with the MSYS2
|
|
|
|
sandbox. Those paths can then be used with the PATH variable. I had
|
|
|
|
to do something similar for the path to the GNU Tools "ARM Embedded
|
|
|
|
Toolchain" which also has spaces in the path name.
|
|
|
|
|
|
|
|
## Ubuntu Bash under Windows 10
|
|
|
|
|
|
|
|
A better version of a command-line only Ubuntu under Windows 10 (beta)
|
|
|
|
has recently been made available from Microsoft.
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
|
|
Installation instructions abound on the Internet complete with screen
|
|
|
|
shots. I will attempt to duplicate those instructions in full here.
|
|
|
|
Here are the simplified installation steps:
|
|
|
|
|
|
|
|
- Open *Settings*.
|
|
|
|
|
|
|
|
- Click on *Update & security*.
|
|
|
|
|
|
|
|
- Click on *For Developers*.
|
|
|
|
|
|
|
|
- Under *Use developer features*, select the *Developer mode* option to
|
|
|
|
setup the environment to install Bash.
|
|
|
|
|
|
|
|
- A message box should pop up. Click *Yes* to turn on developer mode.
|
|
|
|
|
|
|
|
- After the necessary components install, you'll need to restart your
|
|
|
|
computer.
|
|
|
|
|
|
|
|
Once your computer reboots:
|
|
|
|
|
|
|
|
- Open *Control Panel*.
|
|
|
|
|
|
|
|
- Click on *Programs*.
|
|
|
|
|
|
|
|
- Click on *Turn Windows features on or off*.
|
|
|
|
|
|
|
|
- A list of features will pop up, check the *Windows Subsystem for Linux
|
|
|
|
(beta)* option.
|
|
|
|
|
|
|
|
- Click *OK*.
|
|
|
|
|
|
|
|
- Once the components installed on your computer, click the *Restart
|
|
|
|
now* button to complete the task.
|
|
|
|
|
|
|
|
After your computer restarts, you will notice that Bash will not appear in
|
|
|
|
the *Recently added* list of apps, this is because Bash isn't actually
|
|
|
|
installed yet. Now that you have setup the necessary components, use the
|
|
|
|
following steps to complete the installation of Bash:
|
|
|
|
|
|
|
|
- Open *Start*, do a search for `bash.exe`, and press *Enter*.
|
|
|
|
|
|
|
|
- On the command prompt, type `y` and press Enter to download and install
|
|
|
|
Bash from the Windows Store. This will take awhile.
|
|
|
|
|
|
|
|
- Then you'll need to create a default UNIX user account. This account
|
|
|
|
doesn't have to be the same as your Windows account. Enter the
|
|
|
|
username in the required field and press Enter (you can't use the
|
|
|
|
username `admin`).
|
|
|
|
|
|
|
|
- Close the `bash.exe` command prompt.
|
2016-12-31 20:20:48 +01:00
|
|
|
|
|
|
|
Now that you completed the installation and setup, you can open the Bash
|
|
|
|
tool from the Start menu like you would with any other app.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Accessing Windows Files from Ubuntu
|
|
|
|
|
|
|
|
File systems will be mounted under `/mnt` so for example `C:\Program Files`
|
|
|
|
appears at `/mnt/c/Program Files`. This is as opposed to Cygwin where
|
|
|
|
the same directory would appear at `/cygdrive/c/Program Files`.
|
2016-12-31 20:20:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
With these differences (perhaps a few other Windows quirks) the Ubuntu
|
|
|
|
install works just like Ubuntu running natively on your PC.
|
2016-12-31 20:20:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
A good tip for file sharing is to use symbolic links within your Ubuntu
|
|
|
|
home directory. For example, suppose you have your `projects` directory
|
|
|
|
at `C:\Documents\projects`. Then you can set up a link to the `projects/`
|
|
|
|
directory in your Ubuntu directory like:
|
2017-05-31 14:19:05 +02:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
ln -s /mnt/c/Documents/projects projects
|
2017-05-31 14:19:05 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Accessing Ubuntu Files From Windows
|
|
|
|
|
|
|
|
In Ubuntu Userspace for Windows, the Ubuntu file system root directory is
|
|
|
|
at:
|
2017-01-01 16:44:36 +01:00
|
|
|
|
|
|
|
%localappdata%\lxss\rootfs
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Or
|
2017-01-01 16:44:36 +01:00
|
|
|
|
|
|
|
C:\Users\Username\AppData\Local\lxss\rootfs
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
However, I am unable to see my files under the rootfs\home directory.
|
|
|
|
After some looking around, I find the home directory
|
|
|
|
`%localappdata%\lxss\home`.
|
|
|
|
|
|
|
|
With that trick access to the `/home` directory, you should actually be
|
|
|
|
able to use Windows tools outside of the Ubuntu sandbox with versions of
|
|
|
|
NuttX built within the sandbox using that path.
|
2017-05-30 17:19:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Executing Windows Tools from Ubuntu
|
2017-05-30 17:19:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
You can also execute Windows tools from within the Ubuntu sandbox:
|
2017-05-30 17:19:04 +02:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
/mnt/c/Program\ Files\ \(x86\)/Microchip/xc32/v1.43/bin/xc32-gcc.exe --version
|
2017-05-30 17:19:04 +02:00
|
|
|
Unable to translate current working directory. Using C:\WINDOWS\System32
|
|
|
|
xc32-gcc.exe (Microchip Technology) 4.8.3 MPLAB XC32 Compiler v1.43 Build date: Mar 1 2017
|
|
|
|
...
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The error message indicates that there are more issues: You cannot mix
|
|
|
|
Windows tools that use Windows style paths in an environment that uses
|
|
|
|
POSIX paths. I think you would have to use Linux tools only from within
|
|
|
|
the Ubuntu sandbox.
|
2017-03-27 20:28:34 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Install Ubuntu Software
|
|
|
|
|
|
|
|
Use `sudo apt-get install <package name>`. As examples, this is how
|
|
|
|
you would get GIT:
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
sudo apt-get install git
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This will get you a compiler for your host PC:
|
2017-01-01 16:33:06 +01:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
sudo apt-get install gcc
|
2017-01-01 16:33:06 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This will get you an ARM compiler for your target:
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
sudo apt-get install gcc-arm-none-eabi
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**NOTE**: That is just an example. I am not sure if apt-get will give you a
|
|
|
|
current or usable compiler. You should carefully select your toolchain
|
|
|
|
for the needs of your project.
|
|
|
|
|
|
|
|
You will also need to get the kconfig-frontends configuration as
|
|
|
|
described below under *NuttX Configuration Tool*. In order to build the
|
|
|
|
kconfig-frontends configuration tool you will also need: `make`, `gperf`,
|
|
|
|
`flex`, `bison`, and `libncurses-dev`.
|
2016-12-31 20:20:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
That is enough to do a basic NuttX build.
|
2017-01-01 16:33:06 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Integrating with Windows Tools
|
2017-01-01 16:33:06 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you want to integrate with Windows native tools, then you would need
|
|
|
|
deal with the same kind of craziness as with integrating Cygwin with
|
|
|
|
native toolchains, see the section *Cygwin Build Problems* below.
|
2017-01-02 14:16:47 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
However, there is currently no build support for using Windows native
|
|
|
|
tools with Ubuntu under Windows. This tool combination is made to work
|
|
|
|
with Cygwin through the use of the `cygpath -w` tool that converts paths
|
|
|
|
from say `/cydrive/c/Program Files` to `C:\Program Files`. There is,
|
|
|
|
however, no corresponding tool to convert `/mnt/c/Program Files` in the
|
|
|
|
Ubuntu environment.
|
2017-01-01 23:29:03 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Graphics Support
|
2017-01-02 20:54:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The Ubuntu version support by Microsoft is a command-line only version.
|
|
|
|
There is no support for Linux graphics utilities.
|
2017-01-02 20:54:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This limitation is not a limitation of Ubuntu, however, only in what
|
|
|
|
Microsoft is willing to support. If you install a X-Server, then you
|
|
|
|
can also use basic graphics utilities. See for example:
|
2017-01-02 20:54:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
<http://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/>
|
2017-01-02 20:54:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Many Linux graphics programs would, however, also require a graphics
|
|
|
|
framework like GTK or Qt. So this might be a trip down the rabbit hole.
|
2020-03-27 07:54:20 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Using macOS
|
|
|
|
|
2020-09-12 03:31:38 +02:00
|
|
|
You need to install at least the following tools specific to macOS
|
|
|
|
if you want to build the sim:
|
2020-03-27 07:54:20 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Xcode (the native compiler and the rest of the toolchain)
|
2020-03-27 07:54:20 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* ELF toolchain (if you want to build modules for CONFIG_LIBC_MODLIB)
|
2020-03-27 07:49:28 +01:00
|
|
|
|
2021-12-01 07:38:12 +01:00
|
|
|
brew install x86_64-elf-gcc
|
2020-03-27 07:49:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# INSTALLATION
|
2016-12-31 20:20:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There are two ways to get NuttX: You may download released, stable
|
|
|
|
tarballs from either the project website. Or you may get NuttX by
|
|
|
|
cloning the GIT repositories. Let's consider the released tarballs
|
|
|
|
first:
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Download and Unpack
|
2009-12-13 19:01:46 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Download and unpack the NuttX tarball. If you are reading this, then
|
|
|
|
you have probably already done that. After unpacking, you will end
|
|
|
|
up with a directory called nuttx-version (where version is the NuttX
|
|
|
|
version number). You might want to rename that directory nuttx to
|
|
|
|
match the various instructions in the documentation and some scripts
|
|
|
|
in the source tree.
|
2009-12-13 19:01:46 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Download location:
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
<https://nuttx.apache.org/download/>
|
2020-04-24 16:17:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Legacy download locations:
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2020-11-28 05:03:51 +01:00
|
|
|
<https://bitbucket.org/nuttx/nuttx/downloads>
|
2020-07-28 18:47:30 +02:00
|
|
|
<https://sourceforge.net/projects/nuttx/files/nuttx/>
|
2017-01-01 15:35:49 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Semi-Optional apps/ Package
|
2011-04-14 00:47:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
All NuttX libraries and example code used to be in included within
|
|
|
|
the NuttX source tree. As of NuttX-6.0, this application code was
|
|
|
|
moved into a separate tarball, the apps tarball. If you are just
|
|
|
|
beginning with NuttX, then you will want to download the versioned
|
|
|
|
apps tarball along with the NuttX tarball. If you already have your
|
|
|
|
own product application directory, then you may not need the apps
|
|
|
|
tarball.
|
2011-04-14 00:47:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
It is called "Semi-optional" because if you don't have some `apps/`
|
|
|
|
directory, NuttX will *fail* to build! You do not necessarily need
|
|
|
|
to use the NuttX apps tarball but may, instead, provide your own
|
|
|
|
custom application directory. Such a custom directory would need
|
|
|
|
to include a valid Makefile to support the build and a valid Kconfig
|
|
|
|
file to support the configuration. More about these files later.
|
2011-04-14 00:47:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Download then unpack the apps tarball in the same directory where you
|
|
|
|
unpacked the NuttX tarball. After you unpack the apps tarball, you
|
|
|
|
will have a new directory called apps-version (where the version
|
|
|
|
should exactly match the version of the NuttX tarball). Again, you
|
|
|
|
might want to rename the directory to simply apps/ to match what
|
|
|
|
you read in the documentation
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
After unpacking (and renaming) the apps tarball, you will have two
|
|
|
|
directories side by side like this:
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2011-04-14 00:47:04 +02:00
|
|
|
|
|
|
|
|
+----+----+
|
|
|
|
| |
|
|
|
|
nuttx/ apps/
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This is important because the NuttX build will expect to find the
|
|
|
|
apps directory in that (default) location. That default location
|
|
|
|
can be changed by modifying your NuttX configuration file, but that
|
|
|
|
is another story.
|
|
|
|
|
|
|
|
## Installation Directories with Spaces in the Path
|
|
|
|
|
|
|
|
The nuttx build directory should reside in a path that contains no
|
|
|
|
spaces in any higher level directory name. For example, under
|
|
|
|
Cygwin, your home directory might be formed from your first and last
|
|
|
|
names like: `/home/First Last`. That will cause strange errors when
|
|
|
|
the make system tries to build.
|
|
|
|
|
|
|
|
[Actually, that problem is probably not too difficult to fix. Some
|
|
|
|
Makefiles probably just need some paths within double quotes]
|
|
|
|
|
|
|
|
I work around spaces in the home directory name, by creating a
|
|
|
|
new directory that does not contain any spaces, such as `/home/nuttx`.
|
|
|
|
Then I install NuttX in `/home/nuttx` and always build from
|
|
|
|
`/home/nuttx/nuttx-code`.
|
2011-04-14 00:47:04 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Downloading from Repositories
|
2010-11-06 22:48:13 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Cloning the Repository
|
2009-12-13 19:01:46 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**BEFORE** cloning repositories on any Windows platform do the following GIT
|
|
|
|
command:
|
2010-11-06 22:48:13 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
git config --global core.autocrlf false
|
2009-12-13 19:01:46 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
That will avoid conversions of linefeeds (newlines, \n) to carriage
|
|
|
|
return plus linefeed sequences (\r\n)
|
2013-04-04 19:34:01 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The current NuttX du jour is available in from a GIT repository. Here are
|
|
|
|
instructions for cloning the core NuttX RTOS (corresponding to the nuttx
|
|
|
|
tarball discussed above):
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2022-11-22 19:59:48 +01:00
|
|
|
git clone https://gitbox.apache.org/repos/asf/nuttx.git nuttx
|
2019-07-02 23:05:05 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
-or-
|
2019-07-02 23:05:05 +02:00
|
|
|
|
2022-11-22 19:59:48 +01:00
|
|
|
git clone https://github.com/apache/nuttx.git nuttx
|
2019-07-02 23:05:05 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
And the semi-optional apps/ application directory and be cloned like:
|
2015-06-30 01:04:57 +02:00
|
|
|
|
2022-11-22 19:59:48 +01:00
|
|
|
git clone https://gitbox.apache.org/repos/asf/nuttx-apps.git apps
|
2015-06-30 01:04:57 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
-or-
|
2015-06-30 01:04:57 +02:00
|
|
|
|
2022-11-22 19:59:48 +01:00
|
|
|
git clone https://github.com/apache/nuttx-apps.git apps
|
2015-06-30 01:04:57 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
That will give you the same directory structure like this:
|
2015-06-30 01:04:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
+----+----+
|
|
|
|
| |
|
|
|
|
nuttx/ apps/
|
2013-04-04 22:27:29 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Configuring the Clones
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The following steps need to be performed for each of the repositories.
|
|
|
|
After changing to the clone directory:
|
2015-06-30 01:04:57 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Set your identity:
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
git config --global user.name "My Name"
|
|
|
|
git config --global user.email my.name@example.com
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Colorized diffs are much easier to read:
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
git config --global color.branch auto
|
|
|
|
git config --global color.diff auto
|
|
|
|
git config --global color.interactive auto
|
|
|
|
git config --global color.status auto
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Checkout other settings
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
git config --list
|
2014-10-30 14:48:34 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Cloning NuttX Inside Cygwin
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you are cloning the NuttX repository, it is recommended to avoid
|
|
|
|
automatic end of lines conversions by git. These conversions may break
|
|
|
|
some scripts like configure.sh. Before cloning, do the following:
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
git config --global core.autocrlf false
|
2013-04-04 22:27:29 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Related Repositories
|
2015-06-28 09:54:25 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
These are standalone repositories:
|
2015-06-30 02:19:36 +02:00
|
|
|
|
2022-11-22 19:59:48 +01:00
|
|
|
* <https://gitbox.apache.org/repos/asf/nuttx-apps>
|
2020-11-28 05:03:51 +01:00
|
|
|
or
|
2022-11-22 19:59:48 +01:00
|
|
|
<https://github.com/apache/nuttx-apps.git>
|
2015-06-28 09:54:25 +02:00
|
|
|
|
|
|
|
This directory holds an optional package of applications and libraries
|
|
|
|
can be used with the NuttX RTOS. There is a README.txt file there that
|
2017-08-13 19:09:12 +02:00
|
|
|
will provide more information about that package.
|
2015-06-28 09:54:25 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* <https://bitbucket.org/nuttx/nxwidgets>
|
2015-06-28 09:54:25 +02:00
|
|
|
|
|
|
|
This is the NuttX C++ graphics support. This includes NxWM, the tiny
|
|
|
|
NuttX Window Manager.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* <https://bitbucket.org/nuttx/uclibc>
|
2015-06-28 09:54:25 +02:00
|
|
|
|
|
|
|
This repository contains a version of the uClibc++ C++ library. This code
|
2020-07-28 18:47:30 +02:00
|
|
|
originates from <http://cxx.uclibc.org/> and has been adapted for NuttX by the
|
|
|
|
RGMP team (<http://rgmp.sourceforge.net/wiki/index.php/Main_Page>).
|
2015-06-28 09:54:25 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* <https://bitbucket.org/nuttx/buildroot>
|
2015-06-28 09:54:25 +02:00
|
|
|
|
|
|
|
A environment that you can to use to build a custom, NuttX GNU toolchain.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* <https://bitbucket.org/nuttx/tools>
|
2015-06-28 09:54:25 +02:00
|
|
|
|
|
|
|
There are snapshots of some tools here that you will need to work with
|
|
|
|
NuttX: kconfig-frontends, genromfs, and others.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Notes about Header Files
|
|
|
|
|
|
|
|
### Other C-Library Header Files
|
|
|
|
|
|
|
|
When a GCC toolchain is built, it must be built against a C library.
|
|
|
|
The compiler together with the contents of the C library completes the
|
|
|
|
C language definition and provides the complete C development
|
|
|
|
environment. NuttX provides its own, built-in C library. So the
|
|
|
|
complete, consistent C language definition for use with NuttX comes from
|
|
|
|
the combination of the compiler and the header files provided by the
|
|
|
|
NuttX C library.
|
|
|
|
|
|
|
|
When a GCC toolchain is built, it incorporates the C library header
|
|
|
|
files into the compiler internal directories and, in this way, the C
|
|
|
|
library really becomes a part of the toolchain. If you use the NuttX
|
|
|
|
buildroot toolchain as described below under "NuttX Buildroot
|
|
|
|
Toolchain", your GCC toolchain will build against the NuttX C library
|
|
|
|
and will incorporate the NuttX C library header files as part of the
|
|
|
|
toolchain.
|
|
|
|
|
|
|
|
If you use some other, third-party tool chain, this will not be the
|
|
|
|
case, however. Those toolchains were probably built against some
|
|
|
|
other, incompatible C library distribution (such as newlib). Those
|
|
|
|
tools will have incorporated the incompatible C library header files
|
|
|
|
as part of the toolchain. These incompatible header files must *not*
|
|
|
|
be used with NuttX because they will conflict with definitions in the
|
|
|
|
NuttX built-in C-Library. For such toolchains that include header
|
|
|
|
files from a foreign C-Library, NuttX must be compiled without using
|
|
|
|
the standard header files that are distributed with your toolchain.
|
|
|
|
This prevents including conflicting, incompatible header files such
|
|
|
|
as stdio.h.
|
|
|
|
|
|
|
|
The math.h and stdarg.h are probably the two most trouble some header
|
|
|
|
files to deal with. These troublesome header files are discussed in
|
|
|
|
more detail below.
|
|
|
|
|
|
|
|
### Header Files Provided by Your Toolchain
|
|
|
|
|
|
|
|
Certain header files, such as `setjmp.h`, `stdarg.h`, and `math.h`, may still
|
|
|
|
be needed from your toolchain and your compiler may not, however, be able
|
|
|
|
to find these if you compile NuttX without using standard header files
|
|
|
|
(i.e., with `-nostdinc`). If that is the case, one solution is to copy
|
|
|
|
those header file from your toolchain into the NuttX include directory.
|
|
|
|
|
|
|
|
### Duplicated Header Files
|
|
|
|
|
|
|
|
There are also a few header files that can be found in the `nuttx/include`
|
|
|
|
directory which are duplicated by the header files from your toolchain.
|
|
|
|
stdint.h and stdbool.h are examples. If you prefer to use the `stdint.h`
|
|
|
|
and `stdbool.h` header files from your toolchain, those could be copied
|
|
|
|
into the `nuttx/include/` directory. Using most other header files from
|
|
|
|
your toolchain would probably cause errors.
|
|
|
|
|
|
|
|
### math.h
|
|
|
|
|
|
|
|
Even though you should not use a foreign C-Library, you may still need
|
|
|
|
to use other, external libraries with NuttX. In particular, you may
|
|
|
|
need to use the math library, libm.a. NuttX supports a generic, built-in
|
|
|
|
math library that can be enabled using `CONFIG_LIBM=y`. However, you may
|
|
|
|
still want to use a higher performance external math library that has
|
|
|
|
been tuned for your CPU. Sometimes such tuned math libraries are
|
|
|
|
bundled with your toolchain.
|
|
|
|
|
|
|
|
The math library header file, `math.h`, is a then special case. If you do
|
|
|
|
nothing, the standard math.h header file that is provided with your
|
|
|
|
toolchain will be used.
|
|
|
|
|
|
|
|
If you have a custom, architecture specific math.h header file, then
|
|
|
|
that header file should be placed at `arch/<cpu>/include/math.h`. There
|
|
|
|
is a stub `math.h` header file located at `include/nuttx/lib/math.h`. This stub
|
|
|
|
header file can be used to "redirect" the inclusion to an architecture-
|
|
|
|
specific math.h header file. If you add an architecture specific math.h
|
|
|
|
header file then you should also define `CONFIG_ARCH_MATH_H=y` in your
|
|
|
|
NuttX Configuration file. If `CONFIG_ARCH_MATH_H` is selected, then the
|
|
|
|
top-level Makefile will copy the stub math.h header file from
|
|
|
|
`include/nuttx/lib/math.h` to `include/math.h` where it will become the system
|
|
|
|
`math.h` header file. The stub `math.h` header file does nothing other
|
|
|
|
than to include that architecture-specific `math.h` header file as the
|
|
|
|
system `math.h` header file.
|
|
|
|
|
|
|
|
### float.h
|
|
|
|
|
|
|
|
If you enable the generic, built-in math library, then that math library
|
|
|
|
will expect your toolchain to provide the standard `float.h` header file.
|
|
|
|
The float.h header file defines the properties of your floating point
|
|
|
|
implementation. It would always be best to use your toolchain's `float.h`
|
|
|
|
header file but if none is available, a default `float.h` header file will
|
|
|
|
be provided if this option is selected. However, there is no assurance
|
|
|
|
that the settings in this `float.h` are actually correct for your platform!
|
|
|
|
|
|
|
|
### stdarg.h
|
|
|
|
|
|
|
|
In most cases, the correct version of stdarg.h is the version provided
|
|
|
|
with your toolchain. However, sometimes there are issues with
|
|
|
|
using your toolchains `stdarg.h`. For example, it may attempt to draw in
|
|
|
|
header files that do not exist in NuttX or perhaps the header files that
|
|
|
|
it uses are not compatible with the NuttX header files. In those cases,
|
|
|
|
you can use an architecture-specific `stdarg.h` header file by defining
|
|
|
|
`CONFIG_ARCH_STDARG_H=y`.
|
2012-10-30 15:32:52 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
See the discussion above for the `math.h` header. This setting works
|
|
|
|
exactly the same for the `stdarg.h` header file.
|
2012-07-08 16:50:43 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# CONFIGURING NUTTX
|
|
|
|
|
|
|
|
## Instantiating "Canned" Configurations
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### `configure.sh` and `configure.bat`
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
"Canned" NuttX configuration files are retained in:
|
2017-08-09 00:51:02 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Where `<board-name>` is the name of your development board and `<config-dir>`
|
|
|
|
is the name of the sub-directory containing a specific configuration for
|
|
|
|
that board. `<arch-name>` and `<chip-name>` refer to characteristics of the
|
|
|
|
MCU used on the board: `<arch-name>` is the CPU architecture implemented
|
|
|
|
by the MCU; `<chip-name>` identifies the MCU chip family. Only a few
|
|
|
|
steps are required to instantiate a NuttX configuration, but to make the
|
|
|
|
configuration even easier there are scripts available in the tools/
|
|
|
|
sub-directory combines those simple steps into one command.
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There is one tool for use with any Bash-like shell that does configuration
|
|
|
|
steps. It is used as follows:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
tools/configure.sh <board-name>:<config-dir>
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There is an alternative Windows batch file that can be used in the windows
|
|
|
|
native environment like:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
tools\configure.bat <board-name>:<config-dir>
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
And, to make sure that other platforms are supported, there is also a
|
|
|
|
C program at tools/configure.c that can be compiled to establish the
|
|
|
|
board configuration.
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
See `tools/README.txt` for more information about these scripts.
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
General information about configuring NuttX can be found in:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
{TOPDIR}/boards/README.txt
|
|
|
|
{TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### The Hidden Configuration Scripts:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
As mentioned above, there are only a few simple steps to instantiating a
|
|
|
|
NuttX configuration. Those steps are hidden by the configuration scripts
|
|
|
|
but are summarized below:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
1. Copy Files
|
2019-08-09 00:23:55 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Configuring NuttX requires only copying two files from the
|
|
|
|
`<config-dir>` to the directory where you installed NuttX (TOPDIR):
|
2019-08-09 00:23:55 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Copy `boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/Make.def` to `{TOPDIR}/Make.defs`
|
2012-03-22 19:44:06 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
OR
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Copy `boards/<arch-name>/<chip-name>/<board-name>/scripts/Make.def`
|
|
|
|
to `{TOPDIR}/Make.defs`
|
2012-03-22 19:44:06 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Make.defs describes the rules needed by your tool chain to compile
|
|
|
|
and link code. You may need to modify this file to match the
|
|
|
|
specific needs of your toolchain. NOTE that a configuration may
|
|
|
|
have its own unique Make.defs file in its configuration directory or
|
|
|
|
it may use a common Make.defs file for the board in the scripts/
|
|
|
|
directory. The first takes precedence.
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Copy `boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/defconfig` to `{TOPDIR}/.config`
|
2017-06-15 18:03:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The defconfig file holds the actual build configuration. This
|
|
|
|
file is included by all other make files to determine what is
|
|
|
|
included in the build and what is not. This file is also used
|
|
|
|
to generate a C configuration header at `include/nuttx/config.h`.
|
2017-06-15 18:03:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* Copy other, environment-specific files to `{TOPDIR}`
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This might include files like .gdbinit or IDE configuration files
|
|
|
|
like .project or .cproject.
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
2. Refresh the Configuration
|
2014-10-11 20:01:33 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
New configuration setting may be added or removed. Existing settings
|
|
|
|
may also change there values or options. This must be handled by
|
|
|
|
refreshing the configuration as described below.
|
2014-10-11 20:01:33 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
NOTE: NuttX uses only compressed defconfig files. For the NuttX
|
|
|
|
defconfig files, this refreshing step is *NOT* optional; it is also
|
|
|
|
necessary to uncompress and regenerate the full making file. This is
|
|
|
|
discussed further below.
|
|
|
|
|
|
|
|
## Refreshing Configurations
|
|
|
|
|
|
|
|
Configurations can get out of date. As new configuration settings are
|
|
|
|
added or removed or as dependencies between configuration settings
|
|
|
|
change, the contents of a default configuration can become out of synch
|
|
|
|
with the build systems. Hence, it is a good practice to "refresh" each
|
|
|
|
configuration after configuring and before making. To refresh the
|
|
|
|
configuration, use the NuttX Configuration Tool like this:
|
2014-10-11 20:01:33 +02:00
|
|
|
|
|
|
|
make oldconfig
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
AFTER you have instantiated the NuttX configuration as described above.
|
|
|
|
The configuration step copied the .config file into place in the top-level
|
|
|
|
NuttX directory; 'make oldconfig' step will then operate on that .config
|
|
|
|
file to bring it up-to-date.
|
2014-12-28 20:28:14 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If your configuration is out of date, you will be prompted by 'make oldconfig'
|
|
|
|
to resolve the issues detected by the configuration tool, that is, to
|
|
|
|
provide values for the new configuration options in the build system. Doing
|
|
|
|
this can save you a lot of problems down the road due to obsolete settings in
|
|
|
|
the default board configuration file. The NuttX configuration tool is
|
|
|
|
discussed in more detail in the following paragraph.
|
2013-01-04 22:37:31 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Confused about what the correct value for a new configuration item should
|
|
|
|
be? Enter ? in response to the 'make oldconfig' prompt and it will show
|
|
|
|
you the help text that goes with the option.
|
2014-12-28 17:42:19 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you don't want to make any decisions are willing to just accept the
|
|
|
|
recommended default value for each new configuration item, an even easier
|
|
|
|
way is:
|
2016-03-11 00:24:48 +01:00
|
|
|
|
2017-08-13 19:09:12 +02:00
|
|
|
make olddefconfig
|
2016-03-11 00:24:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The olddefconfig target will simply bring your configuration up to date with
|
|
|
|
the current Kconfig files, setting any new options to the default value.
|
|
|
|
No questions asked.
|
2016-03-11 00:24:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## NuttX Configuration Tool
|
2012-04-07 21:38:13 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
An automated tool has been incorporated to support re-configuration
|
|
|
|
of NuttX. This tool is based on the kconfig-frontends application available
|
|
|
|
at <https://bitbucket.org/nuttx/tools/src/master/kconfig-frontends/>. (This
|
|
|
|
is a snapshot of the old <http://ymorin.is-a-geek.org/projects/kconfig-frontends>
|
|
|
|
which is no longer available.) This application provides a tool called
|
|
|
|
`kconfig-mconf` that is used by the NuttX top-level Makefile. The following
|
|
|
|
make target is provided:
|
2012-04-07 21:38:13 +02:00
|
|
|
|
|
|
|
make menuconfig
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This make target will bring up NuttX configuration menus.
|
2013-01-28 02:44:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**WARNING**: Never do `make menuconfig` on a configuration that has
|
|
|
|
not been converted to use the kconfig-frontends tools! This will
|
|
|
|
damage your configuration (see
|
2020-08-30 22:12:57 +02:00
|
|
|
<https://cwiki.apache.org/confluence/display/NUTTX/Converting+Legacy+Configurations+to+Use+kconfig-mconf>).
|
2013-01-28 02:44:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
How do we tell a new configuration from an old one? See "Incompatibilities
|
|
|
|
with Older Configurations" below.
|
2014-12-28 20:28:14 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The `menuconfig` make target depends on two things:
|
2012-04-07 21:38:13 +02:00
|
|
|
|
|
|
|
1. The Kconfig configuration data files that appear in almost all
|
|
|
|
NuttX directories. These data files are the part that is still
|
|
|
|
under development (patches are welcome!). The Kconfig files
|
|
|
|
contain configuration information for the configuration settings
|
|
|
|
relevant to the directory in which the Kconfig file resides.
|
|
|
|
|
|
|
|
NOTE: For a description of the syntax of this configuration file,
|
2015-06-28 09:54:25 +02:00
|
|
|
see kconfig-language.txt in the tools repository at
|
2020-07-28 18:47:30 +02:00
|
|
|
<https://bitbucket.org/nuttx/tools>
|
2012-04-07 21:38:13 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
2. The `kconfig-mconf` tool. `kconfig-mconf` is part of the
|
2019-09-24 17:52:09 +02:00
|
|
|
kconfig-frontends package. You can download that package from the
|
2020-07-28 18:47:30 +02:00
|
|
|
snapshot in the tools repository at <https://bitbucket.org/nuttx/tools>.
|
2012-04-07 21:38:13 +02:00
|
|
|
|
2014-01-03 22:49:00 +01:00
|
|
|
Building kconfig-frontends under Linux may be as simple as
|
2020-07-28 18:47:30 +02:00
|
|
|
`configure; make; make install` but there may be some build
|
2014-01-03 22:49:00 +01:00
|
|
|
complexities, especially if you are building under Cygwin. See
|
2015-06-28 09:54:25 +02:00
|
|
|
the more detailed build instructions in the top-level README.txt
|
2020-07-28 18:47:30 +02:00
|
|
|
file of the tools repository at <https://bitbucket.org/nuttx/tools>.
|
|
|
|
|
|
|
|
The `make install` step will, by default, install the `kconfig-mconf`
|
|
|
|
tool at `/usr/local/bin/mconf`. Where ever you choose to
|
|
|
|
install `kconfig-mconf`, make certain that your PATH variable includes
|
2012-04-07 21:38:13 +02:00
|
|
|
a path to that installation directory.
|
|
|
|
|
2014-01-03 22:49:00 +01:00
|
|
|
The kconfig-frontends tools will not build in a native Windows
|
|
|
|
environment directly "out-of-the-box". For the Windows native
|
2020-04-26 22:01:09 +02:00
|
|
|
case, you can use the modified version of kconfig-frontends
|
2014-01-03 22:49:00 +01:00
|
|
|
that can be found at
|
|
|
|
|
2020-11-28 05:03:51 +01:00
|
|
|
<http://uvc.de/posts/linux-kernel-configuration-tool-kconfig-under-windows.html>
|
2020-07-28 18:47:30 +02:00
|
|
|
|
2020-11-28 05:03:51 +01:00
|
|
|
or a more recent port that can be found at
|
2020-07-28 18:47:30 +02:00
|
|
|
|
|
|
|
<http://reclonelabs.com/more-kconfig-awesomeness-for-windows/>.
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The basic configuration order is "bottom-up":
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- Select the build environment,
|
|
|
|
- Select the processor,
|
|
|
|
- Select the board,
|
|
|
|
- Select the supported peripherals
|
|
|
|
- Configure the device drivers,
|
|
|
|
- Configure the application options on top of this.
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This is pretty straight forward for creating new configurations
|
|
|
|
but may be less intuitive for modifying existing configurations.
|
2018-04-22 19:31:24 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Another ncurses-based tool that is an option to kconfig-mconf is
|
|
|
|
kconfig-nconf. The differences are primary in in the aesthetics of the
|
|
|
|
UI. If you have kconfig-nconf built, then you can invoke that front end
|
|
|
|
with:
|
2018-04-22 19:31:24 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make nconfig
|
2014-01-03 22:49:00 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you have an environment that supports the Qt or GTK graphical systems
|
|
|
|
(probably KDE or gnome, respectively, or Cygwin under Windows with Qt or
|
|
|
|
GTK installed), then you can also build the graphical kconfig-frontends,
|
|
|
|
kconfig-qconf and kconfig-gconf. In these case, you can start the
|
|
|
|
graphical configurator with either:
|
2014-01-03 22:49:00 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make qconfig
|
2014-01-03 22:49:00 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
or
|
2014-01-03 22:49:00 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make gconfig
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Some keyboard shortcuts supported by kconfig-mconf, the tool that runs
|
|
|
|
when you do 'make menuconfig':
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- `?` will bring up the mconfig help display.
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- `/` can be used find configuration selections.
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- `Z` can be used to reveal hidden configuration options
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
These last two shortcuts are described further in the following
|
|
|
|
paragraphs.
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Finding Selections in the Configuration Menus
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The NuttX configuration options have gotten complex and it can be very
|
|
|
|
difficult to find options in the menu trees if you are not sure where
|
|
|
|
to look. The "basic configuration order" describe above can help to
|
|
|
|
narrow things down.
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
But if you know exactly what configuration setting you want to select,
|
|
|
|
say `CONFIG_XYZ`, but not where to find it, then the `make menuconfig`
|
|
|
|
version of the tool offers some help: By pressing the '/' key, the
|
|
|
|
tool will bring up a menu that will allow you to search for a
|
|
|
|
configuration item. Just enter the string `CONFIG_XYZ` and press ENTER.
|
|
|
|
It will show you not only where to find the configuration item, but
|
|
|
|
also all of the dependencies related to the configuration item.
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Reveal Hidden Configuration Options
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you type `Z`, then `kconfig-mconf` will change what is displayed.
|
|
|
|
Normally, only enabled features that have all of their dependencies met
|
|
|
|
are displayed. That is, of course, not very useful if you would like to
|
|
|
|
discover new options or if you are looking for an option and do not
|
|
|
|
realize that the dependencies have not yet been selected and, hence, it
|
|
|
|
is not displayed.
|
2015-06-07 19:44:56 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
But if you enter `Z`, then every option will be shown, whether or not its
|
|
|
|
dependencies have been met. You can then see everything that could be
|
|
|
|
selected with the right dependency selections. These additional options
|
|
|
|
will be shown the `-` for the selection and for the value (since it
|
|
|
|
cannot be selected and has no value). About all you do is to select
|
|
|
|
the `<Help>` option to see what the dependencies are.
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Make Sure that You are on the Right Platform
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Saved configurations may run on Linux, Cygwin (32- or 64-bit), or other
|
|
|
|
platforms. The platform characteristics can be changed use `make
|
|
|
|
menuconfig`. Sometimes this can be confusing due to the differences
|
|
|
|
between the platforms. Enter `sethost.sh`
|
|
|
|
|
|
|
|
sethost.sh is a simple script that changes a configuration to your
|
|
|
|
host platform. This can greatly simplify life if you use many different
|
|
|
|
configurations. For example, if you are running on Linux and you
|
|
|
|
configure like this:
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2019-08-06 00:53:39 +02:00
|
|
|
tools/configure.sh board:configuration
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The you can use the following command to both (1) make sure that the
|
|
|
|
configuration is up to date, AND (2) the configuration is set up
|
|
|
|
correctly for Linux:
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
tools/sethost.sh -l
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Or, if you are on a Windows/Cygwin 64-bit platform:
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
tools/sethost.sh -c
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Or, for MSYS/MSYS2:
|
2018-05-31 19:53:09 +02:00
|
|
|
|
|
|
|
tools/sethost.sh -g
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Other options are available from the help option built into the
|
|
|
|
script. You can see all options with:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
|
|
|
tools/sethost.sh -h
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Recently, the options to the configure.sh (and configure.bat) scripts have
|
|
|
|
been extended so that you both setup the configuration, select for the host
|
|
|
|
platform that you use, and uncompress and refresh the defconfig file all in
|
|
|
|
one command like:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2019-08-06 00:53:39 +02:00
|
|
|
tools/configure.sh -l board:configuration
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
For a Linux host or for a Windows/Cygwin host:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-01-27 07:46:48 +01:00
|
|
|
tools/configure.sh -c board:configuration
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Other options are available from the help option built into the
|
|
|
|
script. You can see all options with:
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
tools/configure.sh -h
|
2016-08-04 00:31:35 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Comparing Two Configurations
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you try to compare two configurations using 'diff', you will probably
|
|
|
|
not be happy with the result. There are superfluous things added to
|
|
|
|
the configuration files that make comparisons with the human eye
|
|
|
|
difficult.
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There is a tool at nuttx/tools/cmpconfig.c that can be built to simplify
|
|
|
|
these comparisons. The output from this difference tool will show only
|
|
|
|
the meaningful differences between two configuration files. This tool is
|
|
|
|
built as follows:
|
2014-12-24 15:15:21 +01:00
|
|
|
|
|
|
|
cd nuttx/tools
|
|
|
|
make -f Makefile.host
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This will create a program called 'cmpconfig' or 'comconfig.exe' on Windows.
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Why would you want to compare two configuration files? Here are a few
|
|
|
|
of the reasons why I do this
|
2014-12-24 15:15:21 +01:00
|
|
|
|
|
|
|
1. When I create a new configuration I usually base it on an older
|
|
|
|
configuration and I want to know, "What are the options that I need to
|
|
|
|
change to add the new feature to the older configurations?" For example,
|
2014-12-26 14:11:07 +01:00
|
|
|
suppose that I have a boardA/nsh configuration and I want to create a
|
2014-12-24 15:15:21 +01:00
|
|
|
boardA/nxwm configuration. Suppose I already have boardB/nsh and
|
|
|
|
boardB/nxwm configurations. Then by comparing the boardB/nsh with the
|
|
|
|
boardB/nxwm I can see the modifications that I would need to make to my
|
|
|
|
boardA/nsh to create a new boardA/nxwm.
|
|
|
|
|
2017-08-13 19:09:12 +02:00
|
|
|
2. But the most common reason that I use the 'cmpconfig' program is to
|
2014-12-24 15:15:21 +01:00
|
|
|
check the results of "refreshing" a configuration with 'make oldconfig'
|
2014-12-26 14:11:07 +01:00
|
|
|
(see the paragraph "Refreshing Configurations" above). The 'make
|
|
|
|
oldconfig' command will make changes to my configuration and using
|
|
|
|
'cmpconfig', I can see precisely what those changes were and if any
|
|
|
|
should be of concern to me.
|
2014-12-24 15:15:21 +01:00
|
|
|
|
2014-12-26 14:11:07 +01:00
|
|
|
3. The 'cmpconfig' tool can also be useful when converting older, legacy
|
|
|
|
manual configurations to the current configurations based on the
|
|
|
|
kconfig-frontends tools. See the following paragraph.
|
2013-01-28 02:44:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Making `defconfig` Files
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### `.config` Files as `defconfig` Files:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The minimum `defconfig` file is simply the generated `.config` file with
|
|
|
|
CONFIG_APPS_DIR setting removed or commented out. That setting provides
|
|
|
|
the name and location of the `apps/` directory relative to the `nuttx` build
|
|
|
|
directory. The default is `../apps/`, however, the apps directory may be
|
|
|
|
any other location and may have a different name. For example, the name
|
|
|
|
of versioned NuttX releases are always in the form `apps-xx.yy` where `xx.yy`
|
|
|
|
is the version number.
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Finding the `apps/` Directory Path:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
When the default configuration is installed using one of the scripts or
|
|
|
|
programs in the NuttX tools directory, there will be an option to provide
|
|
|
|
the path to the `apps/` directory. If not provided, then the configure tool
|
|
|
|
will look around and try to make a reasonable decision about where the
|
|
|
|
`apps/` directory is located.
|
2017-07-08 18:34:06 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Compressed `defconfig` Files:
|
2017-07-08 18:34:06 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The `Makefile` also supports an option to generate very small `defconfig`
|
|
|
|
files. The `.config` files are quite large and complex. But most of the
|
|
|
|
settings in the `.config` file simply have the default settings from the
|
|
|
|
`Kconfig` files. These `.config` files can be converted into small `defconfig`
|
|
|
|
file:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make savedefconfig
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
That make target will generate a defconfig file in the top-level
|
|
|
|
directory. The size reduction is really quite remarkable:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
wc -l .config defconfig
|
|
|
|
1085 .config
|
|
|
|
82 defconfig
|
|
|
|
1167 total
|
2017-07-10 22:36:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
In order to be usable, the `.config` file installed from the compressed
|
|
|
|
defconfig file must be reconstituted using:
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make olddefconfig
|
2014-03-06 20:00:50 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
> **NOTE 1**: Only compressed defconfig files are retained in the NuttX repository.
|
|
|
|
> All patches and PRs that attempt to add or modify a defconfig file MUST
|
|
|
|
> use the compressed defconfig format as created by 'make savdefconfig.'
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
> **NOTE 2**: When 'make savedefconfig' runs it will try several things some of
|
|
|
|
> which are expected to fail. In these cases you will see an error message
|
|
|
|
> from make followed by "(ignored)." You should also ignore these messages
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**CAUTION**: This size reduction was accomplished by removing all setting
|
|
|
|
from the `.config` file that were at the default value. `make olddefconfig`
|
|
|
|
can regenerate the original `.config` file by simply restoring those default
|
|
|
|
settings. The underlying assumption here is, of course, that the default
|
|
|
|
settings do not change. If the default settings change, and they often
|
|
|
|
do, then the original `.config` may not be reproducible.
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
So if your project requires 100% reproducibility over a long period of
|
|
|
|
time, you make want to save the complete `.config` files vs. the standard,
|
|
|
|
compressed `defconfig` file.
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Configuring with "Compressed" defconfig Files:
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
As described above `defconfig`, all NuttX `defconfig` files are compressed
|
|
|
|
using `make savedeconfig`. These compressed `defconfig` files are
|
|
|
|
generally not fully usable as they are and may not build the target
|
|
|
|
binaries that you want because the compression process removed all of
|
|
|
|
the default settings from the `defconfig` file. To restore the default
|
|
|
|
settings, you should run the following after configuring:
|
2013-01-03 14:39:16 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make olddefconfig
|
2014-12-26 14:11:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
That will restore the the missing defaulted values.
|
|
|
|
|
|
|
|
Using this command after configuring is generally a good practice anyway:
|
|
|
|
Even if the `defconfig` files are not "compressed" in this fashion, the
|
|
|
|
`defconfig` file may be old and the only way to assure that the installed
|
|
|
|
`.config` is is up to date is via `make oldconfig` or `make olddefconfig`.
|
|
|
|
See the paragraph above entitled "Refreshing Configurations" for
|
|
|
|
additional information.
|
|
|
|
|
|
|
|
## Incompatibilities with Older Configurations
|
|
|
|
|
|
|
|
**WARNING**
|
|
|
|
|
|
|
|
The current NuttX build system supports *only* the new compressed,
|
|
|
|
`defconfig` configuration files generated using the `kconfig-frontends` tools
|
|
|
|
as described in the preceding section. Support for the older, legacy,
|
|
|
|
manual configurations was eliminated in NuttX 7.0; support for
|
|
|
|
uncompressed `.config-files-as-defconfig` files was eliminated after
|
|
|
|
NuttX-7.21. All configurations must now be done using the
|
|
|
|
`kconfig-frontends` tool. The older manual configurations and the new
|
|
|
|
`kconfig-frontends` configurations are not compatible. Old legacy
|
|
|
|
configurations can *not* be used with the `kconfig-frontends` tool and,
|
|
|
|
hence, cannot be used with releases of NuttX 7.0 and beyond:
|
|
|
|
|
|
|
|
If you run `make menuconfig` with a legacy configuration the resulting
|
|
|
|
configuration will probably not be functional.
|
|
|
|
|
|
|
|
> Q: How can I tell if a configuration is a new kconfig-frontends
|
|
|
|
> configuration or an older, manual configuration?
|
|
|
|
>
|
|
|
|
> A: Only old, manual configurations will have an appconfig file
|
|
|
|
>
|
|
|
|
> Q: How can I convert a older, manual configuration into a new,
|
|
|
|
> kconfig-frontends toolchain.
|
|
|
|
>
|
2020-08-30 22:12:57 +02:00
|
|
|
> A: Refer to <https://cwiki.apache.org/confluence/display/NUTTX/Converting+Legacy+Configurations+to+Use+kconfig-mconf>
|
2020-07-28 18:47:30 +02:00
|
|
|
|
|
|
|
**WARNING**
|
|
|
|
|
|
|
|
As described above, whenever you use a configuration, you really should
|
|
|
|
always refresh the configuration with the following command *before* you
|
|
|
|
make NuttX:
|
2014-12-26 14:11:07 +01:00
|
|
|
|
|
|
|
make oldconfig
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
OR
|
2017-07-10 20:48:12 +02:00
|
|
|
|
|
|
|
make olddefconfig
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This will make sure that the configuration is up-to-date in the event that
|
|
|
|
it has lapsed behind the current NuttX development (see the paragraph
|
|
|
|
"Refreshing Configurations" above). But this only works with *new*
|
|
|
|
configuration files created with the kconfig-frontends tools.
|
2017-07-10 20:48:12 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Further, this step is *NOT* optional with the new, compressed defconfig
|
|
|
|
files. It is a necessary step that will also uncompress the defconfig
|
|
|
|
file, regenerating the `.config` and making it usable for NuttX builds.
|
2014-12-26 14:11:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Never do `make oldconfig` (OR `make menuconfig`) on a configuration that
|
|
|
|
has not been converted to use the kconfig-frontends tools! This will
|
|
|
|
damage your configuration (see
|
2020-08-30 22:12:57 +02:00
|
|
|
<https://cwiki.apache.org/confluence/display/NUTTX/Converting+Legacy+Configurations+to+Use+kconfig-mconf>).
|
2014-12-26 14:11:07 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## NuttX Configuration Tool under DOS
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2012-12-23 18:32:41 +01:00
|
|
|
Recent versions of NuttX support building NuttX from a native Windows
|
2020-07-28 18:47:30 +02:00
|
|
|
console window (see *Native Windows Build* below). But `kconfig-frontends`
|
2014-01-03 22:49:00 +01:00
|
|
|
is a Linux tool. At one time this was a problem for Windows users, but
|
2020-07-28 18:47:30 +02:00
|
|
|
now there are two specially modified versions of the `kconfig-frontends`
|
2020-04-26 22:01:09 +02:00
|
|
|
tools that can be used. One can be found here:
|
2020-07-28 18:47:30 +02:00
|
|
|
<http://uvc.de/posts/linux-kernel-configuration-tool-kconfig-under-windows.html>
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2020-04-26 22:01:09 +02:00
|
|
|
The configuration steps of the most recent versions of NuttX require the
|
2020-07-28 18:47:30 +02:00
|
|
|
`kconfig-tweak` tool that is not not available in the the above. However,
|
|
|
|
there has been an update to this `Kconfig` Windows tools that does include
|
|
|
|
`kconfig-tweak`: http://reclonelabs.com/more-kconfig-awesomeness-for-windows/
|
2018-01-11 14:28:12 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Source code is available here: <https://github.com/reclone/kconfig-frontends-win32>
|
|
|
|
and <https://github.com/reclone/kconfig-frontends-win32/releases>
|
2018-01-11 14:28:12 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
It is also possible to use the version of `kconfig-frontends` built
|
|
|
|
under Cygwin outside of the Cygwin *sandbox* in a native Windows
|
2014-01-03 22:49:00 +01:00
|
|
|
environment:
|
2012-12-22 17:47:02 +01:00
|
|
|
|
|
|
|
1. You can run the configuration tool using Cygwin. However, the
|
2022-01-04 22:06:58 +01:00
|
|
|
Cygwin `Win.mk` will complain so to do this will, you have
|
2020-07-28 18:47:30 +02:00
|
|
|
to manually edit the `.config` file:
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
a. Delete the line: `CONFIG_WINDOWS_NATIVE=y`
|
|
|
|
|
|
|
|
b. Change the apps/ directory path, `CONFIG_APPS_DIR` to use Unix
|
|
|
|
style delimiters. For example, change `..\apps` to `../apps`
|
2012-12-22 17:47:02 +01:00
|
|
|
|
|
|
|
And of course, after you use the configuration tool you need to
|
2020-07-28 18:47:30 +02:00
|
|
|
restore `CONFIG_WINDOWS_NATIVE=y` and the correct `CONFIG_APPS_DIR`.
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
2. You can, with some effort, run the Cygwin `kconfig-mconf` tool
|
2013-01-10 01:45:11 +01:00
|
|
|
directly in the Windows console window. In this case, you do not
|
2020-07-28 18:47:30 +02:00
|
|
|
have to modify the `.config` file, but there are other complexities:
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
a. You need to temporarily set the Cygwin directories in the PATH
|
|
|
|
variable then run `kconfig-mconf` manually like:
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2013-01-09 13:55:13 +01:00
|
|
|
kconfig-mconf Kconfig
|
2012-12-22 17:47:02 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There is a Windows batch file at `tools/kconfig.bat` that automates
|
|
|
|
these steps:
|
2012-12-22 17:47:02 +01:00
|
|
|
|
|
|
|
tools/kconfig menuconfig
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
b. There is an issue with accessing DOS environment variables from
|
|
|
|
the Cygwin `kconfig-mconf` running in the Windows console. The
|
|
|
|
following change to the top-level `Kconfig` file seems to work
|
|
|
|
around these problems:
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
config APPSDIR
|
|
|
|
string
|
|
|
|
- option env="APPSDIR"
|
|
|
|
+ default "../apps"
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# TOOLCHAINS
|
2010-11-06 22:48:13 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Cross-Development Toolchains
|
2010-11-06 22:48:13 +01:00
|
|
|
|
|
|
|
In order to build NuttX for your board, you will have to obtain a cross-
|
|
|
|
compiler to generate code for your target CPU. For each board,
|
2020-07-28 18:47:30 +02:00
|
|
|
configuration, there is a `README.txt` file (at
|
|
|
|
`boards/<arch-name>/<chip-name>/<board-name>/README.txt`).
|
2010-11-06 22:48:13 +01:00
|
|
|
That README file contains suggestions and information about appropriate
|
|
|
|
tools and development environments for use with your board.
|
|
|
|
|
2017-04-26 18:28:37 +02:00
|
|
|
In any case, the PATH environment variable will need to be updated to
|
2017-07-08 14:55:50 +02:00
|
|
|
include the location where the build can find the toolchain binaries.
|
2010-11-06 22:48:13 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## NuttX Buildroot Toolchain
|
2010-11-06 22:48:13 +01:00
|
|
|
|
|
|
|
For many configurations, a DIY set of tools is available for NuttX. These
|
2015-06-27 02:13:20 +02:00
|
|
|
tools can be downloaded from the NuttX Bitbucket.org file repository. After
|
2010-11-06 22:48:13 +01:00
|
|
|
unpacking the buildroot tarball, you can find instructions for building
|
2020-07-28 18:47:30 +02:00
|
|
|
the tools in the `buildroot/boards/README.txt` file.
|
2010-11-06 22:48:13 +01:00
|
|
|
|
2017-08-13 19:09:12 +02:00
|
|
|
Check the README.txt file in the configuration directory for your board
|
2010-11-06 22:48:13 +01:00
|
|
|
to see if you can use the buildroot toolchain with your board (this
|
2019-08-09 00:23:55 +02:00
|
|
|
README.txt file is located in
|
2020-07-28 18:47:30 +02:00
|
|
|
`boards/<arch-name>/<chip-name>/<board-name>/README.txt`).
|
2010-11-06 22:48:13 +01:00
|
|
|
|
|
|
|
This toolchain is available for both the Linux and Cygwin development
|
|
|
|
environments.
|
|
|
|
|
2012-04-07 21:38:13 +02:00
|
|
|
Advantages: (1) NuttX header files are built into the tool chain,
|
2014-04-24 20:44:30 +02:00
|
|
|
and (2) related support tools like NXFLAT tools, the ROMFS
|
|
|
|
genromfs tools, and the kconfig-frontends tools can be built into your
|
|
|
|
toolchain.
|
2012-04-07 21:38:13 +02:00
|
|
|
|
|
|
|
Disadvantages: This tool chain is not was well supported as some other
|
|
|
|
toolchains. GNU tools are not my priority and so the buildroot tools
|
2013-02-01 00:29:34 +01:00
|
|
|
often get behind. For example, until recently there was no EABI support
|
|
|
|
in the NuttX buildroot toolchain for ARM.
|
|
|
|
|
|
|
|
NOTE: For Cortex-M3/4, there are OABI and EABI versions of the buildroot
|
|
|
|
toolchains. If you are using the older OABI toolchain the prefix for
|
2020-07-28 18:47:30 +02:00
|
|
|
the tools will be `arm-nuttx-elf-`; for the EABI toolchain the prefix will
|
|
|
|
be `arm-nuttx-eabi-`. If you are using the older OABI toolchain with
|
2022-09-15 12:17:26 +02:00
|
|
|
an ARM Cortex-M3/4, you will need to set CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI
|
2020-07-28 18:47:30 +02:00
|
|
|
in the `.config` file in order to pick the right tool prefix.
|
2012-04-07 21:38:13 +02:00
|
|
|
|
2013-02-01 15:53:38 +01:00
|
|
|
If the make system ever picks the wrong prefix for your toolchain, you
|
|
|
|
can always specify the prefix on the command to override the default
|
|
|
|
like:
|
|
|
|
|
|
|
|
make CROSSDEV=arm-nuttx-elf
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# SHELLS
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The NuttX build relies on some shell scripts. Some are inline in the
|
|
|
|
Makefiles and many are executable scripts in the `tools/`. directory. The
|
|
|
|
scripts were all developed using bash and many contain bash shell
|
|
|
|
dependencies.
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Most of the scripts begin with `#!/bin/bash` to specifically select the
|
|
|
|
bash shell. Some still have `#!/bin/sh` but I haven't heard any complaints
|
|
|
|
so these must not have bash dependencies.
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There are two shell issues that I have heard of:
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
1. Linux where `/bin/sh` refers to an incompatible shell (like `ksh` or `csh`).
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
In this case, bash is probably available and the `#!/bin/bash` at the
|
|
|
|
beginning of the file should do the job. If any scripts with `#!/bin/sh`
|
|
|
|
fail, try changing that to `#!/bin/bash` and let me know about the change.
|
2011-08-27 16:58:42 +02:00
|
|
|
|
|
|
|
2. FreeBSD with the Bourne Shell and no bash shell.
|
|
|
|
|
|
|
|
The other, reverse case has also been reported on FreeBSD setups that
|
2020-07-28 18:47:30 +02:00
|
|
|
have the Bourne shell, but not bash. In this base, `#!/bin/bash` fails
|
|
|
|
but `#!/bin/sh` works okay. My recommendation in this case is to create
|
|
|
|
a symbolic link at `/bin/bash` that refers to the Bourne shell.
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There may still be issues, however, with certain the `bash`-centric scripts
|
2011-08-27 16:58:42 +02:00
|
|
|
that will require modifications.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# BUILDING NUTTX
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Building
|
2010-11-07 00:41:08 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
NuttX builds in-place in the source tree. You do not need to create
|
|
|
|
any special build directories. Assuming that your Make.defs is setup
|
|
|
|
properly for your tool chain and that PATH environment variable contains
|
|
|
|
the path to where your cross-development tools are installed, the
|
|
|
|
following steps are all that are required to build NuttX:
|
2010-11-07 00:41:08 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
cd {TOPDIR}
|
2010-11-07 00:41:08 +01:00
|
|
|
make
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
At least one configuration (eagle100) requires additional command line
|
|
|
|
arguments on the make command. Read
|
|
|
|
`{TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt` to see
|
|
|
|
if that applies to your target.
|
2010-11-07 00:41:08 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Re-building
|
2010-11-07 00:41:08 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Re-building is normally simple -- just type make again.
|
2010-11-07 00:41:08 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
But there are some things that can "get you" when you use the Cygwin
|
|
|
|
development environment with Windows native tools. The native Windows
|
|
|
|
tools do not understand Cygwin's symbolic links, so the NuttX make system
|
|
|
|
does something weird: It copies the configuration directories instead of
|
|
|
|
linking to them (it could, perhaps, use the NTFS `mklink` command, but it
|
|
|
|
doesn't).
|
2010-11-07 00:41:08 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
A consequence of this is that you can easily get confused when you edit
|
|
|
|
a file in one of the linked (i.e., copied) directories, re-build NuttX,
|
|
|
|
and then not see your changes when you run the program. That is because
|
|
|
|
build is still using the version of the file in the copied directory, not
|
|
|
|
your modified file!
|
2016-04-24 23:33:59 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Older versions of NuttX did not support dependencies in this
|
|
|
|
configuration. So a simple work around this annoying behavior in this
|
|
|
|
case was the following when you re-build:
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2010-11-07 00:41:08 +01:00
|
|
|
make clean_context all
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This 'make' command will remove of the copied directories, re-copy them,
|
|
|
|
then make NuttX.
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
However, more recent versions of NuttX do support dependencies for the
|
|
|
|
Cygwin build. As a result, the above command will cause everything to be
|
|
|
|
rebuilt (because it removes and will cause recreating the
|
|
|
|
`include/nuttx/config.h` header file). A much less gracefully but still
|
|
|
|
effective command in this case is the following for the ARM configuration:
|
2016-04-24 23:33:59 +02:00
|
|
|
|
|
|
|
rm -rf arch/arm/src/chip arch/arm/src/board
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This "kludge" simple removes the copied directories. These directories
|
|
|
|
will be re-created when you do a normal 'make' and your edits will then be
|
|
|
|
effective.
|
|
|
|
|
|
|
|
## Build Targets and Options
|
2016-04-24 23:33:59 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Build Targets
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Below is a summary of the build targets available in the top-level
|
|
|
|
NuttX Makefile:
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `all`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
The default target builds the NuttX executable in the selected output
|
|
|
|
formats.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `clean`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
Removes derived object files, archives, executables, and temporary
|
|
|
|
files, but retains the configuration and context files and directories.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `distclean`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2016-08-17 20:34:54 +02:00
|
|
|
Does 'clean' then also removes all configuration and context files.
|
|
|
|
This essentially restores the directory structure to its original,
|
|
|
|
unconfigured stated.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Application housekeeping targets. The APPDIR variable refers to the user
|
|
|
|
application directory. A sample `apps/` directory is included with NuttX,
|
|
|
|
however, this is not treated as part of NuttX and may be replaced with a
|
|
|
|
different application directory. For the most part, the application
|
|
|
|
directory is treated like any other build directory in the `Makefile` script.
|
|
|
|
However, as a convenience, the following targets are included to support
|
|
|
|
housekeeping functions in the user application directory from the NuttX
|
|
|
|
build directory.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `apps_clean`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
Perform the clean operation only in the user application directory
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `apps_distclean`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
Perform the distclean operation only in the user application directory.
|
|
|
|
The apps/.config file is preserved so that this is not a "full" distclean
|
2018-01-11 14:28:12 +01:00
|
|
|
but more of a configuration "reset" for the application directory.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `export`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
The export target will package the NuttX libraries and header files into
|
|
|
|
an exportable package. Caveats: (1) These needs some extension for the KERNEL
|
|
|
|
build. (2) The logic in tools/mkexport.sh only supports GCC and, for example,
|
|
|
|
explicitly assumes that the archiver is 'ar'
|
|
|
|
|
2021-10-14 15:57:21 +02:00
|
|
|
* `flash` (or `download` : DEPRECATED)
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2021-10-14 15:57:21 +02:00
|
|
|
This is a helper target that will rebuild NuttX and flash it to the target
|
2011-12-31 17:53:05 +01:00
|
|
|
system in one step. The operation of this target depends completely upon
|
2021-10-14 15:57:21 +02:00
|
|
|
implementation of the FLASH command in the user Make.defs file. It will
|
|
|
|
generate an error if the FLASH command is not defined.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The following targets are used internally by the make logic but can be invoked
|
|
|
|
from the command under certain conditions if necessary.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `depend`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
Create build dependencies. (NOTE: There is currently no support for build
|
|
|
|
dependencies under Cygwin using Windows-native toolchains.)
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `context`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
The context target is invoked on each target build to assure that NuttX is
|
|
|
|
properly configured. The basic configuration steps include creation of the
|
2020-07-28 18:47:30 +02:00
|
|
|
the `config.h` and `version.h` header files in the `include/nuttx` directory and
|
2011-12-31 17:53:05 +01:00
|
|
|
the establishment of symbolic links to configured directories.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `clean_context`
|
2012-09-18 16:06:57 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This is part of the `distclean` target. It removes all of the header files
|
2012-09-18 16:06:57 +02:00
|
|
|
and symbolic links created by the context target.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
### Build Options
|
|
|
|
|
|
|
|
Of course, the value any make variable an be overridden from the make command
|
|
|
|
line. However, there is one particular variable assignment option that may
|
|
|
|
be useful to you:
|
2012-09-18 16:06:57 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
* `V=1`
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This is the build "verbosity flag." If you specify `V=1` on the make command
|
2012-09-18 16:06:57 +02:00
|
|
|
line, you will see the exact commands used in the build. This can be very
|
|
|
|
useful when adding new boards or tracking down compile time errors and
|
2012-09-18 20:32:31 +02:00
|
|
|
warnings (Contributed by Richard Cochran).
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Native Windows Build
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The beginnings of a Windows native build are in place but still not often
|
|
|
|
used as of this writing. The build was functional but because of lack of
|
|
|
|
use may find some issues to be resolved with this build configuration.
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The windows native build logic initiated if CONFIG_WINDOWS_NATIVE=y is
|
|
|
|
defined in the NuttX configuration file:
|
2016-08-02 22:32:13 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This build:
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
- Uses all Windows style paths
|
|
|
|
- Uses primarily Windows batch commands from cmd.exe, with
|
|
|
|
- A few extensions from GNUWin32
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
In this build, you cannot use a Cygwin or MSYS shell. Rather the build must
|
|
|
|
be performed in a Windows console window. Here is a better terminal than the
|
|
|
|
standard issue, CMD.exe terminal: ConEmu which can be downloaded from:
|
|
|
|
<https://sourceforge.net/projects/conemu/> or <https://conemu.github.io/>.
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Build Tools. The build still relies on some Unix-like commands. I use
|
|
|
|
the GNUWin32 tools that can be downloaded from <http://gnuwin32.sourceforge.net/>
|
|
|
|
using the *Download all* selection. Individual packages can be download
|
|
|
|
instead if you know what you are doing and want a faster download (No, I
|
|
|
|
can't tell you which packages you should or should not download).
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
NOTE: It should be possible to use Cygwin or MSYS2 in place of the GNUWin32
|
|
|
|
tools. There are, however, complexities in doing that because those tools
|
|
|
|
depend on the shell environment and use DLLs that are not found (at least
|
|
|
|
not without the correct setup).
|
2020-01-16 18:22:36 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Host Compiler: I use the MingGW GCC compiler which can be downloaded from
|
|
|
|
<http://www.mingw.org/>. If you are using GNUWin32, then it is recommended
|
|
|
|
the you not install the optional MSYS components as there may be conflicts.
|
2012-11-11 19:36:28 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Kconfig-frontends: See the section entitled "NuttX Configuration Tool
|
|
|
|
under DOS" for information about installing the `kconfig-frontend` tools to
|
|
|
|
run natively under Windows.
|
2020-01-16 18:22:36 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
This capability should still be considered a work in progress because:
|
2013-12-04 14:46:10 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
1. It has not been verified on all targets and tools, and
|
|
|
|
2. it still lacks some of the creature-comforts of the more mature
|
|
|
|
environments.
|
2013-01-04 22:37:31 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Installing GNUWin32
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
The Windows native build will depend upon a few Unix-like tools that can be
|
|
|
|
provided either by MSYS or GNUWin32. The GNUWin32 are available from
|
2020-07-28 18:47:30 +02:00
|
|
|
<http://gnuwin32.sourceforge.net/>. GNUWin32 provides ports of tools with a
|
2012-12-22 17:47:02 +01:00
|
|
|
GPL or similar open source license to modern MS-Windows (Microsoft Windows
|
|
|
|
2000 / XP / 2003 / Vista / 2008 / 7). See
|
2020-07-28 18:47:30 +02:00
|
|
|
<http://gnuwin32.sourceforge.net/packages.html> for a list of all of the tools
|
2012-12-22 17:47:02 +01:00
|
|
|
available in the GNUWin32 package.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
The SourceForge project is located here:
|
2020-07-28 18:47:30 +02:00
|
|
|
<http://sourceforge.net/projects/gnuwin32/>. The project is still being
|
2012-12-22 17:47:02 +01:00
|
|
|
actively supported (although some of the Windows ports have gotten very old).
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
Some commercial toolchains include a subset of the GNUWin32 tools in the
|
|
|
|
installation. My recommendation is that you download the GNUWin32 tools
|
|
|
|
directly from the sourceforge.net website so that you will know what you are
|
|
|
|
using and can reproduce your build environment.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
GNUWin32 Installation Steps:
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
The following steps will download and execute the GNUWin32 installer.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
1. Download `GetGNUWin32-x.x.x.exe` from
|
|
|
|
<http://sourceforge.net/projects/getgnuwin32/files/>. This is the
|
|
|
|
installer. The current version as of this writing is 0.6.3.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
2. Run the installer.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
3. Accept the license.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
4. Select the installation directory. My recommendation is the
|
|
|
|
directory that contains this README file (`<this-directory>`).
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
5. After running `GetGNUWin32-0.x.x.exe`, you will have a new directory
|
|
|
|
`<this-directory>/GetGNUWin32`
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Note that the GNUWin32 installer didn't install GNUWin32. Instead, it
|
|
|
|
installed another, smarter downloader. That downloader is the GNUWin32
|
|
|
|
package management tool developed by the Open SSL project.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The following steps probably should be performed from inside a DOS shell.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
6. Change to the directory created by `GetGNUWin32-x.x.x.exe`
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
cd GetGNUWin32
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
7. Execute the download.bat script. The download.bat script will download
|
|
|
|
about 446 packages! Enough to have a very complete Linux-like environment
|
|
|
|
under the DOS shell. This will take awhile. This step only downloads
|
|
|
|
the packages and the next step will install the packages.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
download
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
8. This step will install the downloaded packages. The argument of the
|
|
|
|
install.bat script is the installation location. C:\gnuwin32 is the
|
|
|
|
standard install location:
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2012-12-22 17:47:02 +01:00
|
|
|
install C:\gnuwin32
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**NOTE**: This installation step will install *all* GNUWin32 packages... far
|
2012-12-22 17:47:02 +01:00
|
|
|
more than you will ever need. If disc space is a problem for you, you might
|
|
|
|
need to perform a manual installation of the individual ZIP files that you
|
2020-07-28 18:47:30 +02:00
|
|
|
will find in the `<this directory>/GetGNUWin32/packages` directory.
|
2012-11-14 00:05:48 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
9. Make sure that you add the GNUWin32 tools to your path variable:
|
2020-01-16 18:22:36 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
set PATH=C:\gnuwin32\bin;%PATH%
|
2020-01-16 18:22:36 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
**WARNING**: Make sure you have `C:\MinGW\bin` in your path before any other
|
|
|
|
directory that contains `libiconv-2.dll`. Apparently the `as.exe` in some
|
2020-01-18 00:03:29 +01:00
|
|
|
MinGW distributions are dependent on that DLL, and having an old
|
|
|
|
version of it in the path somewhere (for example GnuWin32 tools) will
|
|
|
|
cause as.exe to pick up the older version that doesn't have the entry
|
|
|
|
point it's looking for.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# CYGWIN BUILD PROBLEMS
|
2010-10-08 14:33:31 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Performance
|
2018-01-20 19:59:56 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Build performance under Cygwin is really not so bad, certainly not as good
|
|
|
|
as a Linux build. However, often you will find that the performance is
|
|
|
|
not just bad but terrible. If you are seeing awful performance.. like two
|
|
|
|
or three compilations per second.. the culprit is usually your Windows
|
|
|
|
Anti-Virus protection interfering with the build tool program execution.
|
2018-01-20 19:59:56 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
I use Cygwin quite often and I use Windows Defender. In order to get good
|
|
|
|
build performance, I routinely keep the Windows Defender "Virus & Threat
|
|
|
|
Protections Settings" screen up: I disable "Real-Time Protection" just
|
|
|
|
before entering 'make' then turn "Real-Time Protection" back on when the
|
|
|
|
build completes. With this additional nuisance step, I find that build
|
|
|
|
performance under Cygwin is completely acceptable.
|
2018-01-20 19:59:56 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Strange Path Problems
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
If you see strange behavior when building under Cygwin then you may have
|
|
|
|
a problem with your PATH variable. For example, if you see failures to
|
|
|
|
locate files that are clearly present, that may mean that you are using
|
|
|
|
the wrong version of a tool. For example, you may not be using Cygwin's
|
|
|
|
'make' program at /usr/bin/make. Try:
|
2010-10-08 14:33:31 +02:00
|
|
|
|
2017-07-10 20:48:12 +02:00
|
|
|
which make
|
2010-10-08 14:33:31 +02:00
|
|
|
/usr/bin/make
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
When you install some toolchains (such as Yargarto or CodeSourcery tools),
|
|
|
|
they may modify your PATH variable to include a path to their binaries.
|
|
|
|
At that location, they may have GNUWin32 versions of the tools. So you
|
|
|
|
might actually be using a version of make that does not understand Cygwin
|
|
|
|
paths.
|
2010-10-08 14:33:31 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
The solution is either:
|
2010-10-08 14:33:31 +02:00
|
|
|
|
2012-09-18 16:06:57 +02:00
|
|
|
1. Edit your PATH to remove the path to the GNUWin32 tools, or
|
2020-07-28 18:47:30 +02:00
|
|
|
|
2012-09-18 16:06:57 +02:00
|
|
|
2. Put /usr/local/bin, /usr/bin, and /bin at the front of your path:
|
2010-10-08 14:33:31 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
export PATH=/usr/local/bin:/usr/bin:/bin:$PATH
|
2010-10-08 14:33:31 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Window Native Toolchain Issues
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There are many popular Windows native toolchains that may be used with NuttX.
|
|
|
|
Examples include CodeSourcery (for Windows), devkitARM, and several vendor-
|
|
|
|
provided toolchains. There are several limitations with using a and Windows
|
|
|
|
based toolchain in a Cygwin environment. The three biggest are:
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
|
|
|
|
performed automatically in the Cygwin makefiles using the 'cygpath' utility
|
|
|
|
but you might easily find some new path problems. If so, check out 'cygpath -w'
|
|
|
|
|
|
|
|
2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
|
2020-10-19 06:09:06 +02:00
|
|
|
are used in NuttX (e.g., include/arch). The make system works around these
|
2011-12-31 17:53:05 +01:00
|
|
|
problems for the Windows tools by copying directories instead of linking them.
|
|
|
|
But this can also cause some confusion for you: For example, you may edit
|
|
|
|
a file in a "linked" directory and find that your changes had no effect.
|
|
|
|
That is because you are building the copy of the file in the "fake" symbolic
|
|
|
|
directory. If you use a Windows toolchain, you should get in the habit of
|
|
|
|
making like this:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
make clean_context all
|
2011-12-31 17:53:05 +01:00
|
|
|
|
|
|
|
An alias in your .bashrc file might make that less painful. The rebuild
|
|
|
|
is not a long as you might think because there is no dependency checking
|
|
|
|
if you are using a native Windows toolchain. That bring us to #3:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## General Pre-built Toolchain Issues
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
To continue with the list of "Window Native Toolchain Issues" we can add
|
|
|
|
the following. These, however, are really just issues that you will have
|
|
|
|
if you use any pre-built toolchain (vs. building the NuttX toolchain from
|
|
|
|
the NuttX buildroot package):
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
There may be incompatibilities with header files, libraries, and compiler
|
|
|
|
built-in functions detailed below. For the most part, these issues
|
|
|
|
are handled in the existing make logic. But if you are breaking new ground,
|
|
|
|
then you may encounter these:
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
1. Header Files. Most pre-built toolchains will build with a foreign C
|
2013-12-04 14:46:10 +01:00
|
|
|
library (usually newlib, but maybe uClibc or glibc if you are using a
|
2011-12-31 17:53:05 +01:00
|
|
|
Linux toolchain). This means that the header files from the foreign
|
2020-07-28 18:47:30 +02:00
|
|
|
C library will be built into the toolchain. So if you `#include <stdio.h>`,
|
2011-12-31 17:53:05 +01:00
|
|
|
you will get the stdio.h from the incompatible, foreign C library and
|
2020-07-28 18:47:30 +02:00
|
|
|
not the nuttx `stdio.h` (at `nuttx/include/stdio.h`) that you wanted.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2017-08-13 19:09:12 +02:00
|
|
|
This can cause confusion in the builds and you must always be
|
2020-07-28 18:47:30 +02:00
|
|
|
sure the `-nostdinc` is included in the `CFLAGS`. That will assure that
|
2013-12-04 14:46:10 +01:00
|
|
|
you take the include files only from
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
2. Libraries. What was said above header files applies to libraries.
|
2011-12-31 17:53:05 +01:00
|
|
|
You do not want to include code from the libraries of any foreign
|
|
|
|
C libraries built into your toolchain. If this happens you will get
|
2014-10-15 18:57:04 +02:00
|
|
|
perplexing errors about undefined symbols. To avoid these errors,
|
2020-07-28 18:47:30 +02:00
|
|
|
you will need to add `-nostdlib` to your `CFLAGS` flags to assure that
|
2011-12-31 17:53:05 +01:00
|
|
|
you only take code from the NuttX libraries.
|
|
|
|
|
|
|
|
This, however, may causes other issues for libraries in the toolchain
|
2020-07-28 18:47:30 +02:00
|
|
|
that you do want (like `libgcc.a` or `libm.a`). These are special-cased
|
2011-12-31 17:53:05 +01:00
|
|
|
in most Makefiles, but you could still run into issues of missing
|
|
|
|
libraries.
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
3. Built-Ins. Some compilers target a particular operating system.
|
2011-12-31 17:53:05 +01:00
|
|
|
Many people would, for example, like to use the same toolchain to
|
|
|
|
develop Linux and NuttX software. Compilers built for other
|
|
|
|
operating systems may generate incompatible built-in logic and,
|
2020-07-28 18:47:30 +02:00
|
|
|
for this reason, `-fno-builtin` should also be included in your
|
2011-12-31 17:53:05 +01:00
|
|
|
C flags
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
And finally you may not be able to use NXFLAT.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
4. NXFLAT. If you use a pre-built toolchain, you will lose all support
|
2012-09-18 16:06:57 +02:00
|
|
|
for NXFLAT. NXFLAT is a binary format described in
|
2011-12-31 17:53:05 +01:00
|
|
|
Documentation/NuttXNxFlat.html. It may be possible to build
|
|
|
|
standalone versions of the NXFLAT tools; there are a few examples
|
2020-07-28 18:47:30 +02:00
|
|
|
of this in the buildroot repository at <https://bitbucket.org/nuttx/buildroot>
|
2015-06-28 09:54:25 +02:00
|
|
|
However, it is possible that there could be interoperability issues
|
|
|
|
with your toolchain since they will be using different versions of
|
2014-10-15 18:57:04 +02:00
|
|
|
binutils and possibly different ABIs.
|
2011-12-31 17:53:05 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Building Original Linux Boards in Cygwin
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Some default board configurations are set to build under Linux and others
|
|
|
|
to build under Windows with Cygwin. Various default toolchains may also
|
|
|
|
be used in each configuration. It is possible to change the default
|
|
|
|
setup. Here, for example, is what you must do in order to compile a
|
|
|
|
default Linux configuration in the Cygwin environment using the
|
|
|
|
CodeSourcery for Windows toolchain. After instantiating a "canned"
|
|
|
|
NuttX configuration, run the target 'menuconfig' and set the following
|
|
|
|
items:
|
2014-10-28 02:16:45 +01:00
|
|
|
|
|
|
|
Build Setup->Build Host Platform->Windows
|
|
|
|
Build Setup->Windows Build Environment->Cygwin
|
|
|
|
System Type->Toolchain Selection->CodeSourcery GNU Toolchain under Windows
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
In Windows 7 it may be required to open the Cygwin shell as Administrator
|
|
|
|
("Run As" option, right button) you find errors like "Permission denied".
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
## Recovering from Bad Configurations
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Many people make the mistake of configuring NuttX with the "canned"
|
|
|
|
configuration and then just typing `make` with disastrous consequences;
|
|
|
|
the build may fail with mysterious, uninterpretable, and irrecoverable
|
|
|
|
build errors. If, for example, you do this with an unmodified Linux
|
|
|
|
configuration in a Windows/Cgwin environment, you will corrupt the
|
|
|
|
build environment. The environment will be corrupted because of POSIX vs
|
|
|
|
Windows path issues and with issues related to symbolic links. If you
|
|
|
|
make the mistake of doing this, the easiest way to recover is to just
|
|
|
|
start over: Do `make distclean` to remove every trace of the corrupted
|
|
|
|
configuration, reconfigure from scratch, and make certain that the set
|
|
|
|
the configuration correctly for your platform before attempting to make
|
|
|
|
again.
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Just fixing the configuration file after you have instantiated the bad
|
|
|
|
configuration with 'make' is not enough.
|
2014-10-28 02:16:45 +01:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
# DOCUMENTATION
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2009-10-14 23:54:31 +02:00
|
|
|
Additional information can be found in the Documentation/ directory and
|
2009-10-24 15:20:19 +02:00
|
|
|
also in README files that are scattered throughout the source tree. The
|
|
|
|
documentation is in HTML and can be access by loading the following file
|
|
|
|
into your Web browser:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
Documentation/index.html
|
2009-10-24 15:20:19 +02:00
|
|
|
|
2021-10-27 05:01:26 +02:00
|
|
|
NuttX documentation is also available online at <https://nuttx.apache.org/>.
|
2009-10-24 15:20:19 +02:00
|
|
|
|
|
|
|
Below is a guide to the available README files in the NuttX source tree:
|
2009-10-14 23:54:31 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
nuttx/
|
|
|
|
|
|
|
|
|
|- arch/
|
|
|
|
| |
|
|
|
|
| |- arm/
|
|
|
|
| | `- src
|
|
|
|
| | |- common
|
|
|
|
| | | `- README_lwl_console.txt
|
|
|
|
| | |- lpc214x
|
|
|
|
| | | `-README.txt
|
|
|
|
| | `- stm32l4
|
|
|
|
| | `- README.txt
|
|
|
|
| |- renesas/
|
|
|
|
| | |- include/
|
|
|
|
| | | `-README.txt
|
|
|
|
| | |- src/
|
|
|
|
| | | `-README.txt
|
|
|
|
| |- x86/
|
|
|
|
| | |- include/
|
|
|
|
| | | `-README.txt
|
|
|
|
| | `- src/
|
|
|
|
| | `-README.txt
|
|
|
|
| `- z80/
|
|
|
|
| | `- src/
|
|
|
|
| | |- z80/README.txt
|
|
|
|
| | `- z180/README.txt, z180_mmu.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- audio/
|
|
|
|
| `-README.txt
|
|
|
|
|- boards/
|
|
|
|
| |- arm/
|
|
|
|
| | |- a1x/
|
|
|
|
| | | `- pcduino-a10/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- am335x/
|
|
|
|
| | | `- beaglebone-black/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- c5471/
|
|
|
|
| | | `- c5471evm/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- cxd56xx/
|
|
|
|
| | | `- spresense/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- dm320/
|
|
|
|
| | | `- ntosd-dm320/
|
|
|
|
| | | |- doc/README.txt
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- efm32/
|
|
|
|
| | | |- efm32-g8xx-stk/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- efm32gg-stk3700/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- olimex-efm32g880f128-stk/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- imx6/
|
|
|
|
| | | `- sabre-6quad/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- imxrt/
|
|
|
|
| | | |- imxrt1050-evk/
|
|
|
|
| | | | `- README.txt
|
2020-12-03 18:37:01 +01:00
|
|
|
| | | |- imxrt1060-evk/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- teensy-4.x/
|
2020-07-28 18:47:30 +02:00
|
|
|
| | | `- README.txt
|
|
|
|
| | |- kinetis/
|
|
|
|
| | | |- freedom-k28f/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- freedom-k64f/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- freedom-k66f/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- kwikstik-k40/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- teensy-3.x/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- twr-k60n512/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- twr-k64f120m/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- kl/
|
|
|
|
| | | |- freedom-kl25z/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- freedom-kl26z/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- teensy-lc/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lc823450/
|
|
|
|
| | | `- lc823450-xgevk/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lpc17xx_40xx/
|
|
|
|
| | | |- lincoln60/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lpc4088-devkit/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lpc4088-quickstart/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lpcxpresso-lpc1768/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lx_cpu/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- mbed/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- mcb1700/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- olimex-lpc1766stk/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- open1788/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- pnev5180b/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- u-blox-c027/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- zkit-arm-1769/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lpc214x/
|
|
|
|
| | | |- mcu123-lpc214x/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- zp214xpa/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lpc2378/
|
|
|
|
| | | `- olimex-lpc2378/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lpc31xx/
|
|
|
|
| | | |- ea3131/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- ea3152/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- olimex-lpc-h3131/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lpc43xx/
|
|
|
|
| | | |- bambino-200e/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lpc4330-xplorer/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lpc4337-ws/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lpc4357-evb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- lpc4370-link2/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- lpc54xx/
|
|
|
|
| | | `- lpcxpresso-lpc54628/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- max326xx/
|
|
|
|
| | | `- max32660-evsys/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- moxart/
|
|
|
|
| | | `- moxa/
|
|
|
|
| | |- nrf52/
|
|
|
|
| | | `- nrf52-generic/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- nuc1xx/
|
|
|
|
| | | `- nutiny-nuc120/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- s32k1xx/
|
|
|
|
| | | |- s32k118evb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- s32k146evb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- s32k148evb/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- sam34/
|
|
|
|
| | | |- arduino-due/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- flipnclick-sam3x/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sam3u-ek/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sam4cmp-db/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sam4e-ek/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sam4l-xplained/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sam4s-xplained/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- sam4s-xplained-pro/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- sama5/
|
|
|
|
| | | |- sama5d2-xult/
|
|
|
|
| | | | `- README.txt
|
2020-09-17 02:16:16 +02:00
|
|
|
| | | |- giant-board/
|
|
|
|
| | | | `- README.md
|
2020-07-28 18:47:30 +02:00
|
|
|
| | | |- sama5d3x-ek/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sama5d3-xplained/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- sama5d4-ek/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- samd2l2/
|
|
|
|
| | | |- arduino-m0/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- samd20-xplained/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- samd21-xplained/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- saml21-xplained/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- samd5e5/
|
|
|
|
| | | `- metro-m4/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- samv7/
|
2021-11-27 15:03:13 +01:00
|
|
|
| | | |- same70-qmtech/
|
|
|
|
| | | | `- README.txt
|
2020-07-28 18:47:30 +02:00
|
|
|
| | | |- same70-xplained/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- samv71-xult/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- stm32/
|
|
|
|
| | | |- axoloti/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- b-g474e-dpow1/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- clicker2-stm32/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- cloudctrl/
|
|
|
|
| | | | `- README.txt
|
2021-06-12 02:43:56 +02:00
|
|
|
| | | |- emw3162/
|
|
|
|
| | | | `- README.txt
|
2020-07-28 18:47:30 +02:00
|
|
|
| | | |- fire-stm32v2/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- hymini-stm32v/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- maple/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- mikroe-stm32f4/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f103rb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f207zg/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f302r8/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f303re/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f303ze/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f334r8/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f410rb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f446re/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f4x1re/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-l152re/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- olimexino-stm32/
|
|
|
|
| | | |- olimex-stm32-e407/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- olimex-stm32-h405/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- olimex-stm32-h407/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- olimex-stm32-p107/
|
|
|
|
| | | |- olimex-stm32-p207/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- olimex-stm32-p407/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- omnibusf4/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- photon/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- shenzhou/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32_tiny/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm3210e-eval/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm3220g-eval/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm3240g-eval/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32butterfly2/
|
|
|
|
| | | |- stm32f103-minimum/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f334-disco/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f3discovery/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f411e-disco/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f429i-disco/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f4discovery/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32ldiscovery/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32vldiscovery/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- viewtool-stm32f107/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- stm32f0l0g0/
|
|
|
|
| | | |- b-l072z-lrwan1/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f072rb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-f091rc/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-g070rb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-g071rb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-l073rz/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f051-discovery/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- stm32f072-discovery/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- stm32f7/
|
|
|
|
| | | |- nucleo-144/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f746g-disco/
|
|
|
|
| | | | |- configs/fb/README.txt
|
|
|
|
| | | | |- configs/nxdemo/README.txt
|
|
|
|
| | | | |- configs/nxterm/README.txt
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32f746-ws/
|
|
|
|
| | | `- stm32f769i-disco/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- stm32h7/
|
|
|
|
| | | `- nucleo-h743zi/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- stm32l4/
|
|
|
|
| | | |- b-l475e-iot01a/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-l432kc/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-l452re/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-l476rg/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- nucleo-l496zg/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32l476-mdk/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- stm32l476vg-disco/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- stm32l4r9ai-disco/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- str71x/
|
|
|
|
| | | `- olimex-strp711/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- tiva/
|
|
|
|
| | | |- dk-tm4c129x/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- eagle100/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- ekk-lm3s9b96/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- launchxl-cc1310/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- launchxl-cc1312r1/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lm3s6432-s2e/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lm3s6965-ek/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lm3s8962-ek/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- lm4f120-launchpad/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- tm4c123g-launchpad/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- tm4c1294-launchpad/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- tms570/
|
|
|
|
| | | |- launchxl-tms57004/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- tms570ls31x-usb-kit/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- xmc4/
|
|
|
|
| | `- xmc4500-relax/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- avr/
|
|
|
|
| | |- at32uc3/
|
|
|
|
| | | `- avr32dev1/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- at90usb/
|
|
|
|
| | | |- micropendous3/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- teensy-2.0/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- atmega/
|
|
|
|
| | |- amber/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- arduino-mega2560/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- moteino-mega/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- hc/
|
|
|
|
| | `- m9s12/
|
|
|
|
| | |- demo9s12ne64/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- ne64badge/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- mips/
|
|
|
|
| | |- pic32mx/
|
|
|
|
| | | |- mirtoo/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- pic32mx7mmb/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- pic32mx-starterkit/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- sure-pic32mx/
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- ubw32/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `-pic32mz/
|
2021-07-31 20:56:49 +02:00
|
|
|
| | |- chipkit-wifire/
|
|
|
|
| | | `- README.txt
|
2020-07-28 18:47:30 +02:00
|
|
|
| | |- flipnclick-pic32mz/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- pic32mz-starterkit/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- misoc/
|
|
|
|
| | `- lm32/
|
|
|
|
| | `- misoc/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- or1k/
|
|
|
|
| | `- mor1kx/
|
|
|
|
| | `- or1k/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- renesas/
|
|
|
|
| | |- m16c/
|
|
|
|
| | | `- skp16c26/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `-sh1/
|
|
|
|
| | `- us7032evb1/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- risc-v/
|
|
|
|
| |- sim/
|
|
|
|
| | `- sim/
|
|
|
|
| | `- sim/
|
|
|
|
| | |- include/README.txt
|
|
|
|
| | `- README.txt
|
|
|
|
| |- x86/
|
|
|
|
| | `- qemu/
|
|
|
|
| | `- qemu-i486/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- xtensa/
|
|
|
|
| | `- esp32/
|
|
|
|
| | `- esp32-core/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- z16/
|
|
|
|
| | `- z16f/
|
|
|
|
| | `- z16f2800100zcog/
|
|
|
|
| | |- configs/nsh/README.txt
|
|
|
|
| | |- configs/ostest/README.txt
|
|
|
|
| | |- configs/pashello/README.txt
|
|
|
|
| | `- README.txt
|
|
|
|
| |- z80/
|
|
|
|
| | |- ez80/
|
|
|
|
| | | |- ez80f910200kitg/
|
|
|
|
| | | | |- configs/ostest/README.txt
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- ez80f910200zco/
|
|
|
|
| | | | |- configs/dhcpd/README.txt
|
|
|
|
| | | | |- configs/httpd/README.txt
|
|
|
|
| | | | |- configs/nettest/README.txt
|
|
|
|
| | | | |- configs/nsh/README.txt
|
|
|
|
| | | | |- configs/poll/README.txt
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | |- makerlisp/
|
|
|
|
| | | | |- configs/nsh_flash/README.txt
|
|
|
|
| | | | |- configs/nsh_ram/README.txt
|
|
|
|
| | | | |- configs/sdboot/README.txt
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- z80x/
|
|
|
|
| | | |- configs/nsh_flash/README.txt
|
|
|
|
| | | |- configs/nsh_ram/README.txt
|
|
|
|
| | | |- configs/sdboot/README.txt
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- z180/
|
|
|
|
| | | `- p112/
|
|
|
|
| | | `- README.txt
|
|
|
|
| | |- z8/
|
|
|
|
| | | |- z8encore000zco/
|
|
|
|
| | | | |- configs/ostest/README.txt
|
|
|
|
| | | | `- README.txt
|
|
|
|
| | | `- z8f64200100kit/
|
|
|
|
| | | |- configs/ostest/README.txt
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- z80/
|
|
|
|
| | `- z80sim/
|
|
|
|
| | `- README.txt
|
|
|
|
| `-README.txt
|
|
|
|
|- drivers/
|
|
|
|
| |- eeprom/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- lcd/
|
|
|
|
| | | README.txt
|
|
|
|
| | `- pcf8574_lcd_backpack_readme.txt
|
|
|
|
| |- mtd/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- sensors/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- syslog/
|
|
|
|
| | `- README.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- fs/
|
|
|
|
| |- binfs/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- cromfs/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- mmap/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- nxffs/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- smartfs/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- procfs/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- spiffs/
|
|
|
|
| | `- README.md
|
|
|
|
| `- unionfs/
|
|
|
|
| `- README.txt
|
|
|
|
|- graphics/
|
|
|
|
| `- README.txt
|
|
|
|
|- libs/
|
|
|
|
| |- README.txt
|
|
|
|
| |- libc/
|
|
|
|
| | |- zoneinfo
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- README.txt
|
|
|
|
| |- libdsp/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- libnx/
|
|
|
|
| | |- nxfongs
|
|
|
|
| | | `- README.txt
|
|
|
|
| | `- README.txt
|
|
|
|
| |- libxx/
|
|
|
|
| `- README.txt
|
|
|
|
|- mm/
|
|
|
|
| |- shm/
|
|
|
|
| | `- README.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- net/
|
|
|
|
| |- sixlowpan
|
|
|
|
| | `- README.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- pass1/
|
|
|
|
| `- README.txt
|
|
|
|
|- syscall/
|
|
|
|
| `- README.txt
|
|
|
|
`- tools/
|
|
|
|
`- README.txt
|
2011-08-27 16:58:42 +02:00
|
|
|
|
2015-06-30 02:19:36 +02:00
|
|
|
Below is a guide to the available README files in the semi-optional apps/
|
|
|
|
source tree:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
apps/
|
|
|
|
|- examples/
|
|
|
|
| |- bastest/README.txt
|
|
|
|
| |- json/README.txt
|
|
|
|
| |- pashello/README.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- gpsutils/
|
|
|
|
| `- minmea/README.txt
|
|
|
|
|- graphics/
|
|
|
|
| |- tiff/README.txt
|
|
|
|
| `- traveler/tools/tcledit/README.txt
|
|
|
|
|- interpreters/
|
|
|
|
| |- bas/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- ficl/
|
|
|
|
| | `- README.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- modbus/
|
|
|
|
| `- README.txt
|
|
|
|
|- netutils/
|
|
|
|
| |- discover/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- ftpc/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- json/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- telnetd/
|
|
|
|
| | `- README.txt
|
|
|
|
| `- README.txt
|
|
|
|
|- nshlib/
|
|
|
|
| `- README.txt
|
|
|
|
|- NxWidgets/
|
|
|
|
| `- README.txt
|
|
|
|
|- system/
|
|
|
|
| |- cdcacm/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- i2c/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- inifile/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- install/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- nsh/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- nxplayer/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- psmq/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- symtab/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- termcurses/
|
|
|
|
| | `- README.txt
|
|
|
|
| |- usbmsc/
|
|
|
|
| | `- README.txt
|
|
|
|
| `- zmodem/
|
|
|
|
| `- README.txt
|
|
|
|
`- wireless
|
|
|
|
|- bluetooth/
|
|
|
|
| `- btsak/
|
|
|
|
| `- README.txt
|
|
|
|
`- ieee802154
|
|
|
|
`- i8sak/
|
|
|
|
`- README.txt
|
2012-11-09 15:54:29 +01:00
|
|
|
|
2015-06-30 02:19:36 +02:00
|
|
|
Additional README.txt files in the other, related repositories:
|
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
NxWidgets/
|
|
|
|
|- Doxygen
|
|
|
|
| `- README.txt
|
|
|
|
|- tools
|
|
|
|
| `- README.txt
|
|
|
|
|- UnitTests
|
|
|
|
| `- README.txt
|
|
|
|
`- README.txt
|
2015-06-30 02:19:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
buildroot/
|
|
|
|
`- README.txt
|
2015-06-30 02:19:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
tools/
|
|
|
|
`- README.txt
|
2015-06-30 02:19:36 +02:00
|
|
|
|
2020-07-28 18:47:30 +02:00
|
|
|
uClibc++/
|
|
|
|
`- README.txt
|