adamfeuer commented on a change in pull request #1675: URL: https://github.com/apache/incubator-nuttx/pull/1675#discussion_r483817274
########## File path: Documentation/quickstart/install.rst ########## @@ -0,0 +1,188 @@ +.. include:: /substitutions.rst +.. _install: + +Installing +========== + +To start developing on Apache NuttX, we need to get the source code, configure it, compile it, and get it uploaded onto an +embedded computing board. These instructions are for `Ubuntu <https://ubuntu.com/>`_ Linux and macOS Catalina. If you're using a different +version, you may need to change some of the commands. + +Prerequisites +--------------------- + +Install prerequisites for building and using Apache NuttX (Linux) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +#. Install system packages + + .. code-block:: bash + + $ sudo apt install \ + bison flex gettext texinfo libncurses5-dev libncursesw5-dev \ + gperf automake libtool pkg-config build-essential gperf \ + libgmp-dev libmpc-dev libmpfr-dev libisl-dev binutils-dev libelf-dev \ + libexpat-dev gcc-multilib g++-multilib picocom u-boot-tools util-linux + + +#. Give yourself access to the serial console device + + This is done by adding your Linux user to the ``dialout`` group: + + .. code-block:: bash + + $ sudo usermod -a -G dialout $USER + $ # now get a login shell that knows we're in the dialout group: + $ su - $USER + +Install prerequisites for building and using Apache NuttX (macOS) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + .. code-block:: bash + + $ brew tap discoteq/discoteq + $ brew install flock + $ brew install x86_64-elf-gcc # Used by simulator + $ brew install u-boot-tools # Some platform integrate with u-boot + +Install prerequisites for building and using Apache NuttX (Windows -- WSL) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you are are building Apache NuttX on windows and using WSL follow +that installation guide for Linux. This has been verified against the +Ubunutu 18.04 version. + +There may be complications interacting with +programming tools over USB. Recently support for USBIP was added to WSL 2 +which has been used with the STM32 platform, but it is not trivial to configure: +https://github.com/rpasek/usbip-wsl2-instructions + +Install prerequisites for building and using Apache NuttX (Windows -- Cygwin) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Download and install `Cygwin <https://www.cygwin.com/>`_ using the minimal +installation in addition to these packages: + + .. code-block:: bash + + make bison libmpc-devel + gcc-core byacc automake-1.15 + gcc-g++ gperf libncurses-devel + flex gdb libmpfr-devel + git unzip zlib-devel + +Install Required Tools (All Platforms) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are a collection of required tools that need to be built to build most Apache NuttX configurations: + + .. code-block:: bash + + $ mkdir buildtools + $ export NUTTXTOOLS=`pwd`/buildtools + $ export NUTTXTOOLS_PATH=$NUTTXTOOLS/bin:$NUTTXTOOLS/usr/bin + $ git clone https://bitbucket.org/nuttx/tools.git tools + +*NOTE:* You will need to add ``NUTTXTOOLS_PATH`` to your environment ``PATH`` + +#. Install kconfig-frontends tool + +This is necessary to run the ``./nuttx/tools/configure.sh`` script as well as using the ncurses-based menuconfig system. + + .. code-block:: bash + + $ cd tools/ + $ cd kconfig-frontends + $ # on MacOS do the following: + $ patch < ../kconfig-macos.diff -p 1 + $ ./configure --prefix=$NUTTXTOOLS --enable-mconf --disable-shared --enable-static --disable-gconf --disable-qconf --disable-nconf + $ # on Linux do the following: + $ ./configure --prefix=$NUTTXTOOLS --enable-mconf --disable-gconf --disable-qconf + $ touch aclocal.m4 Makefile.in + $ make + $ make install + +#. Install gperf tool (optional) + + .. code-block:: bash + + $ cd tools/ + $ wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz + $ tar zxf gperf-3.1.tar.gz + $ cd gperf-3.1 + $ ./configure --prefix=$NUTTXTOOLS + $ make + $ make install + +#. Install gen-romfs (optional) + Review comment: @v01d Will fix ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
