• Home
Name Date Size #Lines LOC

..--

drivers/12-May-2024-32,61722,379

fs/12-May-2024-24,46512,756

include/12-May-2024-4,6071,786

.gitignoreD12-May-202415 32

COPYINGD12-May-202412.2 KiB297231

ChangeLogD12-May-20241.6 MiB27,61627,129

INVIOLABLES.txtD12-May-20244.2 KiB12694

NuttX.gniD12-May-20245.3 KiB131117

OAT.xmlD12-May-20245.5 KiB8433

README.OpenSourceD12-May-2024439 1211

README.txtD12-May-202487.7 KiB2,3561,910

ReleaseNotesD12-May-20241.2 MiB26,62121,874

bundle.jsonD12-May-2024800 3434

README.OpenSource

1[
2    {
3        "Name"                  : "NuttX",
4        "License"               : "BSD 3-Clause License",
5        "License File"          : "COPYING",
6        "Version Number"        : "8.2",
7        "Owner"                 : "tonghaoyang1@huawei.com",
8        "Upstream URL"          : "http://www.nuttx.org",
9        "Description"           : "Apache NuttX is a mature, real-time embedded operating system (RTOS)."
10    }
11]
12

README.txt

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