Skip to content
README.txt 74.6 KiB
Newer Older
patacongo's avatar
patacongo committed
README
^^^^^^

Gregory Nutt's avatar
Gregory Nutt committed
  o Environments
Gregory Nutt's avatar
Gregory Nutt committed
    - Ubuntu Bash under Windows 10
Gregory Nutt's avatar
Gregory Nutt committed
  o Installation
    - Download and Unpack
    - Semi-Optional apps/ Package
    - Installation Directories with Spaces in the Path
    - Downloading from Repositories
Gregory Nutt's avatar
Gregory Nutt committed
    - Related Repositories
    - Notes about Header Files
patacongo's avatar
patacongo committed
  o Configuring NuttX
    - Instantiating "Canned" Configurations
    - Refreshing Configurations
    - NuttX Configuration Tool
    - Finding Selections in the Configuration Menus
    - Reveal Hidden Configuration Options
    - Make Sure that You on on the Right Platform
    - Comparing Two Configurations
    - Incompatibilities with Older Configurations
patacongo's avatar
patacongo committed
    - NuttX Configuration Tool under DOS
patacongo's avatar
patacongo committed
  o Toolchains
    - Cross-Development Toolchains
    - NuttX Buildroot Toolchain
  o Shells
patacongo's avatar
patacongo committed
  o Building NuttX
Gregory Nutt's avatar
Gregory Nutt committed
    - Re-building
  o Cygwin Build Problems
    - Strange Path Problems
    - Window Native Toolchain Issues
patacongo's avatar
patacongo committed
  o Documentation

Gregory Nutt's avatar
Gregory Nutt committed
ENVIRONMENTS
patacongo's avatar
patacongo committed
^^^^^^^^^^^^

  NuttX requires a POSIX development environment such as you would find under
Bill Morgan's avatar
Bill Morgan committed
  Linux or OSX.  NuttX may also be installed and built on Windows system
  if you also provide such a POSIX development environment.  Options for a
Gregory Nutt's avatar
Gregory Nutt committed
  POSIX development environment under Windows include:
Gregory Nutt's avatar
Gregory Nutt committed

    - An installation of Linux on a virtual machine (VM) in Windows.  I have
      not been happy using a VM myself.  I have had stability problems with
      open source VMs and commercial VMs cost more than I want to spend.
      Sharing files with Linux running in a VM is awkward;  sharing devices
      connected to the Windows box with Linux in a VM is, at the very least,
      confusing;  Using Windows tools (such as Segger J-Link) with files
      built under the Linux VM is not a possibility.
Gregory Nutt's avatar
Gregory Nutt committed
    - The Cygwin environment.  Instructions for installation of Cygwin on a
      Windows system are provided in the following paragraph, "Installing
      Cygwin".  Cygwin is a mature, well-tested, and very convenient
Bill Morgan's avatar
Bill Morgan committed
      environment.  It is especially convenient if you  need to
      integrate with Windows tools and files.  Downsides are that the
      installation time is very long and the compile times are slow.
Gregory Nutt's avatar
Gregory Nutt committed

    - Ubuntu/Bash shell under Windows 10.  This is a new option under
Gregory Nutt's avatar
Gregory Nutt committed
      Windows 10.  See the section "Ubuntu Bash under Windows 10" below.
Gregory Nutt's avatar
Gregory Nutt committed
      This is an improvement over Cygwin if your concern is compile time;
Gregory Nutt's avatar
Gregory Nutt committed
      its build performance is comparable to native Linux, certainly better
      than the Cygwin build time.  It also installs in a tiny fraction of
      the time as Cygwin, perhaps 20 minutes for the basic Ubuntu install
      (vs. more than a day for the complete Cygwin install).

    - The MSYS environment.  I have no experience using the MSYS environment
      and that configuration will not be discussed in this README file.
      See http://www.mingw.org/wiki/MSYS if you are interested in
      using MSYS.  People report to me that they have used MSYS
      successfully.  I suppose that the advantages of the MSYS environment
      is that it is closer to a native Windows environment and uses only a
      minimal of add-on POSIX-land tools.
Gregory Nutt's avatar
Gregory Nutt committed

Gregory Nutt's avatar
Gregory Nutt committed
    - NuttX can also be installed and built on a native Windows system, but
      with some potential tool-related issues (see the discussion "Native
      Windows Build" under "Building NuttX" below).  GNUWin32 is used to
      provide compatible native windows tools.
Gregory Nutt's avatar
Gregory Nutt committed

patacongo's avatar
patacongo committed
Installing Cygwin
patacongo's avatar
patacongo committed

Gregory Nutt's avatar
Gregory Nutt committed
  Installing Cygwin on your Windows PC is simple, but time consuming.  See
  http://www.cygwin.com/ for installation instructions. Basically you just
  need to download a tiny setup.exe program and it does the real, network
  installation for you.
patacongo's avatar
patacongo committed
  Some Cygwin installation tips:
patacongo's avatar
patacongo committed
  1. Install at C:\cygwin

  2. Install EVERYTHING:  "Only the minimal base packages from the
     Cygwin distribution are installed by default. Clicking on categories
     and packages in the setup.exe package installation screen will
     provide you with the ability to control what is installed or updated.
     Clicking on the "Default" field next to the "All" category will
     provide you with the opportunity to install every Cygwin package.
     Be advised that this will download and install hundreds of megabytes
     to your computer."
patacongo's avatar
patacongo committed
     If you use the "default" installation, you will be missing many
     of the Cygwin utilities that you will need to build NuttX.  The
     build will fail in numerous places because of missing packages.

Gregory Nutt's avatar
Gregory Nutt committed
     NOTE: You don't really have to install EVERYTHING but I cannot
     answer the question "Then what should I install?"  I don't know
     the answer to that and so will continue to recommend installing
     EVERYTHING.

     You should certainly be able to omit "Science", "Math", and
Paul A. Patience's avatar
Paul A. Patience committed
     "Publishing".  You can try omitting KDE, Gnome, GTK, and other
     graphics packages if you don't plan to use them.

     Perhaps a minimum set would be those packages listed below for the
     "Ubuntu Bash under Windows 10" installation?

patacongo's avatar
patacongo committed
  After installing Cygwin, you will get lots of links for installed
  tools and shells.  I use the RXVT native shell.  It is fast and reliable
  and does not require you to run the Cygwin X server (which is neither
patacongo's avatar
patacongo committed
  fast nor reliable).  Unless otherwise noted, the rest of these
  instructions assume that you are at a bash command line prompt in
  either Linux or in Cygwin shell.
patacongo's avatar
patacongo committed

  UPDATE: The last time I installed EVERYTHING, the download was
Gregory Nutt's avatar
Gregory Nutt committed
  about 5GiB.  The server I selected was also very slow so it took
  over a day to do the whole install!

Gregory Nutt's avatar
Gregory Nutt committed
Ubuntu Bash under Windows 10
----------------------------

  A better version of a command-line only Ubuntu under Windows 10 (beta)
Gregory Nutt's avatar
Gregory Nutt committed
  has recently been made available from Microsoft.
Gregory Nutt's avatar
Gregory Nutt committed

  Installation
  ------------
  Installation instructions abound on the Internet complete with screen
  shots.  I will attempt to duplicate those instructions in full here.
  Here are the simplified installation steps:

    - Open "Settings".
    - Click on "Update & security".
    - Click on "For Developers".
    - Under "Use developer features", select the "Developer mode" option to
      setup the environment to install Bash.
    - A message box should pop up.  Click "Yes" to turn on developer mode.
    - After the necessary components install, you'll need to restart your
      computer.

  Once your computer reboots:

    - Open "Control Panel".
    - Click on "Programs".
    - Click on "Turn Windows features on or off".
    - A list of features will pop up, check the "Windows Subsystem for Linux
      (beta)" option.
    - Click OK.
    - Once the components installed on your computer, click the "Restart
      now" button to complete the task.

  After your computer restarts, you will notice that Bash will not appear in
  the "Recently added" list of apps, this is because Bash isn't actually
  installed yet. Now that you have setup the necessary components, use the
  following steps to complete the installation of Bash:

    - Open "Start", do a search for bash.exe, and press "Enter".
    - On the command prompt, type y and press Enter to download and install
      Bash from the Windows Store.  This will take awhile.
    - Then you'll need to create a default UNIX user account. This account
      doesn't have to be the same as your Windows account. Enter the
      username in the required field and press Enter (you can't use the
      username "admin").
    - Close the "bash.exe" command prompt.

  Now that you completed the installation and setup, you can open the Bash
  tool from the Start menu like you would with any other app.

  Accessing Windows Files from Ubuntu
  -----------------------------------
  File systems will be mounted under "/mnt" so for example "C:\Program Files"
Bill Morgan's avatar
Bill Morgan committed
  appears at "/mnt/c/Program Files".  This is as opposed to Cygwin where
Gregory Nutt's avatar
Gregory Nutt committed
  the same directory would appear at "/cygdrive/c/Program Files".

  With these differences (perhaps a few other Windows quirks) the Ubuntu
  install works just like Ubuntu running natively on your PC.
Gregory Nutt's avatar
Gregory Nutt committed

Gregory Nutt's avatar
Gregory Nutt committed
  A good tip for file sharing is to use symbolic links within your Ubuntu
  home directory.  For example, suppose you have your "projects" directory
  at C:\Documents\projects.  Then you can set up a link to the projects/
  directory in your Ubuntu directory like:

Gregory Nutt's avatar
Gregory Nutt committed
    ln -s /mnt/c/Documents/projects projects
Gregory Nutt's avatar
Gregory Nutt committed

  Accessing Ubuntu Files From Windows
  -----------------------------------
  In Ubuntu Userspace for Windows, the Ubuntu file system root directory is
  at:
Loading full blame...