1beacf11bSopenharmony_ci# APACHE NUTTX
2beacf11bSopenharmony_ci
3beacf11bSopenharmony_ci* Introduction
4beacf11bSopenharmony_ci* Community
5beacf11bSopenharmony_ci  - Getting Help
6beacf11bSopenharmony_ci  - Mailing Lists
7beacf11bSopenharmony_ci  - Issue Tracker
8beacf11bSopenharmony_ci  - Source Code
9beacf11bSopenharmony_ci  - Website Source Code
10beacf11bSopenharmony_ci* Environments
11beacf11bSopenharmony_ci  - Installing Cygwin
12beacf11bSopenharmony_ci  - Ubuntu Bash under Windows 10
13beacf11bSopenharmony_ci  - Using macOS
14beacf11bSopenharmony_ci* Installation
15beacf11bSopenharmony_ci  - Download and Unpack
16beacf11bSopenharmony_ci  - Semi-Optional apps/ Package
17beacf11bSopenharmony_ci  - Installation Directories with Spaces in the Path
18beacf11bSopenharmony_ci  - Downloading from Repositories
19beacf11bSopenharmony_ci  - Related Repositories
20beacf11bSopenharmony_ci  - Notes about Header Files
21beacf11bSopenharmony_ci* Configuring NuttX
22beacf11bSopenharmony_ci  - Instantiating "Canned" Configurations
23beacf11bSopenharmony_ci  - Refreshing Configurations
24beacf11bSopenharmony_ci  - NuttX Configuration Tool
25beacf11bSopenharmony_ci  - Finding Selections in the Configuration Menus
26beacf11bSopenharmony_ci  - Reveal Hidden Configuration Options
27beacf11bSopenharmony_ci  - Make Sure that You are on the Right Platform
28beacf11bSopenharmony_ci  - Comparing Two Configurations
29beacf11bSopenharmony_ci  - Making defconfig Files
30beacf11bSopenharmony_ci  - Incompatibilities with Older Configurations
31beacf11bSopenharmony_ci  - NuttX Configuration Tool under DOS
32beacf11bSopenharmony_ci* Toolchains
33beacf11bSopenharmony_ci  - Cross-Development Toolchains
34beacf11bSopenharmony_ci  - NuttX Buildroot Toolchain
35beacf11bSopenharmony_ci* Shells
36beacf11bSopenharmony_ci* Building NuttX
37beacf11bSopenharmony_ci  - Building
38beacf11bSopenharmony_ci  - Re-building
39beacf11bSopenharmony_ci  - Build Targets and Options
40beacf11bSopenharmony_ci  - Native Windows Build
41beacf11bSopenharmony_ci  - Installing GNUWin32
42beacf11bSopenharmony_ci* Cygwin Build Problems
43beacf11bSopenharmony_ci  - Strange Path Problems
44beacf11bSopenharmony_ci  - Window Native Toolchain Issues
45beacf11bSopenharmony_ci* Documentation
46beacf11bSopenharmony_ci
47beacf11bSopenharmony_ci# INTRODUCTION
48beacf11bSopenharmony_ci
49beacf11bSopenharmony_ciApache NuttX is a real-time operating system (RTOS) with an emphasis on
50beacf11bSopenharmony_cistandards compliance and small footprint. Scalable from 8-bit to 64-bit
51beacf11bSopenharmony_cimicrocontroller environments, the primary governing standards in NuttX are
52beacf11bSopenharmony_ciPOSIX and ANSI standards. Additional standard APIs from Unix and other
53beacf11bSopenharmony_cicommon RTOSs (such as VxWorks) are adopted for functionality not available
54beacf11bSopenharmony_ciunder these standards, or for functionality that is not appropriate for
55beacf11bSopenharmony_cideeply-embedded environments (such as fork()).
56beacf11bSopenharmony_ci
57beacf11bSopenharmony_ciExtensive documentation can be found on the project wiki:
58beacf11bSopenharmony_ci  <https://cwiki.apache.org/NUTTX/NuttX>
59beacf11bSopenharmony_ci
60beacf11bSopenharmony_ciFor brevity, many parts of the documentation will refer to Apache NuttX as
61beacf11bSopenharmony_cisimply NuttX.
62beacf11bSopenharmony_ci
63beacf11bSopenharmony_ci# COMMUNITY
64beacf11bSopenharmony_ci
65beacf11bSopenharmony_ciEvery volunteer project obtains its strength from the people involved in
66beacf11bSopenharmony_ciit.  We invite you to participate as much or as little as you choose.
67beacf11bSopenharmony_ci
68beacf11bSopenharmony_ciWe encourage you to:
69beacf11bSopenharmony_ci
70beacf11bSopenharmony_ci  - Use our project and provide feedback.
71beacf11bSopenharmony_ci  - Provide us with use-cases.
72beacf11bSopenharmony_ci  - Report bugs and submit patches.
73beacf11bSopenharmony_ci  - Contribute code or documentation.
74beacf11bSopenharmony_ci
75beacf11bSopenharmony_ci## Getting Help
76beacf11bSopenharmony_ci
77beacf11bSopenharmony_ciThe best place to get help is the developer's mailing list.  Please see
78beacf11bSopenharmony_cithe following section:
79beacf11bSopenharmony_ci
80beacf11bSopenharmony_ci## Mailing Lists
81beacf11bSopenharmony_ci
82beacf11bSopenharmony_ciGet help using NuttX or contribute to the project on our mailing lists:
83beacf11bSopenharmony_ci
84beacf11bSopenharmony_ci  * <dev@nuttx.apache.org> is for people who want to contribute code to NuttX.
85beacf11bSopenharmony_ci    * To subscribe, send an email to <dev-subscribe@nuttx.apache.org>.
86beacf11bSopenharmony_ci    * To unsubscribe, send an email to <dev-unsubscribe@nuttx.apache.org>.
87beacf11bSopenharmony_ci    * View the archives at:
88beacf11bSopenharmony_ci      <https://www.mail-archive.com/dev@nuttx.apache.org/>
89beacf11bSopenharmony_ci
90beacf11bSopenharmony_ci  * <commits@nuttx.apache.org> is a read-only list that notifies subscribers
91beacf11bSopenharmony_ci  about commit messages and patches to NuttX.
92beacf11bSopenharmony_ci    * To subscribe, send an email to <commits-subscribe@nuttx.apache.org>.
93beacf11bSopenharmony_ci    * To unsubscribe, send an email to <commits-unsubscribe@nuttx.apache.org>.
94beacf11bSopenharmony_ci    * View the archives at:
95beacf11bSopenharmony_ci      <https://www.mail-archive.com/commits@nuttx.apache.org/>
96beacf11bSopenharmony_ci
97beacf11bSopenharmony_ci## Reporting Security Issues
98beacf11bSopenharmony_ci
99beacf11bSopenharmony_ciFound a vulnerability? See our security policy [here](.github/SECURITY.md).
100beacf11bSopenharmony_ci
101beacf11bSopenharmony_ci## Issue Tracker
102beacf11bSopenharmony_ci
103beacf11bSopenharmony_ci### Bug Reports:
104beacf11bSopenharmony_ci
105beacf11bSopenharmony_ciFound bug? Send an email to the dev list: <dev@nuttx.apache.org>
106beacf11bSopenharmony_ci
107beacf11bSopenharmony_ciBefore submitting an issue, please:
108beacf11bSopenharmony_ci
109beacf11bSopenharmony_ci  - Verify that the bug does in fact exist.
110beacf11bSopenharmony_ci
111beacf11bSopenharmony_ci  - Search the mailing list archives to verify there is no existing issue
112beacf11bSopenharmony_ci    reporting the bug you've found.
113beacf11bSopenharmony_ci
114beacf11bSopenharmony_ci  - Consider tracking down the bug yourself in the NuttX source code and
115beacf11bSopenharmony_ci    submitting a patch along with your bug report.  This is a great time
116beacf11bSopenharmony_ci    saver for the NuttX developers and helps ensure the bug will be fixed
117beacf11bSopenharmony_ci    quickly.
118beacf11bSopenharmony_ci
119beacf11bSopenharmony_ci### Feature Requests:
120beacf11bSopenharmony_ci
121beacf11bSopenharmony_ciEnhancement requests for new features are also welcome. The more concrete
122beacf11bSopenharmony_ciand rational the request is, the greater the chance it will incorporated
123beacf11bSopenharmony_ciinto future releases.
124beacf11bSopenharmony_ci
125beacf11bSopenharmony_ci## Source Code
126beacf11bSopenharmony_ci
127beacf11bSopenharmony_ciThe project sources are in two Git repositories.  The core OS is in nuttx
128beacf11bSopenharmony_ciand the apps repository is in nuttx-apps.  These are housed in GitBox on
129beacf11bSopenharmony_ciASF servers and also mirrored at GitHub.  These are kept in sync, so you
130beacf11bSopenharmony_cican use whichever option you prefer.
131beacf11bSopenharmony_ci
132beacf11bSopenharmony_ci  - NuttX core OS repository:
133beacf11bSopenharmony_ci
134beacf11bSopenharmony_ci    - Primary:
135beacf11bSopenharmony_ci      <https://gitbox.apache.org/repos/asf?p=nuttx.git>
136beacf11bSopenharmony_ci
137beacf11bSopenharmony_ci    - GitHub Mirror:
138beacf11bSopenharmony_ci      <https://github.com/apache/nuttx>
139beacf11bSopenharmony_ci
140beacf11bSopenharmony_ci  - Apps repository:
141beacf11bSopenharmony_ci
142beacf11bSopenharmony_ci    - Primary:
143beacf11bSopenharmony_ci      <https://gitbox.apache.org/repos/asf?p=nuttx-apps.git>
144beacf11bSopenharmony_ci
145beacf11bSopenharmony_ci    - GitHub Mirror:
146beacf11bSopenharmony_ci      <https://github.com/apache/nuttx-apps>
147beacf11bSopenharmony_ci
148beacf11bSopenharmony_ci## Website Source Code
149beacf11bSopenharmony_ci
150beacf11bSopenharmony_ciThe project website sources are accessible via the website source code
151beacf11bSopenharmony_ci  repository which is also mirrored in GitHub:
152beacf11bSopenharmony_ci
153beacf11bSopenharmony_ci- Primary:
154beacf11bSopenharmony_ci  <https://gitbox.apache.org/repos/asf?p=nuttx-website.git>
155beacf11bSopenharmony_ci
156beacf11bSopenharmony_ci- GitHub Mirror:
157beacf11bSopenharmony_ci  <https://github.com/apache/nuttx-website>
158beacf11bSopenharmony_ci
159beacf11bSopenharmony_ci# ENVIRONMENTS
160beacf11bSopenharmony_ci
161beacf11bSopenharmony_ci  NuttX requires a POSIX development environment such as you would find under
162beacf11bSopenharmony_ci  Linux or macOS.  NuttX may also be installed and built on Windows system
163beacf11bSopenharmony_ci  if you also provide such a POSIX development environment.  Options for a
164beacf11bSopenharmony_ci  POSIX development environment under Windows include:
165beacf11bSopenharmony_ci
166beacf11bSopenharmony_ci  - An installation of Linux on a virtual machine (VM) in Windows.  I have
167beacf11bSopenharmony_ci    not been happy using a VM myself.  I have had stability problems with
168beacf11bSopenharmony_ci    open source VMs and commercial VMs cost more than I want to spend.
169beacf11bSopenharmony_ci    Sharing files with Linux running in a VM is awkward;  sharing devices
170beacf11bSopenharmony_ci    connected to the Windows box with Linux in a VM is, at the very least,
171beacf11bSopenharmony_ci    confusing;  Using Windows tools (such as Segger J-Link) with files
172beacf11bSopenharmony_ci    built under the Linux VM is not a possibility.
173beacf11bSopenharmony_ci
174beacf11bSopenharmony_ci  - The Cygwin environment.  Instructions for installation of Cygwin on a
175beacf11bSopenharmony_ci    Windows system are provided in the following paragraph, "Installing
176beacf11bSopenharmony_ci    Cygwin".  Cygwin is a mature, well-tested, and very convenient
177beacf11bSopenharmony_ci    environment.  It is especially convenient if you  need to
178beacf11bSopenharmony_ci    integrate with Windows tools and files.  Downsides are that the
179beacf11bSopenharmony_ci    installation time is very long and the compile times are slow.
180beacf11bSopenharmony_ci
181beacf11bSopenharmony_ci  - Ubuntu/Bash shell under Windows 10.  This is a new option under
182beacf11bSopenharmony_ci    Windows 10.  See the section "Ubuntu Bash under Windows 10" below.
183beacf11bSopenharmony_ci    This is an improvement over Cygwin if your concern is compile time;
184beacf11bSopenharmony_ci    its build performance is comparable to native Linux, certainly better
185beacf11bSopenharmony_ci    than the Cygwin build time.  It also installs in a tiny fraction of
186beacf11bSopenharmony_ci    the time as Cygwin, perhaps 20 minutes for the basic Ubuntu install
187beacf11bSopenharmony_ci    (vs. more than a day for the complete Cygwin install).
188beacf11bSopenharmony_ci
189beacf11bSopenharmony_ci    There have been even more recent ports of Linux environment to
190beacf11bSopenharmony_ci    Windows.  I need to update this section to include some mention of
191beacf11bSopenharmony_ci    these alternatives.
192beacf11bSopenharmony_ci
193beacf11bSopenharmony_ci  - The MSYS environment.  MSYS derives from an older version of Cygwin
194beacf11bSopenharmony_ci    simplified and adapted to work more naturally in the Windows
195beacf11bSopenharmony_ci    environment.  See <http://www.mingw.org/wiki/MSYS> if you are
196beacf11bSopenharmony_ci    interested in using MSYS.  The advantages of the MSYS environment is
197beacf11bSopenharmony_ci    that it is better integrted with the native Windows environment and
198beacf11bSopenharmony_ci    lighter weight; it uses only a  minimal number of add-on POSIX-land
199beacf11bSopenharmony_ci    tools.
200beacf11bSopenharmony_ci
201beacf11bSopenharmony_ci    The download link in that Wiki takes you to the SourceForge download
202beacf11bSopenharmony_ci    site.  The SourceForge MSYS project has been stagnant for some time.
203beacf11bSopenharmony_ci    The MSYS project has more recently moved to
204beacf11bSopenharmony_ci    <http://odsn.net/projects/sfnet_mingwbundle>.  Downloads of current .zip
205beacf11bSopenharmony_ci    files are available there but no instructions for the installation.
206beacf11bSopenharmony_ci
207beacf11bSopenharmony_ci  - MSYS2 appears to be a re-write of MSYS based on a newer version of
208beacf11bSopenharmony_ci    Cygwin.  Is it available at <https://www.msys2.org>.  A windows
209beacf11bSopenharmony_ci    installer is available at that site along with very good installation
210beacf11bSopenharmony_ci    instructions.  The download is relatively quick (at least compared to
211beacf11bSopenharmony_ci    Cygwin) and the 'pacman' package management tool supports supports
212beacf11bSopenharmony_ci    simple system updates.  For example, 'pacman -S git' will install the
213beacf11bSopenharmony_ci    GIT command line utilities.
214beacf11bSopenharmony_ci
215beacf11bSopenharmony_ci  - Other POSIX environments.  Check out:
216beacf11bSopenharmony_ci
217beacf11bSopenharmony_ci    - UnxUtils: <https://sourceforge.net/projects/unxutils/>,
218beacf11bSopenharmony_ci      <https://en.wikipedia.org/wiki/UnxUtils>
219beacf11bSopenharmony_ci    - MobaXterm: <https://mobaxterm.mobatek.net/>
220beacf11bSopenharmony_ci    - Gow: <https://github.com/bmatzelle/gow/wiki>
221beacf11bSopenharmony_ci
222beacf11bSopenharmony_ci    **Disclaimer**:  In principle, these should work.  However, I have never
223beacf11bSopenharmony_ci    used any of these environments and cannot guarantee that there is
224beacf11bSopenharmony_ci    not some less-than-obvious issues.
225beacf11bSopenharmony_ci
226beacf11bSopenharmony_ciNuttX can also be installed and built on a native Windows system, but with
227beacf11bSopenharmony_cisome potential tool-related issues (see the discussion "Native Windows
228beacf11bSopenharmony_ciBuild" under "Building NuttX" below).  GNUWin32 is used to provide
229beacf11bSopenharmony_cicompatible native windows tools.
230beacf11bSopenharmony_ci
231beacf11bSopenharmony_ci## Installing Cygwin
232beacf11bSopenharmony_ci
233beacf11bSopenharmony_ciInstalling Cygwin on your Windows PC is simple, but time consuming.  See
234beacf11bSopenharmony_ci<http://www.cygwin.com/> for installation instructions. Basically you just
235beacf11bSopenharmony_cineed to download a tiny setup.exe program and it does the real, network
236beacf11bSopenharmony_ciinstallation for you.
237beacf11bSopenharmony_ci
238beacf11bSopenharmony_ciSome Cygwin installation tips:
239beacf11bSopenharmony_ci
240beacf11bSopenharmony_ci  1. Install at `C:\cygwin`
241beacf11bSopenharmony_ci
242beacf11bSopenharmony_ci  2. Install **everything**:  "Only the minimal base packages from the
243beacf11bSopenharmony_ci     Cygwin distribution are installed by default. Clicking on categories
244beacf11bSopenharmony_ci     and packages in the setup.exe package installation screen will
245beacf11bSopenharmony_ci     provide you with the ability to control what is installed or updated.
246beacf11bSopenharmony_ci     Clicking on the "Default" field next to the "All" category will
247beacf11bSopenharmony_ci     provide you with the opportunity to install every Cygwin package.
248beacf11bSopenharmony_ci     Be advised that this will download and install hundreds of megabytes
249beacf11bSopenharmony_ci     to your computer."
250beacf11bSopenharmony_ci
251beacf11bSopenharmony_ciIf you use the "default" installation, you will be missing many
252beacf11bSopenharmony_ciof the Cygwin utilities that you will need to build NuttX.  The
253beacf11bSopenharmony_cibuild will fail in numerous places because of missing packages.
254beacf11bSopenharmony_ci
255beacf11bSopenharmony_ciNOTE: The last time I installed **everything**, the download was
256beacf11bSopenharmony_ciabout 5GiB.  The server I selected was also very slow so it took
257beacf11bSopenharmony_ciover a day to do the whole install!
258beacf11bSopenharmony_ci
259beacf11bSopenharmony_ciNOTE: You don't really have to install **everything** but I cannot
260beacf11bSopenharmony_cianswer the question "Then what should I install?"  I don't know
261beacf11bSopenharmony_cithe answer to that and so will continue to recommend installing
262beacf11bSopenharmony_ci**everything**.
263beacf11bSopenharmony_ci
264beacf11bSopenharmony_ciYou should certainly be able to omit "Science", "Math", and
265beacf11bSopenharmony_ci"Publishing".  You can try omitting KDE, Gnome, GTK, and other
266beacf11bSopenharmony_cigraphics packages if you don't plan to use them.
267beacf11bSopenharmony_ci
268beacf11bSopenharmony_ciPerhaps a minimum set would be those packages listed below for the
269beacf11bSopenharmony_ci"Ubuntu Bash under Windows 10" installation?
270beacf11bSopenharmony_ci
271beacf11bSopenharmony_ci**UPDATE**:  Sergey Frolov had success with the following minimal
272beacf11bSopenharmony_ciCygwin configuration:
273beacf11bSopenharmony_ci
274beacf11bSopenharmony_ci   1. After starting the Cygwin installer, keep the recommended
275beacf11bSopenharmony_ci      packages that are pre-selected in the default configuration.
276beacf11bSopenharmony_ci
277beacf11bSopenharmony_ci   2. Using the installation tools, add the following packages:
278beacf11bSopenharmony_ci
279beacf11bSopenharmony_ci          make (GNU make)  bison        libgmp3-dev
280beacf11bSopenharmony_ci          gcc-core         byacc        libmpfr-dev
281beacf11bSopenharmony_ci          gcc-g++          gperf        libmpc-dev
282beacf11bSopenharmony_ci          flex             gdb          automake-1.15
283beacf11bSopenharmony_ci          libncurses-dev   libgmp-dev   curl
284beacf11bSopenharmony_ci
285beacf11bSopenharmony_ciAfter installing Cygwin, you will get lots of links for installed
286beacf11bSopenharmony_citools and shells.  I use the RXVT native shell.  It is fast and reliable
287beacf11bSopenharmony_ciand does not require you to run the Cygwin X server (which is neither
288beacf11bSopenharmony_cifast nor reliable).  Unless otherwise noted, the rest of these
289beacf11bSopenharmony_ciinstructions assume that you are at a bash command line prompt in
290beacf11bSopenharmony_cieither Linux or in Cygwin shell.
291beacf11bSopenharmony_ci
292beacf11bSopenharmony_ci## Using MSYS
293beacf11bSopenharmony_ci
294beacf11bSopenharmony_ciMSYS is an environment the derives from Cygwin.  Thus, most things said
295beacf11bSopenharmony_ciabout Cygwin apply equally to MSYS.  This section will, then, focus on
296beacf11bSopenharmony_cithe differences when using MSYS, specifically MSYS2.
297beacf11bSopenharmony_ci
298beacf11bSopenharmony_ciHere is it assumed that you have already downloaded and installed MSYS2
299beacf11bSopenharmony_cifrom https://www.msys2.org using the windows installer available at that
300beacf11bSopenharmony_cilocation.  It is also assumed that you have brought in the necessary
301beacf11bSopenharmony_citools using the 'pacman' package management tool Tools needed including:
302beacf11bSopenharmony_ci
303beacf11bSopenharmony_ci    pacman -S git
304beacf11bSopenharmony_ci    pacman -S make
305beacf11bSopenharmony_ci    pacman -S gcc
306beacf11bSopenharmony_ci    pacman -S gdb
307beacf11bSopenharmony_ci
308beacf11bSopenharmony_ciAnd possibly others depending upon your usage.  Then you will need to
309beacf11bSopenharmony_cibuild and install kconfig-frontends per the instructions of the top-level
310beacf11bSopenharmony_ciREADME.txt file in the tools repository.  This requires the following
311beacf11bSopenharmony_ciadditional tools:
312beacf11bSopenharmony_ci
313beacf11bSopenharmony_ci    pacman -S bison
314beacf11bSopenharmony_ci    pacman -S curl
315beacf11bSopenharmony_ci    pacman -S gperf
316beacf11bSopenharmony_ci    pacman -S ncurses-devel
317beacf11bSopenharmony_ci    pacman -S automake-wrapper
318beacf11bSopenharmony_ci    pacman -S autoconf
319beacf11bSopenharmony_ci    pacman -S pkg-config
320beacf11bSopenharmony_ci
321beacf11bSopenharmony_ciBecause of some versioning issues, I had to run 'aclocal' prior to
322beacf11bSopenharmony_cirunning the kconfig-frontends configure script.  See "Configuring NuttX"
323beacf11bSopenharmony_cibelow for further information.
324beacf11bSopenharmony_ci
325beacf11bSopenharmony_ciUnlike Cygwin, MSYS does not support symbolic links.  The 'ln -s' command
326beacf11bSopenharmony_ciwill, in fact, copy a directory!  This means that you Make.defs file will
327beacf11bSopenharmony_cihave to include definitions like:
328beacf11bSopenharmony_ci
329beacf11bSopenharmony_ci    ifeq ($(CONFIG_WINDOWS_MSYS),y)
330beacf11bSopenharmony_ci      DIRLINK = $(TOPDIR)/tools/copydir.sh
331beacf11bSopenharmony_ci      DIRUNLINK = $(TOPDIR)/tools/unlink.sh
332beacf11bSopenharmony_ci    endif
333beacf11bSopenharmony_ci
334beacf11bSopenharmony_ciThis will force the directory copies to work in a way that can be handled
335beacf11bSopenharmony_ciby the NuttX build system.  NOTE:  The default link.sh script has been
336beacf11bSopenharmony_ciupdated so that is should now be MSYS2 compatible.  The above is preferred
337beacf11bSopenharmony_cibut no longer necessary in the Make.defs file.
338beacf11bSopenharmony_ci
339beacf11bSopenharmony_ciTo build the simulator under MSYS, you also need:
340beacf11bSopenharmony_ci
341beacf11bSopenharmony_ci    pacman -S zlib-devel
342beacf11bSopenharmony_ci
343beacf11bSopenharmony_ciIt appears that you cannot use directory names with spaces in them like
344beacf11bSopenharmony_ci"/c/Program\ Files \(86\)" in the MSYS path variable.  I worked around this
345beacf11bSopenharmony_ciby create Windows junctions like this:
346beacf11bSopenharmony_ci
347beacf11bSopenharmony_ci  1. Open the a windows command terminal,
348beacf11bSopenharmony_ci
349beacf11bSopenharmony_ci  2. cd to `c:\msys64`, then
350beacf11bSopenharmony_ci
351beacf11bSopenharmony_ci  3. `mklink /j programfiles "C:/Program\ Files"` and
352beacf11bSopenharmony_ci
353beacf11bSopenharmony_ci  4. `mklink /j programfiles86 "C:/Program\ Files\ \(x86\)"`
354beacf11bSopenharmony_ci
355beacf11bSopenharmony_ci     They then show up as `/programfiles` and `/programfiles86` with the MSYS2
356beacf11bSopenharmony_ci     sandbox.  Those paths can then be used with the PATH variable.  I had
357beacf11bSopenharmony_ci     to do something similar for the path to the GNU Tools "ARM Embedded
358beacf11bSopenharmony_ci     Toolchain" which also has spaces in the path name.
359beacf11bSopenharmony_ci
360beacf11bSopenharmony_ci## Ubuntu Bash under Windows 10
361beacf11bSopenharmony_ci
362beacf11bSopenharmony_ciA better version of a command-line only Ubuntu under Windows 10 (beta)
363beacf11bSopenharmony_cihas recently been made available from Microsoft.
364beacf11bSopenharmony_ci
365beacf11bSopenharmony_ci### Installation
366beacf11bSopenharmony_ci
367beacf11bSopenharmony_ciInstallation instructions abound on the Internet complete with screen
368beacf11bSopenharmony_cishots.  I will attempt to duplicate those instructions in full here.
369beacf11bSopenharmony_ciHere are the simplified installation steps:
370beacf11bSopenharmony_ci
371beacf11bSopenharmony_ci  - Open *Settings*.
372beacf11bSopenharmony_ci
373beacf11bSopenharmony_ci  - Click on *Update & security*.
374beacf11bSopenharmony_ci
375beacf11bSopenharmony_ci  - Click on *For Developers*.
376beacf11bSopenharmony_ci
377beacf11bSopenharmony_ci  - Under *Use developer features*, select the *Developer mode* option to
378beacf11bSopenharmony_ci    setup the environment to install Bash.
379beacf11bSopenharmony_ci
380beacf11bSopenharmony_ci  - A message box should pop up.  Click *Yes* to turn on developer mode.
381beacf11bSopenharmony_ci
382beacf11bSopenharmony_ci  - After the necessary components install, you'll need to restart your
383beacf11bSopenharmony_ci    computer.
384beacf11bSopenharmony_ci
385beacf11bSopenharmony_ci    Once your computer reboots:
386beacf11bSopenharmony_ci
387beacf11bSopenharmony_ci  - Open *Control Panel*.
388beacf11bSopenharmony_ci
389beacf11bSopenharmony_ci  - Click on *Programs*.
390beacf11bSopenharmony_ci
391beacf11bSopenharmony_ci  - Click on *Turn Windows features on or off*.
392beacf11bSopenharmony_ci
393beacf11bSopenharmony_ci  - A list of features will pop up, check the *Windows Subsystem for Linux
394beacf11bSopenharmony_ci    (beta)* option.
395beacf11bSopenharmony_ci
396beacf11bSopenharmony_ci  - Click *OK*.
397beacf11bSopenharmony_ci
398beacf11bSopenharmony_ci  - Once the components installed on your computer, click the *Restart
399beacf11bSopenharmony_ci    now* button to complete the task.
400beacf11bSopenharmony_ci
401beacf11bSopenharmony_ci    After your computer restarts, you will notice that Bash will not appear in
402beacf11bSopenharmony_ci    the *Recently added* list of apps, this is because Bash isn't actually
403beacf11bSopenharmony_ci    installed yet. Now that you have setup the necessary components, use the
404beacf11bSopenharmony_ci    following steps to complete the installation of Bash:
405beacf11bSopenharmony_ci
406beacf11bSopenharmony_ci  - Open *Start*, do a search for `bash.exe`, and press *Enter*.
407beacf11bSopenharmony_ci
408beacf11bSopenharmony_ci  - On the command prompt, type `y` and press Enter to download and install
409beacf11bSopenharmony_ci    Bash from the Windows Store.  This will take awhile.
410beacf11bSopenharmony_ci
411beacf11bSopenharmony_ci  - Then you'll need to create a default UNIX user account. This account
412beacf11bSopenharmony_ci    doesn't have to be the same as your Windows account. Enter the
413beacf11bSopenharmony_ci    username in the required field and press Enter (you can't use the
414beacf11bSopenharmony_ci    username `admin`).
415beacf11bSopenharmony_ci
416beacf11bSopenharmony_ci  - Close the `bash.exe` command prompt.
417beacf11bSopenharmony_ci
418beacf11bSopenharmony_ci  Now that you completed the installation and setup, you can open the Bash
419beacf11bSopenharmony_ci  tool from the Start menu like you would with any other app.
420beacf11bSopenharmony_ci
421beacf11bSopenharmony_ci### Accessing Windows Files from Ubuntu
422beacf11bSopenharmony_ci
423beacf11bSopenharmony_ciFile systems will be mounted under `/mnt` so for example `C:\Program Files`
424beacf11bSopenharmony_ciappears at `/mnt/c/Program Files`.  This is as opposed to Cygwin where
425beacf11bSopenharmony_cithe same directory would appear at `/cygdrive/c/Program Files`.
426beacf11bSopenharmony_ci
427beacf11bSopenharmony_ciWith these differences (perhaps a few other Windows quirks) the Ubuntu
428beacf11bSopenharmony_ciinstall works just like Ubuntu running natively on your PC.
429beacf11bSopenharmony_ci
430beacf11bSopenharmony_ciA good tip for file sharing is to use symbolic links within your Ubuntu
431beacf11bSopenharmony_cihome directory.  For example, suppose you have your `projects` directory
432beacf11bSopenharmony_ciat `C:\Documents\projects`.  Then you can set up a link to the `projects/`
433beacf11bSopenharmony_cidirectory in your Ubuntu directory like:
434beacf11bSopenharmony_ci
435beacf11bSopenharmony_ci    ln -s /mnt/c/Documents/projects projects
436beacf11bSopenharmony_ci
437beacf11bSopenharmony_ci### Accessing Ubuntu Files From Windows
438beacf11bSopenharmony_ci
439beacf11bSopenharmony_ciIn Ubuntu Userspace for Windows, the Ubuntu file system root directory is
440beacf11bSopenharmony_ciat:
441beacf11bSopenharmony_ci
442beacf11bSopenharmony_ci    %localappdata%\lxss\rootfs
443beacf11bSopenharmony_ci
444beacf11bSopenharmony_ciOr
445beacf11bSopenharmony_ci
446beacf11bSopenharmony_ci    C:\Users\Username\AppData\Local\lxss\rootfs
447beacf11bSopenharmony_ci
448beacf11bSopenharmony_ciHowever, I am unable to see my files under the rootfs\home directory.
449beacf11bSopenharmony_ciAfter some looking around, I find the home directory
450beacf11bSopenharmony_ci`%localappdata%\lxss\home`.
451beacf11bSopenharmony_ci
452beacf11bSopenharmony_ciWith that trick access to the `/home` directory, you should actually be
453beacf11bSopenharmony_ciable to use Windows tools outside of the Ubuntu sandbox with versions of
454beacf11bSopenharmony_ciNuttX built within the sandbox using that path.
455beacf11bSopenharmony_ci
456beacf11bSopenharmony_ci### Executing Windows Tools from Ubuntu
457beacf11bSopenharmony_ci
458beacf11bSopenharmony_ciYou can also execute Windows tools from within the Ubuntu sandbox:
459beacf11bSopenharmony_ci
460beacf11bSopenharmony_ci    /mnt/c/Program\ Files\ \(x86\)/Microchip/xc32/v1.43/bin/xc32-gcc.exe --version
461beacf11bSopenharmony_ci    Unable to translate current working directory. Using C:\WINDOWS\System32
462beacf11bSopenharmony_ci    xc32-gcc.exe (Microchip Technology) 4.8.3 MPLAB XC32 Compiler v1.43 Build date: Mar  1 2017
463beacf11bSopenharmony_ci    ...
464beacf11bSopenharmony_ci
465beacf11bSopenharmony_ciThe error message indicates that there are more issues:  You cannot mix
466beacf11bSopenharmony_ciWindows tools that use Windows style paths in an environment that uses
467beacf11bSopenharmony_ciPOSIX paths.  I think you would have to use Linux tools only from within
468beacf11bSopenharmony_cithe Ubuntu sandbox.
469beacf11bSopenharmony_ci
470beacf11bSopenharmony_ci### Install Ubuntu Software
471beacf11bSopenharmony_ci
472beacf11bSopenharmony_ciUse `sudo apt-get install <package name>`.  As examples, this is how
473beacf11bSopenharmony_ciyou would get GIT:
474beacf11bSopenharmony_ci
475beacf11bSopenharmony_ci    sudo apt-get install git
476beacf11bSopenharmony_ci
477beacf11bSopenharmony_ciThis will get you a compiler for your host PC:
478beacf11bSopenharmony_ci
479beacf11bSopenharmony_ci    sudo apt-get install gcc
480beacf11bSopenharmony_ci
481beacf11bSopenharmony_ciThis will get you an ARM compiler for your target:
482beacf11bSopenharmony_ci
483beacf11bSopenharmony_ci    sudo apt-get install gcc-arm-none-eabi
484beacf11bSopenharmony_ci
485beacf11bSopenharmony_ci**NOTE**: That is just an example.  I am not sure if apt-get will give you a
486beacf11bSopenharmony_cicurrent or usable compiler.  You should carefully select your toolchain
487beacf11bSopenharmony_cifor the needs of your project.
488beacf11bSopenharmony_ci
489beacf11bSopenharmony_ciYou will also need to get the kconfig-frontends configuration as
490beacf11bSopenharmony_cidescribed below under *NuttX Configuration Tool*.  In order to build the
491beacf11bSopenharmony_cikconfig-frontends configuration tool you will also need: `make`, `gperf`,
492beacf11bSopenharmony_ci`flex`, `bison`, and `libncurses-dev`.
493beacf11bSopenharmony_ci
494beacf11bSopenharmony_ciThat is enough to do a basic NuttX build.
495beacf11bSopenharmony_ci
496beacf11bSopenharmony_ci### Integrating with Windows Tools
497beacf11bSopenharmony_ci
498beacf11bSopenharmony_ciIf you want to integrate with Windows native tools, then you would need
499beacf11bSopenharmony_cideal with the same kind of craziness as with integrating Cygwin with
500beacf11bSopenharmony_cinative toolchains, see the section *Cygwin Build Problems* below.
501beacf11bSopenharmony_ci
502beacf11bSopenharmony_ciHowever, there is currently no build support for using Windows native
503beacf11bSopenharmony_citools with Ubuntu under Windows.  This tool combination is made to work
504beacf11bSopenharmony_ciwith Cygwin through the use of the `cygpath -w` tool that converts paths
505beacf11bSopenharmony_cifrom say `/cydrive/c/Program Files` to `C:\Program Files`.  There is,
506beacf11bSopenharmony_cihowever, no corresponding tool to convert `/mnt/c/Program Files` in the
507beacf11bSopenharmony_ciUbuntu environment.
508beacf11bSopenharmony_ci
509beacf11bSopenharmony_ci### Graphics Support
510beacf11bSopenharmony_ci
511beacf11bSopenharmony_ciThe Ubuntu version support by Microsoft is a command-line only version.
512beacf11bSopenharmony_ciThere is no support for Linux graphics utilities.
513beacf11bSopenharmony_ci
514beacf11bSopenharmony_ciThis limitation is not a limitation of Ubuntu, however, only in what
515beacf11bSopenharmony_ciMicrosoft is willing to support.  If you install a X-Server, then you
516beacf11bSopenharmony_cican also use basic graphics utilities.  See for example:
517beacf11bSopenharmony_ci
518beacf11bSopenharmony_ci  <http://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/>
519beacf11bSopenharmony_ci
520beacf11bSopenharmony_ciMany Linux graphics programs would, however, also require a graphics
521beacf11bSopenharmony_ciframework like GTK or Qt.  So this might be a trip down the rabbit hole.
522beacf11bSopenharmony_ci
523beacf11bSopenharmony_ci### Using macOS
524beacf11bSopenharmony_ci
525beacf11bSopenharmony_ciYou need to install at least the following tools specific to macOS
526beacf11bSopenharmony_ciif you want to build the sim:
527beacf11bSopenharmony_ci
528beacf11bSopenharmony_ci  * Xcode (the native compiler and the rest of the toolchain)
529beacf11bSopenharmony_ci
530beacf11bSopenharmony_ci  * ELF toolchain (if you want to build modules for CONFIG_LIBC_MODLIB)
531beacf11bSopenharmony_ci
532beacf11bSopenharmony_ci    brew install x86_64-elf-gcc
533beacf11bSopenharmony_ci
534beacf11bSopenharmony_ci# INSTALLATION
535beacf11bSopenharmony_ci
536beacf11bSopenharmony_ciThere are two ways to get NuttX:  You may download released, stable
537beacf11bSopenharmony_citarballs from either the project website.  Or you may get NuttX by
538beacf11bSopenharmony_cicloning the GIT repositories.  Let's consider the released tarballs
539beacf11bSopenharmony_cifirst:
540beacf11bSopenharmony_ci
541beacf11bSopenharmony_ci## Download and Unpack
542beacf11bSopenharmony_ci
543beacf11bSopenharmony_ciDownload and unpack the NuttX tarball.  If you are reading this, then
544beacf11bSopenharmony_ciyou have probably already done that.  After unpacking, you will end
545beacf11bSopenharmony_ciup with a directory called nuttx-version (where version is the NuttX
546beacf11bSopenharmony_civersion number). You might want to rename that directory nuttx to
547beacf11bSopenharmony_cimatch the various instructions in the documentation and some scripts
548beacf11bSopenharmony_ciin the source tree.
549beacf11bSopenharmony_ci
550beacf11bSopenharmony_ci  * Download location:
551beacf11bSopenharmony_ci
552beacf11bSopenharmony_ci    <https://nuttx.apache.org/download/>
553beacf11bSopenharmony_ci
554beacf11bSopenharmony_ci  * Legacy download locations:
555beacf11bSopenharmony_ci
556beacf11bSopenharmony_ci    <https://bitbucket.org/nuttx/nuttx/downloads>
557beacf11bSopenharmony_ci    <https://sourceforge.net/projects/nuttx/files/nuttx/>
558beacf11bSopenharmony_ci
559beacf11bSopenharmony_ci## Semi-Optional apps/ Package
560beacf11bSopenharmony_ci
561beacf11bSopenharmony_ciAll NuttX libraries and example code used to be in included within
562beacf11bSopenharmony_cithe NuttX source tree.  As of NuttX-6.0, this application code was
563beacf11bSopenharmony_cimoved into a separate tarball, the apps tarball.  If you are just
564beacf11bSopenharmony_cibeginning with NuttX, then you will want to download the versioned
565beacf11bSopenharmony_ciapps tarball along with the NuttX tarball.  If you already have your
566beacf11bSopenharmony_ciown product application directory, then you may not need the apps
567beacf11bSopenharmony_citarball.
568beacf11bSopenharmony_ci
569beacf11bSopenharmony_ciIt is called "Semi-optional" because if you don't have some `apps/`
570beacf11bSopenharmony_cidirectory, NuttX will *fail* to build! You do not necessarily need
571beacf11bSopenharmony_cito use the NuttX apps tarball but may, instead, provide your own
572beacf11bSopenharmony_cicustom application directory.  Such a custom directory would need
573beacf11bSopenharmony_cito include a valid Makefile to support the build and a valid Kconfig
574beacf11bSopenharmony_cifile to support the configuration.  More about these files later.
575beacf11bSopenharmony_ci
576beacf11bSopenharmony_ciDownload then unpack the apps tarball in the same directory where you
577beacf11bSopenharmony_ciunpacked the NuttX tarball.  After you unpack the apps tarball, you
578beacf11bSopenharmony_ciwill have a new directory called apps-version (where the version
579beacf11bSopenharmony_cishould exactly match the version of the NuttX tarball).  Again, you
580beacf11bSopenharmony_cimight want to rename the directory to simply apps/ to match what
581beacf11bSopenharmony_ciyou read in the documentation
582beacf11bSopenharmony_ci
583beacf11bSopenharmony_ciAfter unpacking (and renaming) the apps tarball, you will have two
584beacf11bSopenharmony_cidirectories side by side like this:
585beacf11bSopenharmony_ci
586beacf11bSopenharmony_ci             |
587beacf11bSopenharmony_ci        +----+----+
588beacf11bSopenharmony_ci        |         |
589beacf11bSopenharmony_ci      nuttx/     apps/
590beacf11bSopenharmony_ci
591beacf11bSopenharmony_ciThis is important because the NuttX build will expect to find the
592beacf11bSopenharmony_ciapps directory in that (default) location.  That default location
593beacf11bSopenharmony_cican be changed by modifying your NuttX configuration file, but that
594beacf11bSopenharmony_ciis another story.
595beacf11bSopenharmony_ci
596beacf11bSopenharmony_ci## Installation Directories with Spaces in the Path
597beacf11bSopenharmony_ci
598beacf11bSopenharmony_ciThe nuttx build directory should reside in a path that contains no
599beacf11bSopenharmony_cispaces in any higher level directory name.  For example, under
600beacf11bSopenharmony_ciCygwin, your home directory might be formed from your first and last
601beacf11bSopenharmony_cinames like: `/home/First Last`. That will cause strange errors when
602beacf11bSopenharmony_cithe make system tries to build.
603beacf11bSopenharmony_ci
604beacf11bSopenharmony_ci[Actually, that problem is probably not too difficult to fix.  Some
605beacf11bSopenharmony_ci Makefiles probably just need some paths within double quotes]
606beacf11bSopenharmony_ci
607beacf11bSopenharmony_ciI work around spaces in the home directory name, by creating a
608beacf11bSopenharmony_cinew directory that does not contain any spaces, such as `/home/nuttx`.
609beacf11bSopenharmony_ciThen I install NuttX in `/home/nuttx` and always build from
610beacf11bSopenharmony_ci`/home/nuttx/nuttx-code`.
611beacf11bSopenharmony_ci
612beacf11bSopenharmony_ci## Downloading from Repositories
613beacf11bSopenharmony_ci
614beacf11bSopenharmony_ci### Cloning the Repository
615beacf11bSopenharmony_ci
616beacf11bSopenharmony_ci**BEFORE** cloning repositories on any Windows platform do the following GIT
617beacf11bSopenharmony_cicommand:
618beacf11bSopenharmony_ci
619beacf11bSopenharmony_ci    git config --global core.autocrlf false
620beacf11bSopenharmony_ci
621beacf11bSopenharmony_ciThat will avoid conversions of linefeeds (newlines, \n) to carriage
622beacf11bSopenharmony_cireturn plus linefeed sequences (\r\n)
623beacf11bSopenharmony_ci
624beacf11bSopenharmony_ciThe current NuttX du jour is available in from a GIT repository.  Here are
625beacf11bSopenharmony_ciinstructions for cloning the core NuttX RTOS (corresponding to the nuttx
626beacf11bSopenharmony_citarball discussed above):
627beacf11bSopenharmony_ci
628beacf11bSopenharmony_ci    git clone https://gitbox.apache.org/repos/asf/nuttx.git nuttx
629beacf11bSopenharmony_ci
630beacf11bSopenharmony_ci-or-
631beacf11bSopenharmony_ci
632beacf11bSopenharmony_ci    git clone https://github.com/apache/nuttx.git nuttx
633beacf11bSopenharmony_ci
634beacf11bSopenharmony_ciAnd the semi-optional apps/ application directory and be cloned like:
635beacf11bSopenharmony_ci
636beacf11bSopenharmony_ci    git clone https://gitbox.apache.org/repos/asf/nuttx-apps.git apps
637beacf11bSopenharmony_ci
638beacf11bSopenharmony_ci-or-
639beacf11bSopenharmony_ci
640beacf11bSopenharmony_ci    git clone https://github.com/apache/nuttx-apps.git apps
641beacf11bSopenharmony_ci
642beacf11bSopenharmony_ciThat will give you the same directory structure like this:
643beacf11bSopenharmony_ci
644beacf11bSopenharmony_ci             |
645beacf11bSopenharmony_ci        +----+----+
646beacf11bSopenharmony_ci        |         |
647beacf11bSopenharmony_ci      nuttx/     apps/
648beacf11bSopenharmony_ci
649beacf11bSopenharmony_ci### Configuring the Clones
650beacf11bSopenharmony_ci
651beacf11bSopenharmony_ciThe following steps need to be performed for each of the repositories.
652beacf11bSopenharmony_ciAfter changing to the clone directory:
653beacf11bSopenharmony_ci
654beacf11bSopenharmony_ciSet your identity:
655beacf11bSopenharmony_ci
656beacf11bSopenharmony_ci    git config --global user.name "My Name"
657beacf11bSopenharmony_ci    git config --global user.email my.name@example.com
658beacf11bSopenharmony_ci
659beacf11bSopenharmony_ciColorized diffs are much easier to read:
660beacf11bSopenharmony_ci
661beacf11bSopenharmony_ci    git config --global color.branch auto
662beacf11bSopenharmony_ci    git config --global color.diff auto
663beacf11bSopenharmony_ci    git config --global color.interactive auto
664beacf11bSopenharmony_ci    git config --global color.status auto
665beacf11bSopenharmony_ci
666beacf11bSopenharmony_ciCheckout other settings
667beacf11bSopenharmony_ci
668beacf11bSopenharmony_ci    git config --list
669beacf11bSopenharmony_ci
670beacf11bSopenharmony_ci### Cloning NuttX Inside Cygwin
671beacf11bSopenharmony_ci
672beacf11bSopenharmony_ciIf you are cloning the NuttX repository, it is recommended to avoid
673beacf11bSopenharmony_ciautomatic end of lines conversions by git. These conversions may break
674beacf11bSopenharmony_cisome scripts like configure.sh. Before cloning, do the following:
675beacf11bSopenharmony_ci
676beacf11bSopenharmony_ci    git config --global core.autocrlf false
677beacf11bSopenharmony_ci
678beacf11bSopenharmony_ci## Related Repositories
679beacf11bSopenharmony_ci
680beacf11bSopenharmony_ciThese are standalone repositories:
681beacf11bSopenharmony_ci
682beacf11bSopenharmony_ci  * <https://gitbox.apache.org/repos/asf/nuttx-apps>
683beacf11bSopenharmony_ci    or
684beacf11bSopenharmony_ci    <https://github.com/apache/nuttx-apps.git>
685beacf11bSopenharmony_ci
686beacf11bSopenharmony_ci    This directory holds an optional package of applications and libraries
687beacf11bSopenharmony_ci    can be used with the NuttX RTOS.  There is a README.txt file there that
688beacf11bSopenharmony_ci    will provide more information about that package.
689beacf11bSopenharmony_ci
690beacf11bSopenharmony_ci  * <https://bitbucket.org/nuttx/nxwidgets>
691beacf11bSopenharmony_ci
692beacf11bSopenharmony_ci    This is the NuttX C++ graphics support.  This includes NxWM, the tiny
693beacf11bSopenharmony_ci    NuttX Window Manager.
694beacf11bSopenharmony_ci
695beacf11bSopenharmony_ci  * <https://bitbucket.org/nuttx/uclibc>
696beacf11bSopenharmony_ci
697beacf11bSopenharmony_ci    This repository contains a version of the uClibc++ C++ library.  This code
698beacf11bSopenharmony_ci    originates from <http://cxx.uclibc.org/> and has been adapted for NuttX by the
699beacf11bSopenharmony_ci    RGMP team (<http://rgmp.sourceforge.net/wiki/index.php/Main_Page>).
700beacf11bSopenharmony_ci
701beacf11bSopenharmony_ci  * <https://bitbucket.org/nuttx/buildroot>
702beacf11bSopenharmony_ci
703beacf11bSopenharmony_ci    A environment that you can to use to build a custom, NuttX GNU toolchain.
704beacf11bSopenharmony_ci
705beacf11bSopenharmony_ci  * <https://bitbucket.org/nuttx/tools>
706beacf11bSopenharmony_ci
707beacf11bSopenharmony_ci    There are snapshots of some tools here that you will need to work with
708beacf11bSopenharmony_ci    NuttX:  kconfig-frontends, genromfs, and others.
709beacf11bSopenharmony_ci
710beacf11bSopenharmony_ci## Notes about Header Files
711beacf11bSopenharmony_ci
712beacf11bSopenharmony_ci### Other C-Library Header Files
713beacf11bSopenharmony_ci
714beacf11bSopenharmony_ciWhen a GCC toolchain is built, it must be built against a C library.
715beacf11bSopenharmony_ciThe compiler together with the contents of the C library completes the
716beacf11bSopenharmony_ciC language definition and provides the complete C development
717beacf11bSopenharmony_cienvironment.  NuttX provides its own, built-in C library.  So the
718beacf11bSopenharmony_cicomplete, consistent C language definition for use with NuttX comes from
719beacf11bSopenharmony_cithe combination of the compiler and the header files provided by the
720beacf11bSopenharmony_ciNuttX C library.
721beacf11bSopenharmony_ci
722beacf11bSopenharmony_ciWhen a GCC toolchain is built, it incorporates the C library header
723beacf11bSopenharmony_cifiles into the compiler internal directories and, in this way, the C
724beacf11bSopenharmony_cilibrary really becomes a part of the toolchain.  If you use the NuttX
725beacf11bSopenharmony_cibuildroot toolchain as described below under "NuttX Buildroot
726beacf11bSopenharmony_ciToolchain", your GCC toolchain will build against the NuttX C library
727beacf11bSopenharmony_ciand will incorporate the NuttX C library header files as part of the
728beacf11bSopenharmony_citoolchain.
729beacf11bSopenharmony_ci
730beacf11bSopenharmony_ciIf you use some other, third-party tool chain, this will not be the
731beacf11bSopenharmony_cicase, however.  Those toolchains were probably built against some
732beacf11bSopenharmony_ciother, incompatible C library distribution (such as newlib).  Those
733beacf11bSopenharmony_citools will have incorporated the incompatible C library header files
734beacf11bSopenharmony_cias part of the toolchain.  These incompatible header files must *not*
735beacf11bSopenharmony_cibe used with NuttX because they will conflict with definitions in the
736beacf11bSopenharmony_ciNuttX built-in C-Library.  For such toolchains that include header
737beacf11bSopenharmony_cifiles from a foreign C-Library, NuttX must be compiled without using
738beacf11bSopenharmony_cithe standard header files that are distributed with your toolchain.
739beacf11bSopenharmony_ciThis prevents including conflicting, incompatible header files such
740beacf11bSopenharmony_cias stdio.h.
741beacf11bSopenharmony_ci
742beacf11bSopenharmony_ciThe math.h and stdarg.h are probably the two most trouble some header
743beacf11bSopenharmony_cifiles to deal with.  These troublesome header files are discussed in
744beacf11bSopenharmony_cimore detail below.
745beacf11bSopenharmony_ci
746beacf11bSopenharmony_ci### Header Files Provided by Your Toolchain
747beacf11bSopenharmony_ci
748beacf11bSopenharmony_ciCertain header files, such as `setjmp.h`, `stdarg.h`, and `math.h`, may still
749beacf11bSopenharmony_cibe needed from your toolchain and your compiler may not, however, be able
750beacf11bSopenharmony_cito find these if you compile NuttX without using standard header files
751beacf11bSopenharmony_ci(i.e., with `-nostdinc`).  If that is the case, one solution is to copy
752beacf11bSopenharmony_cithose header file from your toolchain into the NuttX include directory.
753beacf11bSopenharmony_ci
754beacf11bSopenharmony_ci### Duplicated Header Files
755beacf11bSopenharmony_ci
756beacf11bSopenharmony_ciThere are also a few header files that can be found in the `nuttx/include`
757beacf11bSopenharmony_cidirectory which are duplicated by the header files from your toolchain.
758beacf11bSopenharmony_cistdint.h and stdbool.h are examples.  If you prefer to use the `stdint.h`
759beacf11bSopenharmony_ciand `stdbool.h` header files from your toolchain, those could be copied
760beacf11bSopenharmony_ciinto the `nuttx/include/` directory. Using most other header files from
761beacf11bSopenharmony_ciyour toolchain would probably cause errors.
762beacf11bSopenharmony_ci
763beacf11bSopenharmony_ci### math.h
764beacf11bSopenharmony_ci
765beacf11bSopenharmony_ciEven though you should not use a foreign C-Library, you may still need
766beacf11bSopenharmony_cito use other, external libraries with NuttX.  In particular, you may
767beacf11bSopenharmony_cineed to use the math library, libm.a.  NuttX supports a generic, built-in
768beacf11bSopenharmony_cimath library that can be enabled using `CONFIG_LIBM=y`.  However, you may
769beacf11bSopenharmony_cistill want to use a higher performance external math library that has
770beacf11bSopenharmony_cibeen tuned for your CPU.  Sometimes such tuned math libraries are
771beacf11bSopenharmony_cibundled with your toolchain.
772beacf11bSopenharmony_ci
773beacf11bSopenharmony_ciThe math library header file, `math.h`, is a then special case.  If you do
774beacf11bSopenharmony_cinothing, the standard math.h header file that is provided with your
775beacf11bSopenharmony_citoolchain will be used.
776beacf11bSopenharmony_ci
777beacf11bSopenharmony_ciIf you have a custom, architecture specific math.h header file, then
778beacf11bSopenharmony_cithat header file should be placed at `arch/<cpu>/include/math.h`.  There
779beacf11bSopenharmony_ciis a stub `math.h` header file located at `include/nuttx/lib/math.h`.  This stub
780beacf11bSopenharmony_ciheader file can be used to "redirect" the inclusion to an architecture-
781beacf11bSopenharmony_cispecific math.h header file.  If you add an architecture specific math.h
782beacf11bSopenharmony_ciheader file then you should also define `CONFIG_ARCH_MATH_H=y` in your
783beacf11bSopenharmony_ciNuttX Configuration file.  If `CONFIG_ARCH_MATH_H` is selected, then the
784beacf11bSopenharmony_citop-level Makefile will copy the stub math.h header file from
785beacf11bSopenharmony_ci`include/nuttx/lib/math.h` to `include/math.h` where it will become the system
786beacf11bSopenharmony_ci`math.h` header file.  The stub `math.h` header file does nothing other
787beacf11bSopenharmony_cithan to include that architecture-specific `math.h` header file as the
788beacf11bSopenharmony_cisystem `math.h` header file.
789beacf11bSopenharmony_ci
790beacf11bSopenharmony_ci### float.h
791beacf11bSopenharmony_ci
792beacf11bSopenharmony_ciIf you enable the generic, built-in math library, then that math library
793beacf11bSopenharmony_ciwill expect your toolchain to provide the standard `float.h` header file.
794beacf11bSopenharmony_ciThe float.h header file defines the properties of your floating point
795beacf11bSopenharmony_ciimplementation.  It would always be best to use your toolchain's `float.h`
796beacf11bSopenharmony_ciheader file but if none is available, a default `float.h` header file will
797beacf11bSopenharmony_cibe provided if this option is selected.  However, there is no assurance
798beacf11bSopenharmony_cithat the settings in this `float.h` are actually correct for your platform!
799beacf11bSopenharmony_ci
800beacf11bSopenharmony_ci### stdarg.h
801beacf11bSopenharmony_ci
802beacf11bSopenharmony_ciIn most cases, the correct version of stdarg.h is the version provided
803beacf11bSopenharmony_ciwith your toolchain.  However, sometimes there are issues with
804beacf11bSopenharmony_ciusing your toolchains `stdarg.h`.  For example, it may attempt to draw in
805beacf11bSopenharmony_ciheader files that do not exist in NuttX or perhaps the header files that
806beacf11bSopenharmony_ciit uses are not compatible with the NuttX header files.  In those cases,
807beacf11bSopenharmony_ciyou can use an architecture-specific `stdarg.h` header file by defining
808beacf11bSopenharmony_ci`CONFIG_ARCH_STDARG_H=y`.
809beacf11bSopenharmony_ci
810beacf11bSopenharmony_ciSee the discussion above for the `math.h` header.  This setting works
811beacf11bSopenharmony_ciexactly the same for the `stdarg.h` header file.
812beacf11bSopenharmony_ci
813beacf11bSopenharmony_ci# CONFIGURING NUTTX
814beacf11bSopenharmony_ci
815beacf11bSopenharmony_ci## Instantiating "Canned" Configurations
816beacf11bSopenharmony_ci
817beacf11bSopenharmony_ci### `configure.sh` and `configure.bat`
818beacf11bSopenharmony_ci
819beacf11bSopenharmony_ci"Canned" NuttX configuration files are retained in:
820beacf11bSopenharmony_ci
821beacf11bSopenharmony_ci    boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>
822beacf11bSopenharmony_ci
823beacf11bSopenharmony_ciWhere `<board-name>` is the name of your development board and `<config-dir>`
824beacf11bSopenharmony_ciis the name of the sub-directory containing a specific configuration for
825beacf11bSopenharmony_cithat board. `<arch-name>` and `<chip-name>` refer to characteristics of the
826beacf11bSopenharmony_ciMCU used on the board: `<arch-name>` is the CPU architecture implemented
827beacf11bSopenharmony_ciby the MCU; `<chip-name>` identifies the MCU chip family.  Only a few
828beacf11bSopenharmony_cisteps are required to instantiate a NuttX configuration, but to make the
829beacf11bSopenharmony_ciconfiguration even easier there are scripts available in the tools/
830beacf11bSopenharmony_cisub-directory combines those simple steps into one command.
831beacf11bSopenharmony_ci
832beacf11bSopenharmony_ciThere is one tool for use with any Bash-like shell that does configuration
833beacf11bSopenharmony_cisteps.  It is used as follows:
834beacf11bSopenharmony_ci
835beacf11bSopenharmony_ci    tools/configure.sh <board-name>:<config-dir>
836beacf11bSopenharmony_ci
837beacf11bSopenharmony_ciThere is an alternative Windows batch file that can be used in the windows
838beacf11bSopenharmony_cinative environment like:
839beacf11bSopenharmony_ci
840beacf11bSopenharmony_ci    tools\configure.bat <board-name>:<config-dir>
841beacf11bSopenharmony_ci
842beacf11bSopenharmony_ciAnd, to make sure that other platforms are supported, there is also a
843beacf11bSopenharmony_ciC program at tools/configure.c that can be compiled to establish the
844beacf11bSopenharmony_ciboard configuration.
845beacf11bSopenharmony_ci
846beacf11bSopenharmony_ciSee `tools/README.txt` for more information about these scripts.
847beacf11bSopenharmony_ci
848beacf11bSopenharmony_ciGeneral information about configuring NuttX can be found in:
849beacf11bSopenharmony_ci
850beacf11bSopenharmony_ci    {TOPDIR}/boards/README.txt
851beacf11bSopenharmony_ci    {TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt
852beacf11bSopenharmony_ci
853beacf11bSopenharmony_ci### The Hidden Configuration Scripts:
854beacf11bSopenharmony_ci
855beacf11bSopenharmony_ciAs mentioned above, there are only a few simple steps to instantiating a
856beacf11bSopenharmony_ciNuttX configuration.  Those steps are hidden by the configuration scripts
857beacf11bSopenharmony_cibut are summarized below:
858beacf11bSopenharmony_ci
859beacf11bSopenharmony_ci  1. Copy Files
860beacf11bSopenharmony_ci
861beacf11bSopenharmony_ci     Configuring NuttX requires only copying two files from the
862beacf11bSopenharmony_ci     `<config-dir>` to the directory where you installed NuttX (TOPDIR):
863beacf11bSopenharmony_ci
864beacf11bSopenharmony_ci       * Copy `boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/Make.def` to `{TOPDIR}/Make.defs`
865beacf11bSopenharmony_ci
866beacf11bSopenharmony_ci         OR
867beacf11bSopenharmony_ci
868beacf11bSopenharmony_ci       * Copy `boards/<arch-name>/<chip-name>/<board-name>/scripts/Make.def`
869beacf11bSopenharmony_ci         to `{TOPDIR}/Make.defs`
870beacf11bSopenharmony_ci
871beacf11bSopenharmony_ci         Make.defs describes the rules needed by your tool chain to compile
872beacf11bSopenharmony_ci         and link code.  You may need to modify this file to match the
873beacf11bSopenharmony_ci         specific needs of your toolchain.  NOTE that a configuration may
874beacf11bSopenharmony_ci         have its own unique Make.defs file in its configuration directory or
875beacf11bSopenharmony_ci         it may use a common Make.defs file for the board in the scripts/
876beacf11bSopenharmony_ci         directory.  The first takes precedence.
877beacf11bSopenharmony_ci
878beacf11bSopenharmony_ci       * Copy `boards/<arch-name>/<chip-name>/<board-name>/configs/<config-dir>/defconfig` to `{TOPDIR}/.config`
879beacf11bSopenharmony_ci
880beacf11bSopenharmony_ci         The defconfig file holds the actual build configuration.  This
881beacf11bSopenharmony_ci         file is included by all other make files to determine what is
882beacf11bSopenharmony_ci         included in the build and what is not.  This file is also used
883beacf11bSopenharmony_ci         to generate a C configuration header at `include/nuttx/config.h`.
884beacf11bSopenharmony_ci
885beacf11bSopenharmony_ci       * Copy other, environment-specific files to `{TOPDIR}`
886beacf11bSopenharmony_ci
887beacf11bSopenharmony_ci         This might include files like .gdbinit or IDE configuration files
888beacf11bSopenharmony_ci         like .project or .cproject.
889beacf11bSopenharmony_ci
890beacf11bSopenharmony_ci  2. Refresh the Configuration
891beacf11bSopenharmony_ci
892beacf11bSopenharmony_ci     New configuration setting may be added or removed.  Existing settings
893beacf11bSopenharmony_ci     may also change there values or options.  This must be handled by
894beacf11bSopenharmony_ci     refreshing the configuration as described below.
895beacf11bSopenharmony_ci
896beacf11bSopenharmony_ci     NOTE:  NuttX uses only compressed defconfig files.  For the NuttX
897beacf11bSopenharmony_ci     defconfig files, this refreshing step is *NOT* optional; it is also
898beacf11bSopenharmony_ci     necessary to uncompress and regenerate the full making file.  This is
899beacf11bSopenharmony_ci     discussed further below.
900beacf11bSopenharmony_ci
901beacf11bSopenharmony_ci## Refreshing Configurations
902beacf11bSopenharmony_ci
903beacf11bSopenharmony_ciConfigurations can get out of date.  As new configuration settings are
904beacf11bSopenharmony_ciadded or removed or as dependencies between configuration settings
905beacf11bSopenharmony_cichange, the contents of a default configuration can become out of synch
906beacf11bSopenharmony_ciwith the build systems.  Hence, it is a good practice to "refresh" each
907beacf11bSopenharmony_ciconfiguration after configuring and before making.  To refresh the
908beacf11bSopenharmony_ciconfiguration, use the NuttX Configuration Tool like this:
909beacf11bSopenharmony_ci
910beacf11bSopenharmony_ci    make oldconfig
911beacf11bSopenharmony_ci
912beacf11bSopenharmony_ciAFTER you have instantiated the NuttX configuration as described above.
913beacf11bSopenharmony_ciThe configuration step copied the .config file into place in the top-level
914beacf11bSopenharmony_ciNuttX directory; 'make oldconfig' step will then operate on that .config
915beacf11bSopenharmony_cifile to bring it up-to-date.
916beacf11bSopenharmony_ci
917beacf11bSopenharmony_ciIf your configuration is out of date, you will be prompted by 'make oldconfig'
918beacf11bSopenharmony_cito resolve the issues detected by the configuration tool, that is, to
919beacf11bSopenharmony_ciprovide values for the new configuration options in the build system.  Doing
920beacf11bSopenharmony_cithis can save you a lot of problems down the road due to obsolete settings in
921beacf11bSopenharmony_cithe default board configuration file.  The NuttX configuration tool is
922beacf11bSopenharmony_cidiscussed in more detail in the following paragraph.
923beacf11bSopenharmony_ci
924beacf11bSopenharmony_ciConfused about what the correct value for a new configuration item should
925beacf11bSopenharmony_cibe?  Enter ? in response to the 'make oldconfig' prompt and it will show
926beacf11bSopenharmony_ciyou the help text that goes with the option.
927beacf11bSopenharmony_ci
928beacf11bSopenharmony_ciIf you don't want to make any decisions are willing to just accept the
929beacf11bSopenharmony_cirecommended default value for each new configuration item, an even easier
930beacf11bSopenharmony_ciway is:
931beacf11bSopenharmony_ci
932beacf11bSopenharmony_ci    make olddefconfig
933beacf11bSopenharmony_ci
934beacf11bSopenharmony_ciThe olddefconfig target will simply bring your configuration up to date with
935beacf11bSopenharmony_cithe current Kconfig files, setting any new options to the default value.
936beacf11bSopenharmony_ciNo questions asked.
937beacf11bSopenharmony_ci
938beacf11bSopenharmony_ci## NuttX Configuration Tool
939beacf11bSopenharmony_ci
940beacf11bSopenharmony_ciAn automated tool has been incorporated to support re-configuration
941beacf11bSopenharmony_ciof NuttX.  This tool is based on the kconfig-frontends application available
942beacf11bSopenharmony_ciat <https://bitbucket.org/nuttx/tools/src/master/kconfig-frontends/>.  (This
943beacf11bSopenharmony_ciis a snapshot of the old <http://ymorin.is-a-geek.org/projects/kconfig-frontends>
944beacf11bSopenharmony_ciwhich is no longer available.)  This application provides a tool called
945beacf11bSopenharmony_ci`kconfig-mconf` that is used by the NuttX top-level Makefile. The following
946beacf11bSopenharmony_cimake target is provided:
947beacf11bSopenharmony_ci
948beacf11bSopenharmony_ci    make menuconfig
949beacf11bSopenharmony_ci
950beacf11bSopenharmony_ciThis make target will bring up NuttX configuration menus.
951beacf11bSopenharmony_ci
952beacf11bSopenharmony_ci**WARNING**:  Never do `make menuconfig` on a configuration that has
953beacf11bSopenharmony_cinot been converted to use the kconfig-frontends tools!  This will
954beacf11bSopenharmony_cidamage your configuration (see
955beacf11bSopenharmony_ci<https://cwiki.apache.org/confluence/display/NUTTX/Converting+Legacy+Configurations+to+Use+kconfig-mconf>).
956beacf11bSopenharmony_ci
957beacf11bSopenharmony_ciNuttX also supports kconfiglib(https://github.com/ulfalizer/Kconfiglib) by default,
958beacf11bSopenharmony_ciwhich is a Kconfig tool implemented in Python 2/3. Compared with kconfig-frontends,
959beacf11bSopenharmony_cikconfiglib provides NuttX with the possibility of multi-platform support(configure
960beacf11bSopenharmony_ciNuttX in Winodws native/Visual Studio), and also kconfiglib has a stronger Kconfig
961beacf11bSopenharmony_cisyntax check, this will help developers to avoid some Kconfig syntax errors.
962beacf11bSopenharmony_ciInstall kconfiglib via following command:
963beacf11bSopenharmony_ci
964beacf11bSopenharmony_ci    pip install kconfiglib
965beacf11bSopenharmony_ci
966beacf11bSopenharmony_ciIf you are a working on Windows, which also need the support of windows-curses:
967beacf11bSopenharmony_ci
968beacf11bSopenharmony_ci    pip install windows-curses
969beacf11bSopenharmony_ci
970beacf11bSopenharmony_ci**NOTE**:  It should be noted that kconfiglib does not support **modules** attributes.
971beacf11bSopenharmony_ci(<https://github.com/ulfalizer/Kconfiglib/blob/master/kconfiglib.py#L3239-L3254>,
972beacf11bSopenharmony_cithe community seems to have stopped updating), if the features depends on
973beacf11bSopenharmony_ci`CONFIG_BUILD_LOADABLE`, kconfiglib may not be a good choice.
974beacf11bSopenharmony_ci
975beacf11bSopenharmony_ciHow do we tell a new configuration from an old one? See "Incompatibilities
976beacf11bSopenharmony_ciwith Older Configurations" below.
977beacf11bSopenharmony_ci
978beacf11bSopenharmony_ciThe `menuconfig` make target depends on two things:
979beacf11bSopenharmony_ci
980beacf11bSopenharmony_ci  1. The Kconfig configuration data files that appear in almost all
981beacf11bSopenharmony_ci     NuttX directories.  These data files are the part that is still
982beacf11bSopenharmony_ci     under development (patches are welcome!).  The Kconfig files
983beacf11bSopenharmony_ci     contain configuration information for the configuration settings
984beacf11bSopenharmony_ci     relevant to the directory in which the Kconfig file resides.
985beacf11bSopenharmony_ci
986beacf11bSopenharmony_ci     NOTE: For a description of the syntax of this configuration file,
987beacf11bSopenharmony_ci     see kconfig-language.txt in the tools repository at
988beacf11bSopenharmony_ci     <https://bitbucket.org/nuttx/tools>
989beacf11bSopenharmony_ci
990beacf11bSopenharmony_ci  2. The `kconfig-mconf` tool. `kconfig-mconf` is part of the
991beacf11bSopenharmony_ci     kconfig-frontends package.  You can download that package from the
992beacf11bSopenharmony_ci     snapshot in the tools repository at <https://bitbucket.org/nuttx/tools>.
993beacf11bSopenharmony_ci
994beacf11bSopenharmony_ci     Building kconfig-frontends under Linux may be as simple as
995beacf11bSopenharmony_ci     `configure; make; make install` but there may be some build
996beacf11bSopenharmony_ci     complexities, especially if you are building under Cygwin.  See
997beacf11bSopenharmony_ci     the more detailed build instructions in the top-level README.txt
998beacf11bSopenharmony_ci     file of the tools repository at <https://bitbucket.org/nuttx/tools>.
999beacf11bSopenharmony_ci
1000beacf11bSopenharmony_ci     The `make install` step will, by default, install the `kconfig-mconf`
1001beacf11bSopenharmony_ci     tool at `/usr/local/bin/mconf`.  Where ever you choose to
1002beacf11bSopenharmony_ci     install `kconfig-mconf`, make certain that your PATH variable includes
1003beacf11bSopenharmony_ci     a path to that installation directory.
1004beacf11bSopenharmony_ci
1005beacf11bSopenharmony_ci     The kconfig-frontends tools will not build in a native Windows
1006beacf11bSopenharmony_ci     environment directly "out-of-the-box".  For the Windows native
1007beacf11bSopenharmony_ci     case, you can use the modified version of kconfig-frontends
1008beacf11bSopenharmony_ci     that can be found at
1009beacf11bSopenharmony_ci
1010beacf11bSopenharmony_ci     <http://uvc.de/posts/linux-kernel-configuration-tool-kconfig-under-windows.html>
1011beacf11bSopenharmony_ci
1012beacf11bSopenharmony_ci     or a more recent port that can be found at
1013beacf11bSopenharmony_ci
1014beacf11bSopenharmony_ci     <http://reclonelabs.com/more-kconfig-awesomeness-for-windows/>.
1015beacf11bSopenharmony_ci
1016beacf11bSopenharmony_ciThe basic configuration order is "bottom-up":
1017beacf11bSopenharmony_ci
1018beacf11bSopenharmony_ci   - Select the build environment,
1019beacf11bSopenharmony_ci   - Select the processor,
1020beacf11bSopenharmony_ci   - Select the board,
1021beacf11bSopenharmony_ci   - Select the supported peripherals
1022beacf11bSopenharmony_ci   - Configure the device drivers,
1023beacf11bSopenharmony_ci   - Configure the application options on top of this.
1024beacf11bSopenharmony_ci
1025beacf11bSopenharmony_ciThis is pretty straight forward for creating new configurations
1026beacf11bSopenharmony_cibut may be less intuitive for modifying existing configurations.
1027beacf11bSopenharmony_ci
1028beacf11bSopenharmony_ciAnother ncurses-based tool that is an option to kconfig-mconf is
1029beacf11bSopenharmony_cikconfig-nconf.  The differences are primary in in the aesthetics of the
1030beacf11bSopenharmony_ciUI.  If you have kconfig-nconf built, then you can invoke that front end
1031beacf11bSopenharmony_ciwith:
1032beacf11bSopenharmony_ci
1033beacf11bSopenharmony_ci     make nconfig
1034beacf11bSopenharmony_ci
1035beacf11bSopenharmony_ciIf you have an environment that supports the Qt or GTK graphical systems
1036beacf11bSopenharmony_ci(probably KDE or gnome, respectively, or Cygwin under Windows with Qt or
1037beacf11bSopenharmony_ciGTK installed), then you can also build the graphical kconfig-frontends,
1038beacf11bSopenharmony_cikconfig-qconf and kconfig-gconf.  In these case, you can start the
1039beacf11bSopenharmony_cigraphical configurator with either:
1040beacf11bSopenharmony_ci
1041beacf11bSopenharmony_ci     make qconfig
1042beacf11bSopenharmony_ci
1043beacf11bSopenharmony_ci or
1044beacf11bSopenharmony_ci
1045beacf11bSopenharmony_ci     make gconfig
1046beacf11bSopenharmony_ci
1047beacf11bSopenharmony_ciSome keyboard shortcuts supported by kconfig-mconf, the tool that runs
1048beacf11bSopenharmony_ciwhen you do 'make menuconfig':
1049beacf11bSopenharmony_ci
1050beacf11bSopenharmony_ci   - `?` will bring up the mconfig help display.
1051beacf11bSopenharmony_ci
1052beacf11bSopenharmony_ci   - `/` can be used find configuration selections.
1053beacf11bSopenharmony_ci
1054beacf11bSopenharmony_ci   - `Z` can be used to reveal hidden configuration options
1055beacf11bSopenharmony_ci
1056beacf11bSopenharmony_ciThese last two shortcuts are described further in the following
1057beacf11bSopenharmony_ciparagraphs.
1058beacf11bSopenharmony_ci
1059beacf11bSopenharmony_ci## Finding Selections in the Configuration Menus
1060beacf11bSopenharmony_ci
1061beacf11bSopenharmony_ciThe NuttX configuration options have gotten complex and it can be very
1062beacf11bSopenharmony_cidifficult to find options in the menu trees if you are not sure where
1063beacf11bSopenharmony_cito look.  The "basic configuration order" describe above can help to
1064beacf11bSopenharmony_cinarrow things down.
1065beacf11bSopenharmony_ci
1066beacf11bSopenharmony_ciBut if you know exactly what configuration setting you want to select,
1067beacf11bSopenharmony_cisay `CONFIG_XYZ`, but not where to find it, then the `make menuconfig`
1068beacf11bSopenharmony_civersion of the tool offers some help:  By pressing the '/' key, the
1069beacf11bSopenharmony_citool will bring up a menu that will allow you to search for a
1070beacf11bSopenharmony_ciconfiguration item.  Just enter the string `CONFIG_XYZ` and press ENTER.
1071beacf11bSopenharmony_ciIt will show you not only where to find the configuration item, but
1072beacf11bSopenharmony_cialso all of the dependencies related to the configuration item.
1073beacf11bSopenharmony_ci
1074beacf11bSopenharmony_ci## Reveal Hidden Configuration Options
1075beacf11bSopenharmony_ci
1076beacf11bSopenharmony_ciIf you type `Z`, then `kconfig-mconf` will change what is displayed.
1077beacf11bSopenharmony_ciNormally, only enabled features that have all of their dependencies met
1078beacf11bSopenharmony_ciare displayed.  That is, of course, not very useful if you would like to
1079beacf11bSopenharmony_cidiscover new options or if you are looking for an option and do not
1080beacf11bSopenharmony_cirealize that the dependencies have not yet been selected and, hence, it
1081beacf11bSopenharmony_ciis not displayed.
1082beacf11bSopenharmony_ci
1083beacf11bSopenharmony_ciBut if you enter `Z`, then every option will be shown, whether or not its
1084beacf11bSopenharmony_cidependencies have been met.  You can then see everything that could be
1085beacf11bSopenharmony_ciselected with the right dependency selections.  These additional options
1086beacf11bSopenharmony_ciwill be shown the `-` for the selection and for the value (since it
1087beacf11bSopenharmony_cicannot be selected and has no value).  About all you do is to select
1088beacf11bSopenharmony_cithe `<Help>` option to see what the dependencies are.
1089beacf11bSopenharmony_ci
1090beacf11bSopenharmony_ci## Make Sure that You are on the Right Platform
1091beacf11bSopenharmony_ci
1092beacf11bSopenharmony_ciSaved configurations may run on Linux, Cygwin (32- or 64-bit), or other
1093beacf11bSopenharmony_ciplatforms.  The platform characteristics can be changed use `make
1094beacf11bSopenharmony_cimenuconfig`.  Sometimes this can be confusing due to the differences
1095beacf11bSopenharmony_cibetween the platforms.  Enter `sethost.sh`
1096beacf11bSopenharmony_ci
1097beacf11bSopenharmony_cisethost.sh is a simple script that changes a configuration to your
1098beacf11bSopenharmony_cihost platform.  This can greatly simplify life if you use many different
1099beacf11bSopenharmony_ciconfigurations.  For example, if you are running on Linux and you
1100beacf11bSopenharmony_ciconfigure like this:
1101beacf11bSopenharmony_ci
1102beacf11bSopenharmony_ci    tools/configure.sh board:configuration
1103beacf11bSopenharmony_ci
1104beacf11bSopenharmony_ciThe you can use the following command to both (1) make sure that the
1105beacf11bSopenharmony_ciconfiguration is up to date, AND (2) the configuration is set up
1106beacf11bSopenharmony_cicorrectly for Linux:
1107beacf11bSopenharmony_ci
1108beacf11bSopenharmony_ci    tools/sethost.sh -l
1109beacf11bSopenharmony_ci
1110beacf11bSopenharmony_ciOr, if you are on a Windows/Cygwin 64-bit platform:
1111beacf11bSopenharmony_ci
1112beacf11bSopenharmony_ci    tools/sethost.sh -c
1113beacf11bSopenharmony_ci
1114beacf11bSopenharmony_ciOr, for MSYS/MSYS2:
1115beacf11bSopenharmony_ci
1116beacf11bSopenharmony_ci    tools/sethost.sh -g
1117beacf11bSopenharmony_ci
1118beacf11bSopenharmony_ciOther options are available from the help option built into the
1119beacf11bSopenharmony_ciscript.  You can see all options with:
1120beacf11bSopenharmony_ci
1121beacf11bSopenharmony_ci    tools/sethost.sh -h
1122beacf11bSopenharmony_ci
1123beacf11bSopenharmony_ciRecently, the options to the configure.sh (and configure.bat) scripts have
1124beacf11bSopenharmony_cibeen extended so that you both setup the configuration, select for the host
1125beacf11bSopenharmony_ciplatform that you use, and uncompress and refresh the defconfig file all in
1126beacf11bSopenharmony_cione command like:
1127beacf11bSopenharmony_ci
1128beacf11bSopenharmony_ci    tools/configure.sh -l board:configuration
1129beacf11bSopenharmony_ci
1130beacf11bSopenharmony_ciFor a Linux host or for a Windows/Cygwin host:
1131beacf11bSopenharmony_ci
1132beacf11bSopenharmony_ci    tools/configure.sh -c board:configuration
1133beacf11bSopenharmony_ci
1134beacf11bSopenharmony_ciOther options are available from the help option built into the
1135beacf11bSopenharmony_ciscript.  You can see all options with:
1136beacf11bSopenharmony_ci
1137beacf11bSopenharmony_ci    tools/configure.sh -h
1138beacf11bSopenharmony_ci
1139beacf11bSopenharmony_ci## Comparing Two Configurations
1140beacf11bSopenharmony_ci
1141beacf11bSopenharmony_ciIf you try to compare two configurations using 'diff', you will probably
1142beacf11bSopenharmony_cinot be happy with the result.  There are superfluous things added to
1143beacf11bSopenharmony_cithe configuration files that make comparisons with the human eye
1144beacf11bSopenharmony_cidifficult.
1145beacf11bSopenharmony_ci
1146beacf11bSopenharmony_ciThere is a tool at nuttx/tools/cmpconfig.c that can be built to simplify
1147beacf11bSopenharmony_cithese comparisons.  The output from this difference tool will show only
1148beacf11bSopenharmony_cithe meaningful differences between two configuration files.  This tool is
1149beacf11bSopenharmony_cibuilt as follows:
1150beacf11bSopenharmony_ci
1151beacf11bSopenharmony_ci    cd nuttx/tools
1152beacf11bSopenharmony_ci    make -f Makefile.host
1153beacf11bSopenharmony_ci
1154beacf11bSopenharmony_ciThis will create a program called 'cmpconfig' or 'comconfig.exe' on Windows.
1155beacf11bSopenharmony_ci
1156beacf11bSopenharmony_ciWhy would you want to compare two configuration files?  Here are a few
1157beacf11bSopenharmony_ciof the reasons why I do this
1158beacf11bSopenharmony_ci
1159beacf11bSopenharmony_ci  1. When I create a new configuration I usually base it on an older
1160beacf11bSopenharmony_ci     configuration and I want to know, "What are the options that I need to
1161beacf11bSopenharmony_ci     change to add the new feature to the older configurations?"  For example,
1162beacf11bSopenharmony_ci     suppose that I have a boardA/nsh configuration and I want to create a
1163beacf11bSopenharmony_ci     boardA/nxwm configuration.  Suppose I already have boardB/nsh and
1164beacf11bSopenharmony_ci     boardB/nxwm configurations.  Then by comparing the boardB/nsh with the
1165beacf11bSopenharmony_ci     boardB/nxwm I can see the modifications that I would need to make to my
1166beacf11bSopenharmony_ci     boardA/nsh to create a new  boardA/nxwm.
1167beacf11bSopenharmony_ci
1168beacf11bSopenharmony_ci  2. But the most common reason that I use the 'cmpconfig' program is to
1169beacf11bSopenharmony_ci     check the results of "refreshing" a configuration with 'make oldconfig'
1170beacf11bSopenharmony_ci     (see the paragraph "Refreshing Configurations" above).  The 'make
1171beacf11bSopenharmony_ci     oldconfig' command will make changes to my configuration and using
1172beacf11bSopenharmony_ci     'cmpconfig', I can see precisely what those changes were and if any
1173beacf11bSopenharmony_ci     should be of concern to me.
1174beacf11bSopenharmony_ci
1175beacf11bSopenharmony_ci  3. The 'cmpconfig' tool can also be useful when converting older, legacy
1176beacf11bSopenharmony_ci     manual configurations to the current configurations based on the
1177beacf11bSopenharmony_ci     kconfig-frontends tools.  See the following paragraph.
1178beacf11bSopenharmony_ci
1179beacf11bSopenharmony_ci## Making `defconfig` Files
1180beacf11bSopenharmony_ci
1181beacf11bSopenharmony_ci### `.config` Files as `defconfig` Files:
1182beacf11bSopenharmony_ci
1183beacf11bSopenharmony_ciThe minimum `defconfig` file is simply the generated `.config` file with
1184beacf11bSopenharmony_ciCONFIG_APPS_DIR setting removed or commented out.  That setting provides
1185beacf11bSopenharmony_cithe name and location of the `apps/` directory relative to the `nuttx` build
1186beacf11bSopenharmony_cidirectory.  The default is `../apps/`, however, the apps directory may be
1187beacf11bSopenharmony_ciany other location and may have a different name.  For example, the name
1188beacf11bSopenharmony_ciof versioned NuttX releases are always in the form `apps-xx.yy` where `xx.yy`
1189beacf11bSopenharmony_ciis the version number.
1190beacf11bSopenharmony_ci
1191beacf11bSopenharmony_ci### Finding the `apps/` Directory Path:
1192beacf11bSopenharmony_ci
1193beacf11bSopenharmony_ciWhen the default configuration is installed using one of the scripts or
1194beacf11bSopenharmony_ciprograms in the NuttX tools directory, there will be an option to provide
1195beacf11bSopenharmony_cithe path to the `apps/` directory.  If not provided, then the configure tool
1196beacf11bSopenharmony_ciwill look around and try to make a reasonable decision about where the
1197beacf11bSopenharmony_ci`apps/` directory is located.
1198beacf11bSopenharmony_ci
1199beacf11bSopenharmony_ci### Compressed `defconfig` Files:
1200beacf11bSopenharmony_ci
1201beacf11bSopenharmony_ciThe `Makefile` also supports an option to generate very small `defconfig`
1202beacf11bSopenharmony_cifiles.  The `.config` files are quite large and complex.  But most of the
1203beacf11bSopenharmony_cisettings in the `.config` file simply have the default settings from the
1204beacf11bSopenharmony_ci`Kconfig` files.  These `.config` files can be converted into small `defconfig`
1205beacf11bSopenharmony_cifile:
1206beacf11bSopenharmony_ci
1207beacf11bSopenharmony_ci    make savedefconfig
1208beacf11bSopenharmony_ci
1209beacf11bSopenharmony_ciThat make target will generate a defconfig file in the top-level
1210beacf11bSopenharmony_cidirectory.  The size reduction is really quite remarkable:
1211beacf11bSopenharmony_ci
1212beacf11bSopenharmony_ci    wc -l .config defconfig
1213beacf11bSopenharmony_ci     1085 .config
1214beacf11bSopenharmony_ci       82 defconfig
1215beacf11bSopenharmony_ci     1167 total
1216beacf11bSopenharmony_ci
1217beacf11bSopenharmony_ciIn order to be usable, the `.config` file installed from the compressed
1218beacf11bSopenharmony_cidefconfig file must be reconstituted using:
1219beacf11bSopenharmony_ci
1220beacf11bSopenharmony_ci    make olddefconfig
1221beacf11bSopenharmony_ci
1222beacf11bSopenharmony_ci  > **NOTE 1**:  Only compressed defconfig files are retained in the NuttX repository.
1223beacf11bSopenharmony_ci  > All patches and PRs that attempt to add or modify a defconfig file MUST
1224beacf11bSopenharmony_ci  > use the compressed defconfig format as created by 'make savdefconfig.'
1225beacf11bSopenharmony_ci
1226beacf11bSopenharmony_ci  > **NOTE 2**:  When 'make savedefconfig' runs it will try several things some of
1227beacf11bSopenharmony_ci  > which are expected to fail.  In these cases you will see an error message
1228beacf11bSopenharmony_ci  > from make followed by "(ignored)."  You should also ignore these messages
1229beacf11bSopenharmony_ci
1230beacf11bSopenharmony_ci**CAUTION**:  This size reduction was accomplished by removing all setting
1231beacf11bSopenharmony_cifrom the `.config` file that were at the default value. `make olddefconfig`
1232beacf11bSopenharmony_cican regenerate the original `.config` file by simply restoring those default
1233beacf11bSopenharmony_cisettings.  The underlying assumption here is, of course, that the default
1234beacf11bSopenharmony_cisettings do not change.  If the default settings change, and they often
1235beacf11bSopenharmony_cido, then the original `.config` may not be reproducible.
1236beacf11bSopenharmony_ci
1237beacf11bSopenharmony_ciSo if your project requires 100% reproducibility over a long period of
1238beacf11bSopenharmony_citime, you make want to save the complete `.config` files vs. the standard,
1239beacf11bSopenharmony_cicompressed `defconfig` file.
1240beacf11bSopenharmony_ci
1241beacf11bSopenharmony_ci### Configuring with "Compressed" defconfig Files:
1242beacf11bSopenharmony_ci
1243beacf11bSopenharmony_ciAs described above `defconfig`, all NuttX `defconfig` files are compressed
1244beacf11bSopenharmony_ciusing `make savedeconfig`.  These compressed `defconfig` files are
1245beacf11bSopenharmony_cigenerally not fully usable as they are and may not build the target
1246beacf11bSopenharmony_cibinaries that you want because the compression process removed all of
1247beacf11bSopenharmony_cithe default settings from the `defconfig` file.  To restore the default
1248beacf11bSopenharmony_cisettings, you should run the following after configuring:
1249beacf11bSopenharmony_ci
1250beacf11bSopenharmony_ci    make olddefconfig
1251beacf11bSopenharmony_ci
1252beacf11bSopenharmony_ciThat will restore the the missing defaulted values.
1253beacf11bSopenharmony_ci
1254beacf11bSopenharmony_ciUsing this command after configuring is generally a good practice anyway:
1255beacf11bSopenharmony_ciEven if the `defconfig` files are not "compressed" in this fashion, the
1256beacf11bSopenharmony_ci`defconfig` file may be old and the only way to assure that the installed
1257beacf11bSopenharmony_ci`.config` is is up to date is via `make oldconfig` or `make olddefconfig`.
1258beacf11bSopenharmony_ciSee the paragraph above entitled "Refreshing Configurations" for
1259beacf11bSopenharmony_ciadditional information.
1260beacf11bSopenharmony_ci
1261beacf11bSopenharmony_ci## Incompatibilities with Older Configurations
1262beacf11bSopenharmony_ci
1263beacf11bSopenharmony_ci**WARNING**
1264beacf11bSopenharmony_ci
1265beacf11bSopenharmony_ciThe current NuttX build system supports *only* the new compressed,
1266beacf11bSopenharmony_ci`defconfig` configuration files generated using the `kconfig-frontends` tools
1267beacf11bSopenharmony_cias described in the preceding section.  Support for the older, legacy,
1268beacf11bSopenharmony_cimanual configurations was eliminated in NuttX 7.0; support for
1269beacf11bSopenharmony_ciuncompressed `.config-files-as-defconfig` files was eliminated after
1270beacf11bSopenharmony_ciNuttX-7.21.  All configurations must now be done using the
1271beacf11bSopenharmony_ci`kconfig-frontends` tool.  The older manual configurations and the new
1272beacf11bSopenharmony_ci`kconfig-frontends` configurations are not compatible.  Old legacy
1273beacf11bSopenharmony_ciconfigurations can *not* be used with the `kconfig-frontends` tool and,
1274beacf11bSopenharmony_cihence, cannot be used with releases of NuttX 7.0 and beyond:
1275beacf11bSopenharmony_ci
1276beacf11bSopenharmony_ciIf you run `make menuconfig` with a legacy configuration the resulting
1277beacf11bSopenharmony_ciconfiguration will probably not be functional.
1278beacf11bSopenharmony_ci
1279beacf11bSopenharmony_ci  > Q: How can I tell if a configuration is a new kconfig-frontends
1280beacf11bSopenharmony_ci  >   configuration or an older, manual configuration?
1281beacf11bSopenharmony_ci  >
1282beacf11bSopenharmony_ci  > A: Only old, manual configurations will have an appconfig file
1283beacf11bSopenharmony_ci  >
1284beacf11bSopenharmony_ci  > Q: How can I convert a older, manual configuration into a new,
1285beacf11bSopenharmony_ci  >    kconfig-frontends toolchain.
1286beacf11bSopenharmony_ci  >
1287beacf11bSopenharmony_ci  > A: Refer to <https://cwiki.apache.org/confluence/display/NUTTX/Converting+Legacy+Configurations+to+Use+kconfig-mconf>
1288beacf11bSopenharmony_ci
1289beacf11bSopenharmony_ci**WARNING**
1290beacf11bSopenharmony_ci
1291beacf11bSopenharmony_ciAs described above, whenever you use a configuration, you really should
1292beacf11bSopenharmony_cialways refresh the configuration with the following command *before* you
1293beacf11bSopenharmony_cimake NuttX:
1294beacf11bSopenharmony_ci
1295beacf11bSopenharmony_ci    make oldconfig
1296beacf11bSopenharmony_ci
1297beacf11bSopenharmony_ciOR
1298beacf11bSopenharmony_ci
1299beacf11bSopenharmony_ci    make olddefconfig
1300beacf11bSopenharmony_ci
1301beacf11bSopenharmony_ciThis will make sure that the configuration is up-to-date in the event that
1302beacf11bSopenharmony_ciit has lapsed behind the current NuttX development (see the paragraph
1303beacf11bSopenharmony_ci"Refreshing Configurations" above).  But this only works with *new*
1304beacf11bSopenharmony_ciconfiguration files created with the kconfig-frontends tools.
1305beacf11bSopenharmony_ci
1306beacf11bSopenharmony_ciFurther, this step is *NOT* optional with the new, compressed defconfig
1307beacf11bSopenharmony_cifiles.  It is a necessary step that will also uncompress the defconfig
1308beacf11bSopenharmony_cifile, regenerating the `.config` and making it usable for NuttX builds.
1309beacf11bSopenharmony_ci
1310beacf11bSopenharmony_ciNever do `make oldconfig` (OR `make menuconfig`) on a  configuration that
1311beacf11bSopenharmony_cihas not been converted to use the kconfig-frontends tools!  This will
1312beacf11bSopenharmony_cidamage your configuration (see
1313beacf11bSopenharmony_ci<https://cwiki.apache.org/confluence/display/NUTTX/Converting+Legacy+Configurations+to+Use+kconfig-mconf>).
1314beacf11bSopenharmony_ci
1315beacf11bSopenharmony_ci## NuttX Configuration Tool under DOS
1316beacf11bSopenharmony_ci
1317beacf11bSopenharmony_ci  Recent versions of NuttX support building NuttX from a native Windows
1318beacf11bSopenharmony_ci  console window (see *Native Windows Build* below).  But `kconfig-frontends`
1319beacf11bSopenharmony_ci  is a Linux tool.  At one time this was a problem for Windows users, but
1320beacf11bSopenharmony_ci  now there are two specially modified versions of the `kconfig-frontends`
1321beacf11bSopenharmony_ci  tools that can be used.  One can be found here:
1322beacf11bSopenharmony_ci  <http://uvc.de/posts/linux-kernel-configuration-tool-kconfig-under-windows.html>
1323beacf11bSopenharmony_ci
1324beacf11bSopenharmony_ci  The configuration steps of the most recent versions of NuttX require the
1325beacf11bSopenharmony_ci  `kconfig-tweak` tool that is not not available in the the above.  However,
1326beacf11bSopenharmony_ci  there has been an update to this `Kconfig` Windows tools that does include
1327beacf11bSopenharmony_ci  `kconfig-tweak`:  http://reclonelabs.com/more-kconfig-awesomeness-for-windows/
1328beacf11bSopenharmony_ci
1329beacf11bSopenharmony_ci  Source code is available here: <https://github.com/reclone/kconfig-frontends-win32>
1330beacf11bSopenharmony_ci  and <https://github.com/reclone/kconfig-frontends-win32/releases>
1331beacf11bSopenharmony_ci
1332beacf11bSopenharmony_ci  It is also possible to use the version of `kconfig-frontends` built
1333beacf11bSopenharmony_ci  under Cygwin outside of the Cygwin *sandbox* in a native Windows
1334beacf11bSopenharmony_ci  environment:
1335beacf11bSopenharmony_ci
1336beacf11bSopenharmony_ci  1. You can run the configuration tool using Cygwin.  However, the
1337beacf11bSopenharmony_ci     Cygwin `Win.mk` will complain so to do this will, you have
1338beacf11bSopenharmony_ci     to manually edit the `.config` file:
1339beacf11bSopenharmony_ci
1340beacf11bSopenharmony_ci     a. Delete the line: `CONFIG_WINDOWS_NATIVE=y`
1341beacf11bSopenharmony_ci
1342beacf11bSopenharmony_ci     b. Change the apps/ directory path, `CONFIG_APPS_DIR` to use Unix
1343beacf11bSopenharmony_ci        style delimiters.  For example, change `..\apps` to `../apps`
1344beacf11bSopenharmony_ci
1345beacf11bSopenharmony_ci     And of course, after you use the configuration tool you need to
1346beacf11bSopenharmony_ci     restore `CONFIG_WINDOWS_NATIVE=y` and the correct `CONFIG_APPS_DIR`.
1347beacf11bSopenharmony_ci
1348beacf11bSopenharmony_ci  2. You can, with some effort, run the Cygwin `kconfig-mconf` tool
1349beacf11bSopenharmony_ci     directly in the Windows console window.  In this case, you do not
1350beacf11bSopenharmony_ci     have to modify the `.config` file, but there are other complexities:
1351beacf11bSopenharmony_ci
1352beacf11bSopenharmony_ci     a. You need to temporarily set the Cygwin directories in the PATH
1353beacf11bSopenharmony_ci        variable then run `kconfig-mconf` manually like:
1354beacf11bSopenharmony_ci
1355beacf11bSopenharmony_ci          kconfig-mconf Kconfig
1356beacf11bSopenharmony_ci
1357beacf11bSopenharmony_ci        There is a Windows batch file at `tools/kconfig.bat` that automates
1358beacf11bSopenharmony_ci        these steps:
1359beacf11bSopenharmony_ci
1360beacf11bSopenharmony_ci         tools/kconfig menuconfig
1361beacf11bSopenharmony_ci
1362beacf11bSopenharmony_ci     b. There is an issue with accessing DOS environment variables from
1363beacf11bSopenharmony_ci        the Cygwin `kconfig-mconf` running in the Windows console.  The
1364beacf11bSopenharmony_ci        following change to the top-level `Kconfig` file seems to work
1365beacf11bSopenharmony_ci        around these problems:
1366beacf11bSopenharmony_ci
1367beacf11bSopenharmony_ci          config APPSDIR
1368beacf11bSopenharmony_ci              string
1369beacf11bSopenharmony_ci          -   option env="APPSDIR"
1370beacf11bSopenharmony_ci          +   default "../apps"
1371beacf11bSopenharmony_ci
1372beacf11bSopenharmony_ci# TOOLCHAINS
1373beacf11bSopenharmony_ci
1374beacf11bSopenharmony_ci## Cross-Development Toolchains
1375beacf11bSopenharmony_ci
1376beacf11bSopenharmony_ci  In order to build NuttX for your board, you will have to obtain a cross-
1377beacf11bSopenharmony_ci  compiler to generate code for your target CPU.  For each board,
1378beacf11bSopenharmony_ci  configuration, there is a `README.txt` file (at
1379beacf11bSopenharmony_ci  `boards/<arch-name>/<chip-name>/<board-name>/README.txt`).
1380beacf11bSopenharmony_ci  That README file contains suggestions and information about appropriate
1381beacf11bSopenharmony_ci  tools and development environments for use with your board.
1382beacf11bSopenharmony_ci
1383beacf11bSopenharmony_ci  In any case, the PATH environment variable will need to be updated to
1384beacf11bSopenharmony_ci  include the location where the build can find the toolchain binaries.
1385beacf11bSopenharmony_ci
1386beacf11bSopenharmony_ci## NuttX Buildroot Toolchain
1387beacf11bSopenharmony_ci
1388beacf11bSopenharmony_ci  For many configurations, a DIY set of tools is available for NuttX.  These
1389beacf11bSopenharmony_ci  tools can be downloaded from the NuttX Bitbucket.org file repository.  After
1390beacf11bSopenharmony_ci  unpacking the buildroot tarball, you can find instructions for building
1391beacf11bSopenharmony_ci  the tools in the `buildroot/boards/README.txt` file.
1392beacf11bSopenharmony_ci
1393beacf11bSopenharmony_ci  Check the README.txt file in the configuration directory for your board
1394beacf11bSopenharmony_ci  to see if you can use the buildroot toolchain with your board (this
1395beacf11bSopenharmony_ci  README.txt file is located in
1396beacf11bSopenharmony_ci  `boards/<arch-name>/<chip-name>/<board-name>/README.txt`).
1397beacf11bSopenharmony_ci
1398beacf11bSopenharmony_ci  This toolchain is available for both the Linux and Cygwin development
1399beacf11bSopenharmony_ci  environments.
1400beacf11bSopenharmony_ci
1401beacf11bSopenharmony_ci  Advantages:  (1) NuttX header files are built into the tool chain,
1402beacf11bSopenharmony_ci  and (2) related support tools like NXFLAT tools, the ROMFS
1403beacf11bSopenharmony_ci  genromfs tools, and the kconfig-frontends tools can be built into your
1404beacf11bSopenharmony_ci  toolchain.
1405beacf11bSopenharmony_ci
1406beacf11bSopenharmony_ci  Disadvantages:  This tool chain is not was well supported as some other
1407beacf11bSopenharmony_ci  toolchains.  GNU tools are not my priority and so the buildroot tools
1408beacf11bSopenharmony_ci  often get behind.  For example, until recently there was no EABI support
1409beacf11bSopenharmony_ci  in the NuttX buildroot toolchain for ARM.
1410beacf11bSopenharmony_ci
1411beacf11bSopenharmony_ci  NOTE: For Cortex-M3/4, there are OABI and EABI versions of the buildroot
1412beacf11bSopenharmony_ci  toolchains.  If you are using the older OABI toolchain the prefix for
1413beacf11bSopenharmony_ci  the tools will be `arm-nuttx-elf-`; for the EABI toolchain the prefix will
1414beacf11bSopenharmony_ci  be `arm-nuttx-eabi-`. If you are using the older OABI toolchain with
1415beacf11bSopenharmony_ci  an ARM Cortex-M3/4, you will need to set CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI
1416beacf11bSopenharmony_ci  in the `.config` file in order to pick the right tool prefix.
1417beacf11bSopenharmony_ci
1418beacf11bSopenharmony_ci  If the make system ever picks the wrong prefix for your toolchain, you
1419beacf11bSopenharmony_ci  can always specify the prefix on the command to override the default
1420beacf11bSopenharmony_ci  like:
1421beacf11bSopenharmony_ci
1422beacf11bSopenharmony_ci    make CROSSDEV=arm-nuttx-elf
1423beacf11bSopenharmony_ci
1424beacf11bSopenharmony_ci# SHELLS
1425beacf11bSopenharmony_ci
1426beacf11bSopenharmony_ciThe NuttX build relies on some shell scripts.  Some are inline in the
1427beacf11bSopenharmony_ciMakefiles and many are executable scripts in the `tools/`. directory.  The
1428beacf11bSopenharmony_ciscripts were all developed using bash and many contain bash shell
1429beacf11bSopenharmony_cidependencies.
1430beacf11bSopenharmony_ci
1431beacf11bSopenharmony_ciMost of the scripts begin with `#!/bin/bash` to specifically select the
1432beacf11bSopenharmony_cibash shell.  Some still have `#!/bin/sh` but I haven't heard any complaints
1433beacf11bSopenharmony_ciso these must not have bash dependencies.
1434beacf11bSopenharmony_ci
1435beacf11bSopenharmony_ciThere are two shell issues that I have heard of:
1436beacf11bSopenharmony_ci
1437beacf11bSopenharmony_ci  1. Linux where `/bin/sh` refers to an incompatible shell (like `ksh` or `csh`).
1438beacf11bSopenharmony_ci
1439beacf11bSopenharmony_ci     In this case, bash is probably available and the `#!/bin/bash` at the
1440beacf11bSopenharmony_ci     beginning of the file should do the job.  If any scripts with `#!/bin/sh`
1441beacf11bSopenharmony_ci     fail, try changing that to `#!/bin/bash` and let me know about the change.
1442beacf11bSopenharmony_ci
1443beacf11bSopenharmony_ci  2. FreeBSD with the Bourne Shell and no bash shell.
1444beacf11bSopenharmony_ci
1445beacf11bSopenharmony_ci     The other, reverse case has also been reported on FreeBSD setups that
1446beacf11bSopenharmony_ci     have the Bourne shell, but not bash.  In this base, `#!/bin/bash` fails
1447beacf11bSopenharmony_ci     but `#!/bin/sh` works okay.  My recommendation in this case is to create
1448beacf11bSopenharmony_ci     a symbolic link at `/bin/bash` that refers to the Bourne shell.
1449beacf11bSopenharmony_ci
1450beacf11bSopenharmony_ci     There may still be issues, however, with certain the `bash`-centric scripts
1451beacf11bSopenharmony_ci     that will require modifications.
1452beacf11bSopenharmony_ci
1453beacf11bSopenharmony_ci# BUILDING NUTTX
1454beacf11bSopenharmony_ci
1455beacf11bSopenharmony_ci## Building
1456beacf11bSopenharmony_ci
1457beacf11bSopenharmony_ciNuttX builds in-place in the source tree.  You do not need to create
1458beacf11bSopenharmony_ciany special build directories.  Assuming that your Make.defs is setup
1459beacf11bSopenharmony_ciproperly for your tool chain and that PATH environment variable contains
1460beacf11bSopenharmony_cithe path to where your cross-development tools are installed, the
1461beacf11bSopenharmony_cifollowing steps are all that are required to build NuttX:
1462beacf11bSopenharmony_ci
1463beacf11bSopenharmony_ci    cd {TOPDIR}
1464beacf11bSopenharmony_ci    make
1465beacf11bSopenharmony_ci
1466beacf11bSopenharmony_ciAt least one configuration (eagle100) requires additional command line
1467beacf11bSopenharmony_ciarguments on the make command.  Read
1468beacf11bSopenharmony_ci`{TOPDIR}/boards/<arch-name>/<chip-name>/<board-name>/README.txt` to see
1469beacf11bSopenharmony_ciif that applies to your target.
1470beacf11bSopenharmony_ci
1471beacf11bSopenharmony_ci## Re-building
1472beacf11bSopenharmony_ci
1473beacf11bSopenharmony_ciRe-building is normally simple -- just type make again.
1474beacf11bSopenharmony_ci
1475beacf11bSopenharmony_ciBut there are some things that can "get you" when you use the Cygwin
1476beacf11bSopenharmony_cidevelopment environment with Windows native tools.  The native Windows
1477beacf11bSopenharmony_citools do not understand Cygwin's symbolic links, so the NuttX make system
1478beacf11bSopenharmony_cidoes something weird:  It copies the configuration directories instead of
1479beacf11bSopenharmony_cilinking to them (it could, perhaps, use the NTFS `mklink` command, but it
1480beacf11bSopenharmony_cidoesn't).
1481beacf11bSopenharmony_ci
1482beacf11bSopenharmony_ciA consequence of this is that you can easily get confused when you edit
1483beacf11bSopenharmony_cia file in one of the linked (i.e., copied) directories, re-build NuttX,
1484beacf11bSopenharmony_ciand then not see your changes when you run the program.  That is because
1485beacf11bSopenharmony_cibuild is still using the version of the file in the copied directory, not
1486beacf11bSopenharmony_ciyour modified file!
1487beacf11bSopenharmony_ci
1488beacf11bSopenharmony_ciOlder versions of NuttX did not support dependencies in this
1489beacf11bSopenharmony_ciconfiguration.  So a simple work around this annoying behavior in this
1490beacf11bSopenharmony_cicase was the following when you re-build:
1491beacf11bSopenharmony_ci
1492beacf11bSopenharmony_ci     make clean_context all
1493beacf11bSopenharmony_ci
1494beacf11bSopenharmony_ciThis 'make' command will remove of the copied directories, re-copy them,
1495beacf11bSopenharmony_cithen make NuttX.
1496beacf11bSopenharmony_ci
1497beacf11bSopenharmony_ciHowever, more recent versions of NuttX do support dependencies for the
1498beacf11bSopenharmony_ciCygwin build.  As a result, the above command will cause everything to be
1499beacf11bSopenharmony_cirebuilt (because it removes and will cause recreating the
1500beacf11bSopenharmony_ci`include/nuttx/config.h` header file).  A much less gracefully but still
1501beacf11bSopenharmony_cieffective command in this case is the following for the ARM configuration:
1502beacf11bSopenharmony_ci
1503beacf11bSopenharmony_ci    rm -rf arch/arm/src/chip arch/arm/src/board
1504beacf11bSopenharmony_ci
1505beacf11bSopenharmony_ciThis "kludge" simple removes the copied directories.  These directories
1506beacf11bSopenharmony_ciwill be re-created when you do a normal 'make' and your edits will then be
1507beacf11bSopenharmony_cieffective.
1508beacf11bSopenharmony_ci
1509beacf11bSopenharmony_ci## Build Targets and Options
1510beacf11bSopenharmony_ci
1511beacf11bSopenharmony_ci### Build Targets
1512beacf11bSopenharmony_ci
1513beacf11bSopenharmony_ciBelow is a summary of the build targets available in the top-level
1514beacf11bSopenharmony_ciNuttX Makefile:
1515beacf11bSopenharmony_ci
1516beacf11bSopenharmony_ci  * `all`
1517beacf11bSopenharmony_ci
1518beacf11bSopenharmony_ci    The default target builds the NuttX executable in the selected output
1519beacf11bSopenharmony_ci    formats.
1520beacf11bSopenharmony_ci
1521beacf11bSopenharmony_ci  * `clean`
1522beacf11bSopenharmony_ci
1523beacf11bSopenharmony_ci    Removes derived object files, archives, executables, and temporary
1524beacf11bSopenharmony_ci    files, but retains the configuration and context files and directories.
1525beacf11bSopenharmony_ci
1526beacf11bSopenharmony_ci  * `distclean`
1527beacf11bSopenharmony_ci
1528beacf11bSopenharmony_ci    Does 'clean' then also removes all configuration and context files.
1529beacf11bSopenharmony_ci    This essentially restores the directory structure to its original,
1530beacf11bSopenharmony_ci    unconfigured stated.
1531beacf11bSopenharmony_ci
1532beacf11bSopenharmony_ciApplication housekeeping targets.  The APPDIR variable refers to the user
1533beacf11bSopenharmony_ciapplication directory.  A sample `apps/` directory is included with NuttX,
1534beacf11bSopenharmony_cihowever, this is not treated as part of NuttX and may be replaced with a
1535beacf11bSopenharmony_cidifferent application directory.  For the most part, the application
1536beacf11bSopenharmony_cidirectory is treated like any other build directory in the `Makefile` script.
1537beacf11bSopenharmony_ciHowever, as a convenience, the following targets are included to support
1538beacf11bSopenharmony_cihousekeeping functions in the user application directory from the NuttX
1539beacf11bSopenharmony_cibuild directory.
1540beacf11bSopenharmony_ci
1541beacf11bSopenharmony_ci  * `apps_clean`
1542beacf11bSopenharmony_ci
1543beacf11bSopenharmony_ci    Perform the clean operation only in the user application directory
1544beacf11bSopenharmony_ci
1545beacf11bSopenharmony_ci  * `apps_distclean`
1546beacf11bSopenharmony_ci
1547beacf11bSopenharmony_ci    Perform the distclean operation only in the user application directory.
1548beacf11bSopenharmony_ci    The apps/.config file is preserved so that this is not a "full" distclean
1549beacf11bSopenharmony_ci    but more of a configuration "reset" for the application directory.
1550beacf11bSopenharmony_ci
1551beacf11bSopenharmony_ci  * `export`
1552beacf11bSopenharmony_ci
1553beacf11bSopenharmony_ci    The export target will package the NuttX libraries and header files into
1554beacf11bSopenharmony_ci    an exportable package.  Caveats: (1) These needs some extension for the KERNEL
1555beacf11bSopenharmony_ci    build. (2) The logic in tools/mkexport.sh only supports GCC and, for example,
1556beacf11bSopenharmony_ci    explicitly assumes that the archiver is 'ar'
1557beacf11bSopenharmony_ci
1558beacf11bSopenharmony_ci  * `flash` (or `download` : DEPRECATED)
1559beacf11bSopenharmony_ci
1560beacf11bSopenharmony_ci    This is a helper target that will rebuild NuttX and flash it to the target
1561beacf11bSopenharmony_ci    system in one step.  The operation of this target depends completely upon
1562beacf11bSopenharmony_ci    implementation of the FLASH command in the user Make.defs file.  It will
1563beacf11bSopenharmony_ci    generate an error if the FLASH command is not defined.
1564beacf11bSopenharmony_ci
1565beacf11bSopenharmony_ciThe following targets are used internally by the make logic but can be invoked
1566beacf11bSopenharmony_cifrom the command under certain conditions if necessary.
1567beacf11bSopenharmony_ci
1568beacf11bSopenharmony_ci  * `depend`
1569beacf11bSopenharmony_ci
1570beacf11bSopenharmony_ci    Create build dependencies. (NOTE:  There is currently no support for build
1571beacf11bSopenharmony_ci    dependencies under Cygwin using Windows-native toolchains.)
1572beacf11bSopenharmony_ci
1573beacf11bSopenharmony_ci  * `context`
1574beacf11bSopenharmony_ci
1575beacf11bSopenharmony_ci    The context target is invoked on each target build to assure that NuttX is
1576beacf11bSopenharmony_ci    properly configured.  The basic configuration steps include creation of the
1577beacf11bSopenharmony_ci    the `config.h` and `version.h` header files in the `include/nuttx` directory and
1578beacf11bSopenharmony_ci    the establishment of symbolic links to configured directories.
1579beacf11bSopenharmony_ci
1580beacf11bSopenharmony_ci  * `clean_context`
1581beacf11bSopenharmony_ci
1582beacf11bSopenharmony_ci    This is part of the `distclean` target.  It removes all of the header files
1583beacf11bSopenharmony_ci    and symbolic links created by the context target.
1584beacf11bSopenharmony_ci
1585beacf11bSopenharmony_ci### Build Options
1586beacf11bSopenharmony_ci
1587beacf11bSopenharmony_ciOf course, the value any make variable an be overridden from the make command
1588beacf11bSopenharmony_ciline.  However, there is one particular variable assignment option that may
1589beacf11bSopenharmony_cibe useful to you:
1590beacf11bSopenharmony_ci
1591beacf11bSopenharmony_ci  * `V=1`
1592beacf11bSopenharmony_ci
1593beacf11bSopenharmony_ci    This is the build "verbosity flag."  If you specify `V=1` on the make command
1594beacf11bSopenharmony_ci    line, you will see the exact commands used in the build. This can be very
1595beacf11bSopenharmony_ci    useful when adding new boards or tracking down compile time errors and
1596beacf11bSopenharmony_ci    warnings (Contributed by Richard Cochran).
1597beacf11bSopenharmony_ci
1598beacf11bSopenharmony_ci## Native Windows Build
1599beacf11bSopenharmony_ci
1600beacf11bSopenharmony_ciThe beginnings of a Windows native build are in place but still not often
1601beacf11bSopenharmony_ciused as of this writing.  The build was functional but because of lack of
1602beacf11bSopenharmony_ciuse may find some issues to be resolved with this build configuration.
1603beacf11bSopenharmony_ci
1604beacf11bSopenharmony_ciThe windows native build logic initiated if CONFIG_WINDOWS_NATIVE=y is
1605beacf11bSopenharmony_cidefined in the NuttX configuration file:
1606beacf11bSopenharmony_ci
1607beacf11bSopenharmony_ciThis build:
1608beacf11bSopenharmony_ci
1609beacf11bSopenharmony_ci  - Uses all Windows style paths
1610beacf11bSopenharmony_ci  - Uses primarily Windows batch commands from cmd.exe, with
1611beacf11bSopenharmony_ci  - A few extensions from GNUWin32
1612beacf11bSopenharmony_ci
1613beacf11bSopenharmony_ciIn this build, you cannot use a Cygwin or MSYS shell. Rather the build must
1614beacf11bSopenharmony_cibe performed in a Windows console window. Here is a better terminal than the
1615beacf11bSopenharmony_cistandard issue, CMD.exe terminal:  ConEmu which can be downloaded from:
1616beacf11bSopenharmony_ci<https://sourceforge.net/projects/conemu/> or <https://conemu.github.io/>.
1617beacf11bSopenharmony_ci
1618beacf11bSopenharmony_ciBuild Tools.  The build still relies on some Unix-like commands.  I use
1619beacf11bSopenharmony_cithe GNUWin32 tools that can be downloaded from <http://gnuwin32.sourceforge.net/>
1620beacf11bSopenharmony_ciusing the *Download all* selection.  Individual packages can be download
1621beacf11bSopenharmony_ciinstead if you know what you are doing and want a faster download (No, I
1622beacf11bSopenharmony_cican't tell you which packages you should or should not download).
1623beacf11bSopenharmony_ci
1624beacf11bSopenharmony_ciNOTE:  It should be possible to use Cygwin or MSYS2 in place of the GNUWin32
1625beacf11bSopenharmony_citools.  There are, however, complexities in doing that because those tools
1626beacf11bSopenharmony_cidepend on the shell environment and use DLLs that are not found (at least
1627beacf11bSopenharmony_cinot without the correct setup).
1628beacf11bSopenharmony_ci
1629beacf11bSopenharmony_ciHost Compiler:  I use the MingGW GCC compiler which can be downloaded from
1630beacf11bSopenharmony_ci<http://www.mingw.org/>.  If you are using GNUWin32, then it is recommended
1631beacf11bSopenharmony_cithe you not install the optional MSYS components as there may be conflicts.
1632beacf11bSopenharmony_ci
1633beacf11bSopenharmony_ciKconfig-frontends:  See the section entitled "NuttX Configuration Tool
1634beacf11bSopenharmony_ciunder DOS" for information about installing the `kconfig-frontend` tools to
1635beacf11bSopenharmony_cirun natively under Windows.
1636beacf11bSopenharmony_ci
1637beacf11bSopenharmony_ciThis capability should still be considered a work in progress because:
1638beacf11bSopenharmony_ci
1639beacf11bSopenharmony_ci  1. It has not been verified on all targets and tools, and
1640beacf11bSopenharmony_ci  2. it still lacks some of the creature-comforts of the more mature
1641beacf11bSopenharmony_ci     environments.
1642beacf11bSopenharmony_ci
1643beacf11bSopenharmony_ci## Installing GNUWin32
1644beacf11bSopenharmony_ci
1645beacf11bSopenharmony_ci  The Windows native build will depend upon a few Unix-like tools that can be
1646beacf11bSopenharmony_ci  provided either by MSYS or GNUWin32.  The GNUWin32 are available from
1647beacf11bSopenharmony_ci  <http://gnuwin32.sourceforge.net/>.  GNUWin32 provides ports of tools with a
1648beacf11bSopenharmony_ci  GPL or similar open source license to modern MS-Windows (Microsoft Windows
1649beacf11bSopenharmony_ci  2000 / XP / 2003 / Vista / 2008 / 7).  See
1650beacf11bSopenharmony_ci  <http://gnuwin32.sourceforge.net/packages.html> for a list of all of the tools
1651beacf11bSopenharmony_ci  available in the GNUWin32 package.
1652beacf11bSopenharmony_ci
1653beacf11bSopenharmony_ci  The SourceForge project is located here:
1654beacf11bSopenharmony_ci  <http://sourceforge.net/projects/gnuwin32/>.  The project is still being
1655beacf11bSopenharmony_ci  actively supported (although some of the Windows ports have gotten very old).
1656beacf11bSopenharmony_ci
1657beacf11bSopenharmony_ci  Some commercial toolchains include a subset of the GNUWin32 tools in the
1658beacf11bSopenharmony_ci  installation.  My recommendation is that you download the GNUWin32 tools
1659beacf11bSopenharmony_ci  directly from the sourceforge.net website so that you will know what you are
1660beacf11bSopenharmony_ci  using and can reproduce your build environment.
1661beacf11bSopenharmony_ci
1662beacf11bSopenharmony_ci  GNUWin32 Installation Steps:
1663beacf11bSopenharmony_ci
1664beacf11bSopenharmony_ci  The following steps will download and execute the GNUWin32 installer.
1665beacf11bSopenharmony_ci
1666beacf11bSopenharmony_ci1. Download `GetGNUWin32-x.x.x.exe` from
1667beacf11bSopenharmony_ci   <http://sourceforge.net/projects/getgnuwin32/files/>.  This is the
1668beacf11bSopenharmony_ci   installer.  The current version as of this writing is 0.6.3.
1669beacf11bSopenharmony_ci
1670beacf11bSopenharmony_ci2. Run the installer.
1671beacf11bSopenharmony_ci
1672beacf11bSopenharmony_ci3. Accept the license.
1673beacf11bSopenharmony_ci
1674beacf11bSopenharmony_ci4. Select the installation directory.  My recommendation is the
1675beacf11bSopenharmony_ci   directory that contains this README file (`<this-directory>`).
1676beacf11bSopenharmony_ci
1677beacf11bSopenharmony_ci5. After running `GetGNUWin32-0.x.x.exe`, you will have a new directory
1678beacf11bSopenharmony_ci   `<this-directory>/GetGNUWin32`
1679beacf11bSopenharmony_ci
1680beacf11bSopenharmony_ci   Note that the GNUWin32 installer didn't install GNUWin32.  Instead, it
1681beacf11bSopenharmony_ci   installed another, smarter downloader.  That downloader is the GNUWin32
1682beacf11bSopenharmony_ci   package management tool developed by the Open SSL project.
1683beacf11bSopenharmony_ci
1684beacf11bSopenharmony_ci   The following steps probably should be performed from inside a DOS shell.
1685beacf11bSopenharmony_ci
1686beacf11bSopenharmony_ci6. Change to the directory created by `GetGNUWin32-x.x.x.exe`
1687beacf11bSopenharmony_ci
1688beacf11bSopenharmony_ci      cd GetGNUWin32
1689beacf11bSopenharmony_ci
1690beacf11bSopenharmony_ci7. Execute the download.bat script.  The download.bat script will download
1691beacf11bSopenharmony_ci   about 446 packages!  Enough to have a very complete Linux-like environment
1692beacf11bSopenharmony_ci   under the DOS shell.  This will take awhile.  This step only downloads
1693beacf11bSopenharmony_ci   the packages and the next step will install the packages.
1694beacf11bSopenharmony_ci
1695beacf11bSopenharmony_ci      download
1696beacf11bSopenharmony_ci
1697beacf11bSopenharmony_ci8. This step will install the downloaded packages.  The argument of the
1698beacf11bSopenharmony_ci   install.bat script is the installation location.  C:\gnuwin32 is the
1699beacf11bSopenharmony_ci   standard install location:
1700beacf11bSopenharmony_ci
1701beacf11bSopenharmony_ci     install C:\gnuwin32
1702beacf11bSopenharmony_ci
1703beacf11bSopenharmony_ci  **NOTE**:  This installation step will install *all* GNUWin32 packages... far
1704beacf11bSopenharmony_ci  more than you will ever need.  If disc space is a problem for you, you might
1705beacf11bSopenharmony_ci  need to perform a manual installation of the individual ZIP files that you
1706beacf11bSopenharmony_ci  will find in the `<this directory>/GetGNUWin32/packages` directory.
1707beacf11bSopenharmony_ci
1708beacf11bSopenharmony_ci9. Make sure that you add the GNUWin32 tools to your path variable:
1709beacf11bSopenharmony_ci
1710beacf11bSopenharmony_ci         set PATH=C:\gnuwin32\bin;%PATH%
1711beacf11bSopenharmony_ci
1712beacf11bSopenharmony_ci  **WARNING**:  Make sure you have `C:\MinGW\bin` in your path before any other
1713beacf11bSopenharmony_ci  directory that contains `libiconv-2.dll`. Apparently the `as.exe` in some
1714beacf11bSopenharmony_ci  MinGW distributions are dependent on that DLL, and having an old
1715beacf11bSopenharmony_ci  version of it in the path somewhere (for example GnuWin32 tools) will
1716beacf11bSopenharmony_ci  cause as.exe to pick up the older version that doesn't have the entry
1717beacf11bSopenharmony_ci  point it's looking for.
1718beacf11bSopenharmony_ci
1719beacf11bSopenharmony_ci# CYGWIN BUILD PROBLEMS
1720beacf11bSopenharmony_ci
1721beacf11bSopenharmony_ci## Performance
1722beacf11bSopenharmony_ci
1723beacf11bSopenharmony_ciBuild performance under Cygwin is really not so bad, certainly not as good
1724beacf11bSopenharmony_cias a Linux build.  However, often you will find that the performance is
1725beacf11bSopenharmony_cinot just bad but terrible.  If you are seeing awful performance.. like two
1726beacf11bSopenharmony_cior three compilations per second.. the culprit is usually your Windows
1727beacf11bSopenharmony_ciAnti-Virus protection interfering with the build tool program execution.
1728beacf11bSopenharmony_ci
1729beacf11bSopenharmony_ciI use Cygwin quite often and I use Windows Defender.  In order to get good
1730beacf11bSopenharmony_cibuild performance, I routinely keep the Windows Defender "Virus & Threat
1731beacf11bSopenharmony_ciProtections Settings" screen up:  I disable "Real-Time Protection" just
1732beacf11bSopenharmony_cibefore entering 'make' then turn "Real-Time Protection" back on when the
1733beacf11bSopenharmony_cibuild completes.  With this additional nuisance step, I find that build
1734beacf11bSopenharmony_ciperformance under Cygwin is completely acceptable.
1735beacf11bSopenharmony_ci
1736beacf11bSopenharmony_ci## Strange Path Problems
1737beacf11bSopenharmony_ci
1738beacf11bSopenharmony_ciIf you see strange behavior when building under Cygwin then you may have
1739beacf11bSopenharmony_cia problem with your PATH variable.  For example, if you see failures to
1740beacf11bSopenharmony_cilocate files that are clearly present, that may mean that you are using
1741beacf11bSopenharmony_cithe wrong version of a tool.  For example, you may not be using Cygwin's
1742beacf11bSopenharmony_ci'make' program at /usr/bin/make.  Try:
1743beacf11bSopenharmony_ci
1744beacf11bSopenharmony_ci    which make
1745beacf11bSopenharmony_ci    /usr/bin/make
1746beacf11bSopenharmony_ci
1747beacf11bSopenharmony_ciWhen you install some toolchains (such as Yargarto or CodeSourcery tools),
1748beacf11bSopenharmony_cithey may modify your PATH variable to include a path to their binaries.
1749beacf11bSopenharmony_ciAt that location, they may have GNUWin32 versions of the tools.  So you
1750beacf11bSopenharmony_cimight actually be using a version of make that does not understand Cygwin
1751beacf11bSopenharmony_cipaths.
1752beacf11bSopenharmony_ci
1753beacf11bSopenharmony_ciThe solution is either:
1754beacf11bSopenharmony_ci
1755beacf11bSopenharmony_ci  1. Edit your PATH to remove the path to the GNUWin32 tools, or
1756beacf11bSopenharmony_ci
1757beacf11bSopenharmony_ci  2. Put /usr/local/bin, /usr/bin, and /bin at the front of your path:
1758beacf11bSopenharmony_ci
1759beacf11bSopenharmony_ci         export PATH=/usr/local/bin:/usr/bin:/bin:$PATH
1760beacf11bSopenharmony_ci
1761beacf11bSopenharmony_ci## Window Native Toolchain Issues
1762beacf11bSopenharmony_ci
1763beacf11bSopenharmony_ciThere are many popular Windows native toolchains that may be used with NuttX.
1764beacf11bSopenharmony_ciExamples include CodeSourcery (for Windows), devkitARM, and several vendor-
1765beacf11bSopenharmony_ciprovided toolchains.  There are several limitations with using a and Windows
1766beacf11bSopenharmony_cibased toolchain in a Cygwin environment.  The three biggest are:
1767beacf11bSopenharmony_ci
1768beacf11bSopenharmony_ci  1. The Windows toolchain cannot follow Cygwin paths.  Path conversions are
1769beacf11bSopenharmony_ci     performed automatically in the Cygwin makefiles using the 'cygpath' utility
1770beacf11bSopenharmony_ci     but you might easily find some new path problems.  If so, check out 'cygpath -w'
1771beacf11bSopenharmony_ci
1772beacf11bSopenharmony_ci  2. Windows toolchains cannot follow Cygwin symbolic links.  Many symbolic links
1773beacf11bSopenharmony_ci     are used in NuttX (e.g., include/arch).  The make system works around these
1774beacf11bSopenharmony_ci     problems for the Windows tools by copying directories instead of linking them.
1775beacf11bSopenharmony_ci     But this can also cause some confusion for you:  For example, you may edit
1776beacf11bSopenharmony_ci     a file in a "linked" directory and find that your changes had no effect.
1777beacf11bSopenharmony_ci     That is because you are building the copy of the file in the "fake" symbolic
1778beacf11bSopenharmony_ci     directory.  If you use a Windows toolchain, you should get in the habit of
1779beacf11bSopenharmony_ci     making like this:
1780beacf11bSopenharmony_ci
1781beacf11bSopenharmony_ci         make clean_context all
1782beacf11bSopenharmony_ci
1783beacf11bSopenharmony_ci     An alias in your .bashrc file might make that less painful.  The rebuild
1784beacf11bSopenharmony_ci     is not a long as you might think because there is no dependency checking
1785beacf11bSopenharmony_ci     if you are using a native Windows toolchain.  That bring us to #3:
1786beacf11bSopenharmony_ci
1787beacf11bSopenharmony_ci## General Pre-built Toolchain Issues
1788beacf11bSopenharmony_ci
1789beacf11bSopenharmony_ciTo continue with the list of "Window Native Toolchain Issues" we can add
1790beacf11bSopenharmony_cithe following.  These, however, are really just issues that you will have
1791beacf11bSopenharmony_ciif you use any pre-built toolchain (vs. building the NuttX toolchain from
1792beacf11bSopenharmony_cithe NuttX buildroot package):
1793beacf11bSopenharmony_ci
1794beacf11bSopenharmony_ciThere may be incompatibilities with header files, libraries, and compiler
1795beacf11bSopenharmony_cibuilt-in functions detailed below.  For the most part, these issues
1796beacf11bSopenharmony_ciare handled in the existing make logic.  But if you are breaking new ground,
1797beacf11bSopenharmony_cithen you may encounter these:
1798beacf11bSopenharmony_ci
1799beacf11bSopenharmony_ci  1. Header Files.  Most pre-built toolchains will build with a foreign C
1800beacf11bSopenharmony_ci     library (usually newlib, but maybe uClibc or glibc if you are using a
1801beacf11bSopenharmony_ci     Linux toolchain).  This means that the header files from the foreign
1802beacf11bSopenharmony_ci     C library will be built into the toolchain.  So if you `#include <stdio.h>`,
1803beacf11bSopenharmony_ci     you will get the stdio.h from the incompatible, foreign C library and
1804beacf11bSopenharmony_ci     not the nuttx `stdio.h` (at `nuttx/include/stdio.h`) that you wanted.
1805beacf11bSopenharmony_ci
1806beacf11bSopenharmony_ci     This can cause confusion in the builds and you must always be
1807beacf11bSopenharmony_ci     sure the `-nostdinc` is included in the `CFLAGS`.  That will assure that
1808beacf11bSopenharmony_ci     you take the include files only from
1809beacf11bSopenharmony_ci
1810beacf11bSopenharmony_ci  2. Libraries.  What was said above header files applies to libraries.
1811beacf11bSopenharmony_ci     You do not want to include code from the libraries of any foreign
1812beacf11bSopenharmony_ci     C libraries built into your toolchain.  If this happens you will get
1813beacf11bSopenharmony_ci     perplexing errors about undefined symbols.  To avoid these errors,
1814beacf11bSopenharmony_ci     you will need to add `-nostdlib` to your `CFLAGS` flags to assure that
1815beacf11bSopenharmony_ci     you only take code from the NuttX libraries.
1816beacf11bSopenharmony_ci
1817beacf11bSopenharmony_ci     This, however, may causes other issues for libraries in the toolchain
1818beacf11bSopenharmony_ci     that you do want (like `libgcc.a` or `libm.a`).  These are special-cased
1819beacf11bSopenharmony_ci     in most Makefiles, but you could still run into issues of missing
1820beacf11bSopenharmony_ci     libraries.
1821beacf11bSopenharmony_ci
1822beacf11bSopenharmony_ci  3. Built-Ins.  Some compilers target a particular operating system.
1823beacf11bSopenharmony_ci     Many people would, for example, like to use the same toolchain to
1824beacf11bSopenharmony_ci     develop Linux and NuttX software.  Compilers built for other
1825beacf11bSopenharmony_ci     operating systems may generate incompatible built-in logic and,
1826beacf11bSopenharmony_ci     for this reason, `-fno-builtin` should also be included in your
1827beacf11bSopenharmony_ci     C flags
1828beacf11bSopenharmony_ci
1829beacf11bSopenharmony_ci     And finally you may not be able to use NXFLAT.
1830beacf11bSopenharmony_ci
1831beacf11bSopenharmony_ci  4. NXFLAT. If you use a pre-built toolchain, you will lose all support
1832beacf11bSopenharmony_ci     for NXFLAT.  NXFLAT is a binary format described in
1833beacf11bSopenharmony_ci     Documentation/NuttXNxFlat.html.  It may be possible to build
1834beacf11bSopenharmony_ci     standalone versions of the NXFLAT tools; there are a few examples
1835beacf11bSopenharmony_ci     of this in the buildroot repository at <https://bitbucket.org/nuttx/buildroot>
1836beacf11bSopenharmony_ci     However, it is possible that there could be interoperability issues
1837beacf11bSopenharmony_ci     with your toolchain since they will be using different versions of
1838beacf11bSopenharmony_ci     binutils and possibly different ABIs.
1839beacf11bSopenharmony_ci
1840beacf11bSopenharmony_ci## Building Original Linux Boards in Cygwin
1841beacf11bSopenharmony_ci
1842beacf11bSopenharmony_ciSome default board configurations are set to build under Linux and others
1843beacf11bSopenharmony_cito build under Windows with Cygwin.  Various default toolchains may also
1844beacf11bSopenharmony_cibe used in each configuration.  It is possible to change the default
1845beacf11bSopenharmony_cisetup.  Here, for example, is what you must do in order to compile a
1846beacf11bSopenharmony_cidefault Linux configuration in the Cygwin environment using the
1847beacf11bSopenharmony_ciCodeSourcery for Windows toolchain.  After instantiating a "canned"
1848beacf11bSopenharmony_ciNuttX configuration, run the target 'menuconfig' and set the following
1849beacf11bSopenharmony_ciitems:
1850beacf11bSopenharmony_ci
1851beacf11bSopenharmony_ci    Build Setup->Build Host Platform->Windows
1852beacf11bSopenharmony_ci    Build Setup->Windows Build Environment->Cygwin
1853beacf11bSopenharmony_ci    System Type->Toolchain Selection->CodeSourcery GNU Toolchain under Windows
1854beacf11bSopenharmony_ci
1855beacf11bSopenharmony_ciIn Windows 7 it may be required to open the Cygwin shell as Administrator
1856beacf11bSopenharmony_ci("Run As" option, right button) you find errors like "Permission denied".
1857beacf11bSopenharmony_ci
1858beacf11bSopenharmony_ci## Recovering from Bad Configurations
1859beacf11bSopenharmony_ci
1860beacf11bSopenharmony_ciMany people make the mistake of configuring NuttX with the "canned"
1861beacf11bSopenharmony_ciconfiguration and then just typing `make` with disastrous consequences;
1862beacf11bSopenharmony_cithe build may fail with mysterious, uninterpretable, and irrecoverable
1863beacf11bSopenharmony_cibuild errors.  If, for example, you do this with an unmodified Linux
1864beacf11bSopenharmony_ciconfiguration in a Windows/Cgwin environment, you will corrupt the
1865beacf11bSopenharmony_cibuild environment.  The environment will be corrupted because of POSIX vs
1866beacf11bSopenharmony_ciWindows path issues and with issues related to symbolic links.  If you
1867beacf11bSopenharmony_cimake the mistake of doing this, the easiest way to recover is to just
1868beacf11bSopenharmony_cistart over: Do `make distclean` to remove every trace of the corrupted
1869beacf11bSopenharmony_ciconfiguration, reconfigure from scratch, and make certain that the set
1870beacf11bSopenharmony_cithe configuration correctly for your platform before attempting to make
1871beacf11bSopenharmony_ciagain.
1872beacf11bSopenharmony_ci
1873beacf11bSopenharmony_ciJust fixing the configuration file after you have instantiated the bad
1874beacf11bSopenharmony_ciconfiguration with 'make' is not enough.
1875beacf11bSopenharmony_ci
1876beacf11bSopenharmony_ci# DOCUMENTATION
1877beacf11bSopenharmony_ci
1878beacf11bSopenharmony_ciAdditional information can be found in the Documentation/ directory and
1879beacf11bSopenharmony_cialso in README files that are scattered throughout the source tree.  The
1880beacf11bSopenharmony_cidocumentation is in HTML and can be access by loading the following file
1881beacf11bSopenharmony_ciinto your Web browser:
1882beacf11bSopenharmony_ci
1883beacf11bSopenharmony_ci    Documentation/index.html
1884beacf11bSopenharmony_ci
1885beacf11bSopenharmony_ciNuttX documentation is also available online at <https://nuttx.apache.org/>.
1886beacf11bSopenharmony_ci
1887beacf11bSopenharmony_ciBelow is a guide to the available README files in the NuttX source tree:
1888beacf11bSopenharmony_ci
1889beacf11bSopenharmony_ci    nuttx/
1890beacf11bSopenharmony_ci     |
1891beacf11bSopenharmony_ci     |- arch/
1892beacf11bSopenharmony_ci     |   |
1893beacf11bSopenharmony_ci     |   |- arm/
1894beacf11bSopenharmony_ci     |   |   `- src
1895beacf11bSopenharmony_ci     |   |       |- common
1896beacf11bSopenharmony_ci     |   |       |   `- README_lwl_console.txt
1897beacf11bSopenharmony_ci     |   |       |- lpc214x
1898beacf11bSopenharmony_ci     |   |       |    `-README.txt
1899beacf11bSopenharmony_ci     |   |       `- stm32l4
1900beacf11bSopenharmony_ci     |   |           `- README.txt
1901beacf11bSopenharmony_ci     |   |- renesas/
1902beacf11bSopenharmony_ci     |   |   |- include/
1903beacf11bSopenharmony_ci     |   |   |   `-README.txt
1904beacf11bSopenharmony_ci     |   |   |- src/
1905beacf11bSopenharmony_ci     |   |   |   `-README.txt
1906beacf11bSopenharmony_ci     |   |- x86/
1907beacf11bSopenharmony_ci     |   |   |- include/
1908beacf11bSopenharmony_ci     |   |   |   `-README.txt
1909beacf11bSopenharmony_ci     |   |   `- src/
1910beacf11bSopenharmony_ci     |   |       `-README.txt
1911beacf11bSopenharmony_ci     |   `- z80/
1912beacf11bSopenharmony_ci     |   |   `- src/
1913beacf11bSopenharmony_ci     |   |       |- z80/README.txt
1914beacf11bSopenharmony_ci     |   |       `- z180/README.txt, z180_mmu.txt
1915beacf11bSopenharmony_ci     |   `- README.txt
1916beacf11bSopenharmony_ci     |- audio/
1917beacf11bSopenharmony_ci     |   `-README.txt
1918beacf11bSopenharmony_ci     |- boards/
1919beacf11bSopenharmony_ci     |   |- arm/
1920beacf11bSopenharmony_ci     |   |   |- a1x/
1921beacf11bSopenharmony_ci     |   |   |   `- pcduino-a10/
1922beacf11bSopenharmony_ci     |   |   |       `- README.txt
1923beacf11bSopenharmony_ci     |   |   |- am335x/
1924beacf11bSopenharmony_ci     |   |   |   `- beaglebone-black/
1925beacf11bSopenharmony_ci     |   |   |       `- README.txt
1926beacf11bSopenharmony_ci     |   |   |- c5471/
1927beacf11bSopenharmony_ci     |   |   |   `- c5471evm/
1928beacf11bSopenharmony_ci     |   |   |       `- README.txt
1929beacf11bSopenharmony_ci     |   |   |- cxd56xx/
1930beacf11bSopenharmony_ci     |   |   |   `- spresense/
1931beacf11bSopenharmony_ci     |   |   |       `- README.txt
1932beacf11bSopenharmony_ci     |   |   |- dm320/
1933beacf11bSopenharmony_ci     |   |   |   `- ntosd-dm320/
1934beacf11bSopenharmony_ci     |   |   |       |- doc/README.txt
1935beacf11bSopenharmony_ci     |   |   |       `- README.txt
1936beacf11bSopenharmony_ci     |   |   |- efm32/
1937beacf11bSopenharmony_ci     |   |   |   |- efm32-g8xx-stk/
1938beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1939beacf11bSopenharmony_ci     |   |   |   |- efm32gg-stk3700/
1940beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1941beacf11bSopenharmony_ci     |   |   |   `- olimex-efm32g880f128-stk/
1942beacf11bSopenharmony_ci     |   |   |       `- README.txt
1943beacf11bSopenharmony_ci     |   |   |- imx6/
1944beacf11bSopenharmony_ci     |   |   |   `- sabre-6quad/
1945beacf11bSopenharmony_ci     |   |   |       `- README.txt
1946beacf11bSopenharmony_ci     |   |   |- imxrt/
1947beacf11bSopenharmony_ci     |   |   |   |- imxrt1050-evk/
1948beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1949beacf11bSopenharmony_ci     |   |   |   |- imxrt1060-evk/
1950beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1951beacf11bSopenharmony_ci     |   |   |   `- teensy-4.x/
1952beacf11bSopenharmony_ci     |   |   |       `- README.txt
1953beacf11bSopenharmony_ci     |   |   |- kinetis/
1954beacf11bSopenharmony_ci     |   |   |   |- freedom-k28f/
1955beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1956beacf11bSopenharmony_ci     |   |   |   |- freedom-k64f/
1957beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1958beacf11bSopenharmony_ci     |   |   |   |- freedom-k66f/
1959beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1960beacf11bSopenharmony_ci     |   |   |   |- kwikstik-k40/
1961beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1962beacf11bSopenharmony_ci     |   |   |   |- teensy-3.x/
1963beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1964beacf11bSopenharmony_ci     |   |   |   |- twr-k60n512/
1965beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1966beacf11bSopenharmony_ci     |   |   |   `- twr-k64f120m/
1967beacf11bSopenharmony_ci     |   |   |       `- README.txt
1968beacf11bSopenharmony_ci     |   |   |- kl/
1969beacf11bSopenharmony_ci     |   |   |   |- freedom-kl25z/
1970beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1971beacf11bSopenharmony_ci     |   |   |   |- freedom-kl26z/
1972beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1973beacf11bSopenharmony_ci     |   |   |   `- teensy-lc/
1974beacf11bSopenharmony_ci     |   |   |       `- README.txt
1975beacf11bSopenharmony_ci     |   |   |- lc823450/
1976beacf11bSopenharmony_ci     |   |   |   `- lc823450-xgevk/
1977beacf11bSopenharmony_ci     |   |   |       `- README.txt
1978beacf11bSopenharmony_ci     |   |   |- lpc17xx_40xx/
1979beacf11bSopenharmony_ci     |   |   |   |- lincoln60/
1980beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1981beacf11bSopenharmony_ci     |   |   |   |- lpc4088-devkit/
1982beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1983beacf11bSopenharmony_ci     |   |   |   |- lpc4088-quickstart/
1984beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1985beacf11bSopenharmony_ci     |   |   |   |- lpcxpresso-lpc1768/
1986beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1987beacf11bSopenharmony_ci     |   |   |   |- lx_cpu/
1988beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1989beacf11bSopenharmony_ci     |   |   |   |- mbed/
1990beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1991beacf11bSopenharmony_ci     |   |   |   |- mcb1700/
1992beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1993beacf11bSopenharmony_ci     |   |   |   |- olimex-lpc1766stk/
1994beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1995beacf11bSopenharmony_ci     |   |   |   |- open1788/
1996beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1997beacf11bSopenharmony_ci     |   |   |   |- pnev5180b/
1998beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
1999beacf11bSopenharmony_ci     |   |   |   |- u-blox-c027/
2000beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2001beacf11bSopenharmony_ci     |   |   |   `- zkit-arm-1769/
2002beacf11bSopenharmony_ci     |   |   |       `- README.txt
2003beacf11bSopenharmony_ci     |   |   |- lpc214x/
2004beacf11bSopenharmony_ci     |   |   |   |- mcu123-lpc214x/
2005beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2006beacf11bSopenharmony_ci     |   |   |   `- zp214xpa/
2007beacf11bSopenharmony_ci     |   |   |       `- README.txt
2008beacf11bSopenharmony_ci     |   |   |- lpc2378/
2009beacf11bSopenharmony_ci     |   |   |   `- olimex-lpc2378/
2010beacf11bSopenharmony_ci     |   |   |       `- README.txt
2011beacf11bSopenharmony_ci     |   |   |- lpc31xx/
2012beacf11bSopenharmony_ci     |   |   |   |- ea3131/
2013beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2014beacf11bSopenharmony_ci     |   |   |   |- ea3152/
2015beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2016beacf11bSopenharmony_ci     |   |   |   `- olimex-lpc-h3131/
2017beacf11bSopenharmony_ci     |   |   |       `- README.txt
2018beacf11bSopenharmony_ci     |   |   |- lpc43xx/
2019beacf11bSopenharmony_ci     |   |   |   |- bambino-200e/
2020beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2021beacf11bSopenharmony_ci     |   |   |   |- lpc4330-xplorer/
2022beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2023beacf11bSopenharmony_ci     |   |   |   |- lpc4337-ws/
2024beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2025beacf11bSopenharmony_ci     |   |   |   |- lpc4357-evb/
2026beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2027beacf11bSopenharmony_ci     |   |   |   `- lpc4370-link2/
2028beacf11bSopenharmony_ci     |   |   |       `- README.txt
2029beacf11bSopenharmony_ci     |   |   |- lpc54xx/
2030beacf11bSopenharmony_ci     |   |   |   `- lpcxpresso-lpc54628/
2031beacf11bSopenharmony_ci     |   |   |       `- README.txt
2032beacf11bSopenharmony_ci     |   |   |- max326xx/
2033beacf11bSopenharmony_ci     |   |   |   `- max32660-evsys/
2034beacf11bSopenharmony_ci     |   |   |       `- README.txt
2035beacf11bSopenharmony_ci     |   |   |- moxart/
2036beacf11bSopenharmony_ci     |   |   |   `- moxa/
2037beacf11bSopenharmony_ci     |   |   |- nrf52/
2038beacf11bSopenharmony_ci     |   |   |   `- nrf52-generic/
2039beacf11bSopenharmony_ci     |   |   |       `- README.txt
2040beacf11bSopenharmony_ci     |   |   |- nuc1xx/
2041beacf11bSopenharmony_ci     |   |   |   `- nutiny-nuc120/
2042beacf11bSopenharmony_ci     |   |   |       `- README.txt
2043beacf11bSopenharmony_ci     |   |   |- s32k1xx/
2044beacf11bSopenharmony_ci     |   |   |   |- s32k118evb/
2045beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2046beacf11bSopenharmony_ci     |   |   |   |- s32k146evb/
2047beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2048beacf11bSopenharmony_ci     |   |   |   `- s32k148evb/
2049beacf11bSopenharmony_ci     |   |   |       `- README.txt
2050beacf11bSopenharmony_ci     |   |   |- sam34/
2051beacf11bSopenharmony_ci     |   |   |   |- arduino-due/
2052beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2053beacf11bSopenharmony_ci     |   |   |   |- flipnclick-sam3x/
2054beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2055beacf11bSopenharmony_ci     |   |   |   |- sam3u-ek/
2056beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2057beacf11bSopenharmony_ci     |   |   |   |- sam4cmp-db/
2058beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2059beacf11bSopenharmony_ci     |   |   |   |- sam4e-ek/
2060beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2061beacf11bSopenharmony_ci     |   |   |   |- sam4l-xplained/
2062beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2063beacf11bSopenharmony_ci     |   |   |   |- sam4s-xplained/
2064beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2065beacf11bSopenharmony_ci     |   |   |   `- sam4s-xplained-pro/
2066beacf11bSopenharmony_ci     |   |   |       `- README.txt
2067beacf11bSopenharmony_ci     |   |   |- sama5/
2068beacf11bSopenharmony_ci     |   |   |   |- sama5d2-xult/
2069beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2070beacf11bSopenharmony_ci     |   |   |   |- giant-board/
2071beacf11bSopenharmony_ci     |   |   |   |   `- README.md
2072beacf11bSopenharmony_ci     |   |   |   |- sama5d3x-ek/
2073beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2074beacf11bSopenharmony_ci     |   |   |   |- sama5d3-xplained/
2075beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2076beacf11bSopenharmony_ci     |   |   |   `- sama5d4-ek/
2077beacf11bSopenharmony_ci     |   |   |       `- README.txt
2078beacf11bSopenharmony_ci     |   |   |- samd2l2/
2079beacf11bSopenharmony_ci     |   |   |   |- arduino-m0/
2080beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2081beacf11bSopenharmony_ci     |   |   |   |- samd20-xplained/
2082beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2083beacf11bSopenharmony_ci     |   |   |   |- samd21-xplained/
2084beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2085beacf11bSopenharmony_ci     |   |   |   `- saml21-xplained/
2086beacf11bSopenharmony_ci     |   |   |       `- README.txt
2087beacf11bSopenharmony_ci     |   |   |- samd5e5/
2088beacf11bSopenharmony_ci     |   |   |   `- metro-m4/
2089beacf11bSopenharmony_ci     |   |   |      `- README.txt
2090beacf11bSopenharmony_ci     |   |   |- samv7/
2091beacf11bSopenharmony_ci     |   |   |   |- same70-qmtech/
2092beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2093beacf11bSopenharmony_ci     |   |   |   |- same70-xplained/
2094beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2095beacf11bSopenharmony_ci     |   |   |   `- samv71-xult/
2096beacf11bSopenharmony_ci     |   |   |      `- README.txt
2097beacf11bSopenharmony_ci     |   |   |- stm32/
2098beacf11bSopenharmony_ci     |   |   |   |- axoloti/
2099beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2100beacf11bSopenharmony_ci     |   |   |   |- b-g474e-dpow1/
2101beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2102beacf11bSopenharmony_ci     |   |   |   |- clicker2-stm32/
2103beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2104beacf11bSopenharmony_ci     |   |   |   |- cloudctrl/
2105beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2106beacf11bSopenharmony_ci     |   |   |   |- emw3162/
2107beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2108beacf11bSopenharmony_ci     |   |   |   |- fire-stm32v2/
2109beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2110beacf11bSopenharmony_ci     |   |   |   |- hymini-stm32v/
2111beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2112beacf11bSopenharmony_ci     |   |   |   |- maple/
2113beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2114beacf11bSopenharmony_ci     |   |   |   |- mikroe-stm32f4/
2115beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2116beacf11bSopenharmony_ci     |   |   |   |- nucleo-f103rb/
2117beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2118beacf11bSopenharmony_ci     |   |   |   |- nucleo-f207zg/
2119beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2120beacf11bSopenharmony_ci     |   |   |   |- nucleo-f302r8/
2121beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2122beacf11bSopenharmony_ci     |   |   |   |- nucleo-f303re/
2123beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2124beacf11bSopenharmony_ci     |   |   |   |- nucleo-f303ze/
2125beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2126beacf11bSopenharmony_ci     |   |   |   |- nucleo-f334r8/
2127beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2128beacf11bSopenharmony_ci     |   |   |   |- nucleo-f410rb/
2129beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2130beacf11bSopenharmony_ci     |   |   |   |- nucleo-f446re/
2131beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2132beacf11bSopenharmony_ci     |   |   |   |- nucleo-f4x1re/
2133beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2134beacf11bSopenharmony_ci     |   |   |   |- nucleo-l152re/
2135beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2136beacf11bSopenharmony_ci     |   |   |   |- olimexino-stm32/
2137beacf11bSopenharmony_ci     |   |   |   |- olimex-stm32-e407/
2138beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2139beacf11bSopenharmony_ci     |   |   |   |- olimex-stm32-h405/
2140beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2141beacf11bSopenharmony_ci     |   |   |   |- olimex-stm32-h407/
2142beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2143beacf11bSopenharmony_ci     |   |   |   |- olimex-stm32-p107/
2144beacf11bSopenharmony_ci     |   |   |   |- olimex-stm32-p207/
2145beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2146beacf11bSopenharmony_ci     |   |   |   |- olimex-stm32-p407/
2147beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2148beacf11bSopenharmony_ci     |   |   |   |- omnibusf4/
2149beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2150beacf11bSopenharmony_ci     |   |   |   |- photon/
2151beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2152beacf11bSopenharmony_ci     |   |   |   |- shenzhou/
2153beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2154beacf11bSopenharmony_ci     |   |   |   |- stm32_tiny/
2155beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2156beacf11bSopenharmony_ci     |   |   |   |- stm3210e-eval/
2157beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2158beacf11bSopenharmony_ci     |   |   |   |- stm3220g-eval/
2159beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2160beacf11bSopenharmony_ci     |   |   |   |- stm3240g-eval/
2161beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2162beacf11bSopenharmony_ci     |   |   |   |- stm32butterfly2/
2163beacf11bSopenharmony_ci     |   |   |   |- stm32f103-minimum/
2164beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2165beacf11bSopenharmony_ci     |   |   |   |- stm32f334-disco/
2166beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2167beacf11bSopenharmony_ci     |   |   |   |- stm32f3discovery/
2168beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2169beacf11bSopenharmony_ci     |   |   |   |- stm32f411e-disco/
2170beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2171beacf11bSopenharmony_ci     |   |   |   |- stm32f429i-disco/
2172beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2173beacf11bSopenharmony_ci     |   |   |   |- stm32f4discovery/
2174beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2175beacf11bSopenharmony_ci     |   |   |   |- stm32ldiscovery/
2176beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2177beacf11bSopenharmony_ci     |   |   |   |- stm32vldiscovery/
2178beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2179beacf11bSopenharmony_ci     |   |   |   `- viewtool-stm32f107/
2180beacf11bSopenharmony_ci     |   |   |       `- README.txt
2181beacf11bSopenharmony_ci     |   |   |- stm32f0l0g0/
2182beacf11bSopenharmony_ci     |   |   |   |- b-l072z-lrwan1/
2183beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2184beacf11bSopenharmony_ci     |   |   |   |- nucleo-f072rb/
2185beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2186beacf11bSopenharmony_ci     |   |   |   |- nucleo-f091rc/
2187beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2188beacf11bSopenharmony_ci     |   |   |   |- nucleo-g070rb/
2189beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2190beacf11bSopenharmony_ci     |   |   |   |- nucleo-g071rb/
2191beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2192beacf11bSopenharmony_ci     |   |   |   |- nucleo-l073rz/
2193beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2194beacf11bSopenharmony_ci     |   |   |   |- stm32f051-discovery/
2195beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2196beacf11bSopenharmony_ci     |   |   |   `- stm32f072-discovery/
2197beacf11bSopenharmony_ci     |   |   |       `- README.txt
2198beacf11bSopenharmony_ci     |   |   |- stm32f7/
2199beacf11bSopenharmony_ci     |   |   |   |- nucleo-144/
2200beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2201beacf11bSopenharmony_ci     |   |   |   |- stm32f746g-disco/
2202beacf11bSopenharmony_ci     |   |   |   |   |- configs/fb/README.txt
2203beacf11bSopenharmony_ci     |   |   |   |   |- configs/nxdemo/README.txt
2204beacf11bSopenharmony_ci     |   |   |   |   |- configs/nxterm/README.txt
2205beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2206beacf11bSopenharmony_ci     |   |   |   |- stm32f746-ws/
2207beacf11bSopenharmony_ci     |   |   |   `- stm32f769i-disco/
2208beacf11bSopenharmony_ci     |   |   |       `- README.txt
2209beacf11bSopenharmony_ci     |   |   |- stm32h7/
2210beacf11bSopenharmony_ci     |   |   |   `- nucleo-h743zi/
2211beacf11bSopenharmony_ci     |   |   |       `- README.txt
2212beacf11bSopenharmony_ci     |   |   |- stm32l4/
2213beacf11bSopenharmony_ci     |   |   |   |- b-l475e-iot01a/
2214beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2215beacf11bSopenharmony_ci     |   |   |   |- nucleo-l432kc/
2216beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2217beacf11bSopenharmony_ci     |   |   |   |- nucleo-l452re/
2218beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2219beacf11bSopenharmony_ci     |   |   |   |- nucleo-l476rg/
2220beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2221beacf11bSopenharmony_ci     |   |   |   |- nucleo-l496zg/
2222beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2223beacf11bSopenharmony_ci     |   |   |   |- stm32l476-mdk/
2224beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2225beacf11bSopenharmony_ci     |   |   |   |- stm32l476vg-disco/
2226beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2227beacf11bSopenharmony_ci     |   |   |   `- stm32l4r9ai-disco/
2228beacf11bSopenharmony_ci     |   |   |       `- README.txt
2229beacf11bSopenharmony_ci     |   |   |- str71x/
2230beacf11bSopenharmony_ci     |   |   |   `- olimex-strp711/
2231beacf11bSopenharmony_ci     |   |   |       `- README.txt
2232beacf11bSopenharmony_ci     |   |   |- tiva/
2233beacf11bSopenharmony_ci     |   |   |   |- dk-tm4c129x/
2234beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2235beacf11bSopenharmony_ci     |   |   |   |- eagle100/
2236beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2237beacf11bSopenharmony_ci     |   |   |   |- ekk-lm3s9b96/
2238beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2239beacf11bSopenharmony_ci     |   |   |   |- launchxl-cc1310/
2240beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2241beacf11bSopenharmony_ci     |   |   |   |- launchxl-cc1312r1/
2242beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2243beacf11bSopenharmony_ci     |   |   |   |- lm3s6432-s2e/
2244beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2245beacf11bSopenharmony_ci     |   |   |   |- lm3s6965-ek/
2246beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2247beacf11bSopenharmony_ci     |   |   |   |- lm3s8962-ek/
2248beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2249beacf11bSopenharmony_ci     |   |   |   |- lm4f120-launchpad/
2250beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2251beacf11bSopenharmony_ci     |   |   |   |- tm4c123g-launchpad/
2252beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2253beacf11bSopenharmony_ci     |   |   |   `- tm4c1294-launchpad/
2254beacf11bSopenharmony_ci     |   |   |       `- README.txt
2255beacf11bSopenharmony_ci     |   |   |- tms570/
2256beacf11bSopenharmony_ci     |   |   |   |- launchxl-tms57004/
2257beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2258beacf11bSopenharmony_ci     |   |   |   `- tms570ls31x-usb-kit/
2259beacf11bSopenharmony_ci     |   |   |       `- README.txt
2260beacf11bSopenharmony_ci     |   |   `- xmc4/
2261beacf11bSopenharmony_ci     |   |       `- xmc4500-relax/
2262beacf11bSopenharmony_ci     |   |           `- README.txt
2263beacf11bSopenharmony_ci     |   |- avr/
2264beacf11bSopenharmony_ci     |   |   |- at32uc3/
2265beacf11bSopenharmony_ci     |   |   |   `- avr32dev1/
2266beacf11bSopenharmony_ci     |   |   |       `- README.txt
2267beacf11bSopenharmony_ci     |   |   |- at90usb/
2268beacf11bSopenharmony_ci     |   |   |   |- micropendous3/
2269beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2270beacf11bSopenharmony_ci     |   |   |   `- teensy-2.0/
2271beacf11bSopenharmony_ci     |   |   |       `- README.txt
2272beacf11bSopenharmony_ci     |   |   `- atmega/
2273beacf11bSopenharmony_ci     |   |       |- amber/
2274beacf11bSopenharmony_ci     |   |       |   `- README.txt
2275beacf11bSopenharmony_ci     |   |       |- arduino-mega2560/
2276beacf11bSopenharmony_ci     |   |       |   `- README.txt
2277beacf11bSopenharmony_ci     |   |       `- moteino-mega/
2278beacf11bSopenharmony_ci     |   |           `- README.txt
2279beacf11bSopenharmony_ci     |   |- hc/
2280beacf11bSopenharmony_ci     |   |   `- m9s12/
2281beacf11bSopenharmony_ci     |   |       |- demo9s12ne64/
2282beacf11bSopenharmony_ci     |   |       |   `- README.txt
2283beacf11bSopenharmony_ci     |   |       `- ne64badge/
2284beacf11bSopenharmony_ci     |   |           `- README.txt
2285beacf11bSopenharmony_ci     |   |- mips/
2286beacf11bSopenharmony_ci     |   |   |- pic32mx/
2287beacf11bSopenharmony_ci     |   |   |   |- mirtoo/
2288beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2289beacf11bSopenharmony_ci     |   |   |   |- pic32mx7mmb/
2290beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2291beacf11bSopenharmony_ci     |   |   |   |- pic32mx-starterkit/
2292beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2293beacf11bSopenharmony_ci     |   |   |   |- sure-pic32mx/
2294beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2295beacf11bSopenharmony_ci     |   |   |   `- ubw32/
2296beacf11bSopenharmony_ci     |   |   |       `- README.txt
2297beacf11bSopenharmony_ci     |   |   `-pic32mz/
2298beacf11bSopenharmony_ci     |   |       |- chipkit-wifire/
2299beacf11bSopenharmony_ci     |   |       |   `- README.txt
2300beacf11bSopenharmony_ci     |   |       |- flipnclick-pic32mz/
2301beacf11bSopenharmony_ci     |   |       |   `- README.txt
2302beacf11bSopenharmony_ci     |   |       `- pic32mz-starterkit/
2303beacf11bSopenharmony_ci     |   |           `- README.txt
2304beacf11bSopenharmony_ci     |   |- misoc/
2305beacf11bSopenharmony_ci     |   |   `- lm32/
2306beacf11bSopenharmony_ci     |   |       `- misoc/
2307beacf11bSopenharmony_ci     |   |           `- README.txt
2308beacf11bSopenharmony_ci     |   |- or1k/
2309beacf11bSopenharmony_ci     |   |   `- mor1kx/
2310beacf11bSopenharmony_ci     |   |       `- or1k/
2311beacf11bSopenharmony_ci     |   |           `- README.txt
2312beacf11bSopenharmony_ci     |   |- renesas/
2313beacf11bSopenharmony_ci     |   |   |- m16c/
2314beacf11bSopenharmony_ci     |   |   |   `- skp16c26/
2315beacf11bSopenharmony_ci     |   |   |       `- README.txt
2316beacf11bSopenharmony_ci     |   |   `-sh1/
2317beacf11bSopenharmony_ci     |   |       `- us7032evb1/
2318beacf11bSopenharmony_ci     |   |           `- README.txt
2319beacf11bSopenharmony_ci     |   |- risc-v/
2320beacf11bSopenharmony_ci     |   |- sim/
2321beacf11bSopenharmony_ci     |   |   `- sim/
2322beacf11bSopenharmony_ci     |   |       `- sim/
2323beacf11bSopenharmony_ci     |   |           |- include/README.txt
2324beacf11bSopenharmony_ci     |   |           `- README.txt
2325beacf11bSopenharmony_ci     |   |- x86/
2326beacf11bSopenharmony_ci     |   |   `- qemu/
2327beacf11bSopenharmony_ci     |   |       `- qemu-i486/
2328beacf11bSopenharmony_ci     |   |           `- README.txt
2329beacf11bSopenharmony_ci     |   |- xtensa/
2330beacf11bSopenharmony_ci     |   |   `- esp32/
2331beacf11bSopenharmony_ci     |   |       `- esp32-core/
2332beacf11bSopenharmony_ci     |   |           `- README.txt
2333beacf11bSopenharmony_ci     |   |- z16/
2334beacf11bSopenharmony_ci     |   |   `- z16f/
2335beacf11bSopenharmony_ci     |   |       `- z16f2800100zcog/
2336beacf11bSopenharmony_ci     |   |           |- configs/nsh/README.txt
2337beacf11bSopenharmony_ci     |   |           |- configs/ostest/README.txt
2338beacf11bSopenharmony_ci     |   |           |- configs/pashello/README.txt
2339beacf11bSopenharmony_ci     |   |           `- README.txt
2340beacf11bSopenharmony_ci     |   |- z80/
2341beacf11bSopenharmony_ci     |   |   |- ez80/
2342beacf11bSopenharmony_ci     |   |   |   |- ez80f910200kitg/
2343beacf11bSopenharmony_ci     |   |   |   |   |- configs/ostest/README.txt
2344beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2345beacf11bSopenharmony_ci     |   |   |   |- ez80f910200zco/
2346beacf11bSopenharmony_ci     |   |   |   |   |- configs/dhcpd/README.txt
2347beacf11bSopenharmony_ci     |   |   |   |   |- configs/httpd/README.txt
2348beacf11bSopenharmony_ci     |   |   |   |   |- configs/nettest/README.txt
2349beacf11bSopenharmony_ci     |   |   |   |   |- configs/nsh/README.txt
2350beacf11bSopenharmony_ci     |   |   |   |   |- configs/poll/README.txt
2351beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2352beacf11bSopenharmony_ci     |   |   |   |- makerlisp/
2353beacf11bSopenharmony_ci     |   |   |   |   |- configs/nsh_flash/README.txt
2354beacf11bSopenharmony_ci     |   |   |   |   |- configs/nsh_ram/README.txt
2355beacf11bSopenharmony_ci     |   |   |   |   |- configs/sdboot/README.txt
2356beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2357beacf11bSopenharmony_ci     |   |   |   `- z80x/
2358beacf11bSopenharmony_ci     |   |   |       |- configs/nsh_flash/README.txt
2359beacf11bSopenharmony_ci     |   |   |       |- configs/nsh_ram/README.txt
2360beacf11bSopenharmony_ci     |   |   |       |- configs/sdboot/README.txt
2361beacf11bSopenharmony_ci     |   |   |       `- README.txt
2362beacf11bSopenharmony_ci     |   |   |- z180/
2363beacf11bSopenharmony_ci     |   |   |   `- p112/
2364beacf11bSopenharmony_ci     |   |   |       `- README.txt
2365beacf11bSopenharmony_ci     |   |   |- z8/
2366beacf11bSopenharmony_ci     |   |   |   |- z8encore000zco/
2367beacf11bSopenharmony_ci     |   |   |   |   |- configs/ostest/README.txt
2368beacf11bSopenharmony_ci     |   |   |   |   `- README.txt
2369beacf11bSopenharmony_ci     |   |   |   `- z8f64200100kit/
2370beacf11bSopenharmony_ci     |   |   |       |- configs/ostest/README.txt
2371beacf11bSopenharmony_ci     |   |   |       `- README.txt
2372beacf11bSopenharmony_ci     |   |   `- z80/
2373beacf11bSopenharmony_ci     |   |       `- z80sim/
2374beacf11bSopenharmony_ci     |   |           `- README.txt
2375beacf11bSopenharmony_ci     |   `-README.txt
2376beacf11bSopenharmony_ci     |- drivers/
2377beacf11bSopenharmony_ci     |   |- eeprom/
2378beacf11bSopenharmony_ci     |   |   `- README.txt
2379beacf11bSopenharmony_ci     |   |- lcd/
2380beacf11bSopenharmony_ci     |   |   | README.txt
2381beacf11bSopenharmony_ci     |   |   `- pcf8574_lcd_backpack_readme.txt
2382beacf11bSopenharmony_ci     |   |- mtd/
2383beacf11bSopenharmony_ci     |   |   `- README.txt
2384beacf11bSopenharmony_ci     |   |- sensors/
2385beacf11bSopenharmony_ci     |   |   `- README.txt
2386beacf11bSopenharmony_ci     |   |- syslog/
2387beacf11bSopenharmony_ci     |   |   `- README.txt
2388beacf11bSopenharmony_ci     |   `- README.txt
2389beacf11bSopenharmony_ci     |- fs/
2390beacf11bSopenharmony_ci     |   |- binfs/
2391beacf11bSopenharmony_ci     |   |   `- README.txt
2392beacf11bSopenharmony_ci     |   |- cromfs/
2393beacf11bSopenharmony_ci     |   |   `- README.txt
2394beacf11bSopenharmony_ci     |   |- mmap/
2395beacf11bSopenharmony_ci     |   |   `- README.txt
2396beacf11bSopenharmony_ci     |   |- nxffs/
2397beacf11bSopenharmony_ci     |   |   `- README.txt
2398beacf11bSopenharmony_ci     |   |- smartfs/
2399beacf11bSopenharmony_ci     |   |   `- README.txt
2400beacf11bSopenharmony_ci     |   |- procfs/
2401beacf11bSopenharmony_ci     |   |   `- README.txt
2402beacf11bSopenharmony_ci     |   |- spiffs/
2403beacf11bSopenharmony_ci     |   |   `- README.md
2404beacf11bSopenharmony_ci     |   `- unionfs/
2405beacf11bSopenharmony_ci     |       `- README.txt
2406beacf11bSopenharmony_ci     |- graphics/
2407beacf11bSopenharmony_ci     |   `- README.txt
2408beacf11bSopenharmony_ci     |- libs/
2409beacf11bSopenharmony_ci     |   |- README.txt
2410beacf11bSopenharmony_ci     |   |- libc/
2411beacf11bSopenharmony_ci     |   |   |- zoneinfo
2412beacf11bSopenharmony_ci     |   |   |   `- README.txt
2413beacf11bSopenharmony_ci     |   |   `- README.txt
2414beacf11bSopenharmony_ci     |   |- libdsp/
2415beacf11bSopenharmony_ci     |   |   `- README.txt
2416beacf11bSopenharmony_ci     |   |- libnx/
2417beacf11bSopenharmony_ci     |   |   |- nxfongs
2418beacf11bSopenharmony_ci     |   |   |   `- README.txt
2419beacf11bSopenharmony_ci     |   |   `- README.txt
2420beacf11bSopenharmony_ci     |   |- libxx/
2421beacf11bSopenharmony_ci     |   `- README.txt
2422beacf11bSopenharmony_ci     |- mm/
2423beacf11bSopenharmony_ci     |   |- shm/
2424beacf11bSopenharmony_ci     |   |   `- README.txt
2425beacf11bSopenharmony_ci     |   `- README.txt
2426beacf11bSopenharmony_ci     |- net/
2427beacf11bSopenharmony_ci     |   |- sixlowpan
2428beacf11bSopenharmony_ci     |   |   `- README.txt
2429beacf11bSopenharmony_ci     |   `- README.txt
2430beacf11bSopenharmony_ci     |- pass1/
2431beacf11bSopenharmony_ci     |   `- README.txt
2432beacf11bSopenharmony_ci     |- syscall/
2433beacf11bSopenharmony_ci     |   `- README.txt
2434beacf11bSopenharmony_ci     `- tools/
2435beacf11bSopenharmony_ci         `- README.txt
2436beacf11bSopenharmony_ci
2437beacf11bSopenharmony_ciBelow is a guide to the available README files in the semi-optional apps/
2438beacf11bSopenharmony_cisource tree:
2439beacf11bSopenharmony_ci
2440beacf11bSopenharmony_ci    apps/
2441beacf11bSopenharmony_ci     |- examples/
2442beacf11bSopenharmony_ci     |   |- bastest/README.txt
2443beacf11bSopenharmony_ci     |   |- json/README.txt
2444beacf11bSopenharmony_ci     |   |- pashello/README.txt
2445beacf11bSopenharmony_ci     |   `- README.txt
2446beacf11bSopenharmony_ci     |- gpsutils/
2447beacf11bSopenharmony_ci     |   `- minmea/README.txt
2448beacf11bSopenharmony_ci     |- graphics/
2449beacf11bSopenharmony_ci     |   |- tiff/README.txt
2450beacf11bSopenharmony_ci     |   `- traveler/tools/tcledit/README.txt
2451beacf11bSopenharmony_ci     |- interpreters/
2452beacf11bSopenharmony_ci     |   |- bas/
2453beacf11bSopenharmony_ci     |   |  `- README.txt
2454beacf11bSopenharmony_ci     |   |- ficl/
2455beacf11bSopenharmony_ci     |   |  `- README.txt
2456beacf11bSopenharmony_ci     |   `- README.txt
2457beacf11bSopenharmony_ci     |- modbus/
2458beacf11bSopenharmony_ci     |   `- README.txt
2459beacf11bSopenharmony_ci     |- netutils/
2460beacf11bSopenharmony_ci     |   |- discover/
2461beacf11bSopenharmony_ci     |   |  `- README.txt
2462beacf11bSopenharmony_ci     |   |- ftpc/
2463beacf11bSopenharmony_ci     |   |  `- README.txt
2464beacf11bSopenharmony_ci     |   |- json/
2465beacf11bSopenharmony_ci     |   |  `- README.txt
2466beacf11bSopenharmony_ci     |   |- telnetd/
2467beacf11bSopenharmony_ci     |   |  `- README.txt
2468beacf11bSopenharmony_ci     |   `- README.txt
2469beacf11bSopenharmony_ci     |- nshlib/
2470beacf11bSopenharmony_ci     |   `- README.txt
2471beacf11bSopenharmony_ci     |- NxWidgets/
2472beacf11bSopenharmony_ci     |   `- README.txt
2473beacf11bSopenharmony_ci     |- system/
2474beacf11bSopenharmony_ci     |   |- cdcacm/
2475beacf11bSopenharmony_ci     |   |  `- README.txt
2476beacf11bSopenharmony_ci     |   |- i2c/
2477beacf11bSopenharmony_ci     |   |  `- README.txt
2478beacf11bSopenharmony_ci     |   |- inifile/
2479beacf11bSopenharmony_ci     |   |  `- README.txt
2480beacf11bSopenharmony_ci     |   |- install/
2481beacf11bSopenharmony_ci     |   |  `- README.txt
2482beacf11bSopenharmony_ci     |   |- nsh/
2483beacf11bSopenharmony_ci     |   |  `- README.txt
2484beacf11bSopenharmony_ci     |   |- nxplayer/
2485beacf11bSopenharmony_ci     |   |  `- README.txt
2486beacf11bSopenharmony_ci     |   |- psmq/
2487beacf11bSopenharmony_ci     |   |  `- README.txt
2488beacf11bSopenharmony_ci     |   |- symtab/
2489beacf11bSopenharmony_ci     |   |   `- README.txt
2490beacf11bSopenharmony_ci     |   |- termcurses/
2491beacf11bSopenharmony_ci     |   |   `- README.txt
2492beacf11bSopenharmony_ci     |   |- usbmsc/
2493beacf11bSopenharmony_ci     |   |  `- README.txt
2494beacf11bSopenharmony_ci     |   `- zmodem/
2495beacf11bSopenharmony_ci     |      `- README.txt
2496beacf11bSopenharmony_ci     `- wireless
2497beacf11bSopenharmony_ci         |- bluetooth/
2498beacf11bSopenharmony_ci         |  `- btsak/
2499beacf11bSopenharmony_ci         |     `- README.txt
2500beacf11bSopenharmony_ci         `- ieee802154
2501beacf11bSopenharmony_ci            `- i8sak/
2502beacf11bSopenharmony_ci               `- README.txt
2503beacf11bSopenharmony_ci
2504beacf11bSopenharmony_ciAdditional README.txt files in the other, related repositories:
2505beacf11bSopenharmony_ci
2506beacf11bSopenharmony_ci    NxWidgets/
2507beacf11bSopenharmony_ci     |- Doxygen
2508beacf11bSopenharmony_ci     |   `- README.txt
2509beacf11bSopenharmony_ci     |- tools
2510beacf11bSopenharmony_ci     |   `- README.txt
2511beacf11bSopenharmony_ci     |- UnitTests
2512beacf11bSopenharmony_ci     |   `- README.txt
2513beacf11bSopenharmony_ci     `- README.txt
2514beacf11bSopenharmony_ci
2515beacf11bSopenharmony_ci    buildroot/
2516beacf11bSopenharmony_ci     `- README.txt
2517beacf11bSopenharmony_ci
2518beacf11bSopenharmony_ci    tools/
2519beacf11bSopenharmony_ci     `- README.txt
2520beacf11bSopenharmony_ci
2521beacf11bSopenharmony_ci    uClibc++/
2522beacf11bSopenharmony_ci     `- README.txt
2523