You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/08/31 08:52:20 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #1675: add quickstart docs from NuttX Companion

Ouss4 commented on a change in pull request #1675:
URL: https://github.com/apache/incubator-nuttx/pull/1675#discussion_r479988930



##########
File path: Documentation/quickstart/quickstart.rst
##########
@@ -0,0 +1,110 @@
+.. include:: /substitutions.rst
+.. _quickstart:
+
+Quickstart
+==========
+
+Here's the quick version of getting started with NuttX. This is a bare-bones outline for experienced developers– if it's
+going too quickly, dive into the following sections. This Quickstart guide assumes you're on a Linux
+computer, you're using an ARM microcontroller on your embedded board, and you're familiar with using the command line.
+
+#. Install a Cross-Compiler Toolchain
+
+   With NuttX, you compile the operating system and your application on your desktop or laptop computer, then install the
+   binary file on your embedded computer. This guide assumes your computer is an
+   `ARM <https://en.wikipedia.org/wiki/ARM_architecture>`_ CPU. If it isn't, you'll need a different tool chain.
+
+   You can download a toolchain from
+   `ARM Embedded Gnu Toolchain <https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm>`_
+   for your embedded processor's CPU. You can also use a toolchain shipped with your OS for the `none-eabi` target, such as `gcc-arm-none-eabi` in Linux.
+
+
+In the following example, we download ``gcc-arm-none-eabi`` version 9.0 and unpack it into ``/opt/gcc`:
+
+   .. code-block:: console
+
+      $ sudo mkdir /opt/gcc
+      $ sudo chgrp -R users /opt/gcc
+      $ cd /opt/gcc
+      $ wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
+      $ tar xf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
+      
+Then, add the toolchain ``bin/`` directory to your path:
+
+.. code-block:: console
+
+      $ echo "export PATH=/opt/gcc/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH" >> ~/.bashrc
+
+If you are using any other shell, the procedure is similar by editing the corresponding rc file.
+
+#. Download Apache NuttX
+The next step is to download NuttX main repository along the application repository. The latter is technically optional in a very minimal configurations but should be included in normal configuration since it includes the NuttX shell.
+   .. code-block:: console
+
+      $ mkdir nuttx
+      $ cd nuttx
+      $ git clone https://github.com/apache/incubator-nuttx.git nuttx
+      $ git clone https://github.com/apache/incubator-nuttx-apps apps
+      $ git clone https://bitbucket.org/nuttx/tools.git tools
+
+#. Install the ``kconfig-frontends`` package
+
+   NuttX is configured using ``kconfig`` system via an interactive menu system (``menuconfig``). It also includes the ``kconfig-tweak`` utility that can be used to quickly change debug settings without going into the menu system.
+
+   .. code-block:: console
+
+      $ cd tools/kconfig-frontends
+      $ # on MacOS do the following:
+      $ patch < ../kconfig-macos.diff -p 1
+      $ ./configure --enable-mconf --disable-shared --enable-static --disable-gconf --disable-qconf --disable-nconf
+      $ # on Linux do the following:
+      $  ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf
+      $ make
+      $ make install
+
+#. List Possible Apache NuttX Base Configurations
+
+   Find your hardware and a good starting application in the list of base configurations. In the application list,
+   ``nsh`` is the Apache NuttX Shell, an interactive commandline that's a good starting place if you're new.
+
+   .. code-block:: bash
+
+      $ cd nuttx
+      $ ./tools/configure.sh list | less

Review comment:
       `list` doesn't exist as an option, that's actually printing an error then dumping all the configurations.




----------------------------------------------------------------
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:
users@infra.apache.org