Commit 1b9b2884 authored by Martí Bolívar's avatar Martí Bolívar Committed by Anas Nashif
Browse files

doc: application: improvements to "Overriding Default Configuration"



Make this a bit less Unix-centric, changing the CMake invocation lines
to only use documented parameters that continue to work across all
CMake versions (-B doesn't work everywhere, and -H means "help" in
recent versions of CMake).

Handle some 80-column cleanliness. Add documentation about the search
key, /. Be a bit more explicit about the steps.

Signed-off-by: default avatarMarti Bolivar <marti@opensourcefoundries.com>
parent 554eebae
Loading
Loading
Loading
Loading
+35 −15
Original line number Diff line number Diff line
@@ -355,6 +355,8 @@ If :makevar:`CONF_FILE` specifies multiple files, they will be merged in order.
For information on available kernel configuration options, including
inter-dependencies between options, see the :ref:`configuration`.

.. _application_set_conf:

Setting Application Configuration Values
========================================

@@ -405,32 +407,47 @@ The example below shows a comment line and an override setting
Overriding Default Configuration
================================

Override the default board and kernel configuration to temporarily alter the
application's configuration, perhaps to test the effect of a change.
Follow these steps to override an application's configuration
temporarily, perhaps to test the effect of a change.

.. note::

   If you want to permanently alter the configuration you
   should revise the :file:`.conf` file.
   If you want to permanently alter the configuration you should set
   the new value in a :file:`.conf` file, as described above in
   :ref:`application_set_conf`.

The steps below describe how to configure your application using a
menu-driven configurator interface. While you can edit your
application's :file:`.config` manually, using a configurator tool is
preferred, since it correctly handles dependencies between options.


#. Generate a Ninja build system, and use it to run ``ninja
   menuconfig`` as follows.

Configure the kernel options using a menu-driven interface. While you can add
entries manually, using the configuration menu is a preferred method.
   a) Using CMake, create a build directory (:file:`~/app/build`) from
      your application directory (:file:`~/app`) with a Ninja build
      system.

      For example, on a Unix shell:

#. After generating project files run :command:`ninja menuconfig` to launch the menu-driven interface.
      .. code-block:: bash

         $ cd ~/app
         $ mkdir build && cd build
         $ cmake -GNinja ..

   a) In a terminal session, navigate to the application directory
      (:file:`~/app`).
   b) Run ``ninja menuconfig`` from the build directory
      (:file:`~/app/build`).

   b) Enter the following command:
      Continuing the above Unix shell example:

      .. code-block:: bash

          $ cmake -Bbuild -H. -GNinja
          $ ninja -C build menuconfig
          $ ninja menuconfig

      A question-based menu opens that allows you to set individual configuration
      options.
      A question-based menu opens that allows you to set individual
      configuration options.

      .. image:: figures/app_kernel_conf_1.png
           :width: 600px
@@ -450,7 +467,8 @@ entries manually, using the configuration menu is a preferred method.

   * Type a numerical value in the round brackets :guilabel:`( )`.

   * Press :kbd:`Tab` to navigate the command menu at the bottom of the display.
   * Press :kbd:`Tab` to navigate the command menu at the bottom of the
     display.

     .. note::

@@ -464,6 +482,8 @@ entries manually, using the configuration menu is a preferred method.

   Press :kbd:`Enter` to return to the menu.

#. Press :kbd:`/` to bring up a search menu to look for a particular option.

#. After configuring the kernel options for your application, tab to
   :guilabel:`< Save >` and press :kbd:`Enter`.