You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/01/17 01:27:59 UTC

[GitHub] aditihilbert closed pull request #739: Sysinitconfig conversion .md -> .rst

aditihilbert closed pull request #739: Sysinitconfig conversion .md -> .rst
URL: https://github.com/apache/mynewt-core/pull/739
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/conf.py b/docs/conf.py
index a68c2f3d7..219b016b3 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -75,6 +75,8 @@
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'
 
+highlight_language = 'none'
+
 # If true, `todo` and `todoList` produce output, else they produce nothing.
 todo_include_todos = False
 
diff --git a/docs/doxygen.xml b/docs/doxygen.xml
index 4c15049de..f57d926bc 100644
--- a/docs/doxygen.xml
+++ b/docs/doxygen.xml
@@ -814,7 +814,7 @@ INPUT_ENCODING         = UTF-8
 # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
 # *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
 
-FILE_PATTERNS          =
+FILE_PATTERNS          = *.h
 
 # The RECURSIVE tag can be used to specify whether or not subdirectories should
 # be searched for input files as well.
diff --git a/docs/index.rst b/docs/index.rst
index 847ca4c77..8210af72a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -5,3 +5,4 @@ Mynewt Documentation
    :titlesonly:
 
    os/os_user_guide
+   network/ble/ble_intro
diff --git a/docs/os/modules/sysinitconfig/sysconfig_error.rst b/docs/os/modules/sysinitconfig/sysconfig_error.rst
index 929cb2202..6448e68e7 100644
--- a/docs/os/modules/sysinitconfig/sysconfig_error.rst
+++ b/docs/os/modules/sysinitconfig/sysconfig_error.rst
@@ -1,16 +1,21 @@
 Validation and Error Messages
 -----------------------------
 
-| With multiple packages defining and overriding system configuration
-  settings, it is easy to introduce conflicts and violations that are
-  difficult to find. The ``newt build <target-name>`` command validates
-  the setting definitions and value overrides for all the packages in
-  the target to ensure a valid and consistent build. It aborts the build
-  when it detects violations or ambiguities between packages.
-| The following sections describe the error conditions that newt detects
-  and the error messages that it outputs. For most errors, newt also
-  outputs the ``Setting history`` with the order of package overrides to
-  help you resolve the errors.
+With multiple packages defining and overriding system configuration
+settings, it is easy to introduce conflicts and violations that are
+difficult to find. The ``newt build <target-name>`` command validates
+the setting definitions and value overrides for all the packages in
+the target to ensure a valid and consistent build. It aborts the build
+when it detects violations or ambiguities between packages.
+
+The following sections describe the error conditions that newt detects
+and the error messages that it outputs. For most errors, newt also
+outputs the ``Setting history`` with the order of package overrides to
+help you resolve the errors.
+
+.. contents::
+   :local:
+   :depth: 2
 
 **Note:** The ``newt target config <target-name>`` command also detects
 errors and outputs error messages at the top of the command output. The
@@ -32,21 +37,19 @@ override violations:
 -  Priority Violation - A package overrides a setting defined by a
    package with higher or equal priority.
 
-   **Note:** A package may override the default value for a setting that
-   it defines. For example, a package defines a setting with a default
-   value but needs to conditionally override the value based on another
-   setting value.
+**Note:** A package may override the default value for a setting that
+it defines. For example, a package defines a setting with a default
+value but needs to conditionally override the value based on another
+setting value.
 
 Example: Ambiguity Violation Error Message
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The following example shows the error message that newt outputs for an
 ambiguity violation:
 
 .. code-block:: console
 
-
     Error: Syscfg ambiguities detected:
         Setting: LOG_NEWTMGR, Packages: [apps/slinky, apps/splitty]
     Setting history (newest -> oldest):
@@ -61,8 +64,7 @@ sets the setting to 0. The overrides are ambiguous because both are
 of the defintion and the two overrides from the ``syscfg.yml`` files
 that cause the error:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     #Package: sys/log/full
     syscfg.defs:
@@ -87,7 +89,6 @@ defined by another package at the same priority level:
 
 .. code-block:: console
 
-
     Error: Priority violations detected (Packages can only override settings defined by packages of lower priority):
         Package: mgmt/newtmgr overriding setting: LOG_NEWTMGR defined by sys/log/full
 
@@ -99,8 +100,7 @@ overrides the ``LOG_NEWTMGR`` setting that the ``sys/log/full`` lib
 package defines. The following are excerpts of the definition and the
 override from the ``syscfg.yml`` files that cause this error:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     #Package: sys/log/full
     syscfg.defs:
@@ -129,7 +129,6 @@ undefined flash area.
 
 .. code-block:: console
 
-
     Building target targets/sim_slinky
     Error: Flash errors detected:
         Setting REBOOT_LOG_FLASH_AREA specifies unknown flash area: FLASH_AREA_NOEXIST
@@ -143,8 +142,7 @@ package ``REBOOT_LOG_FLASH_AREA`` setting. The following are excerpts of
 the definition and the override from the ``syscfg.yml`` files that cause
 the error:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     #Package: sys/reboot
     syscfg.defs:
@@ -165,7 +163,6 @@ multiple settings are assigned the same flash area:
 
 .. code-block:: console
 
-
     Error: Flash errors detected:
         Multiple flash_owner settings specify the same flash area
               settings: REBOOT_LOG_FLASH_AREA, CONFIG_FCB_FLASH_AREA
@@ -183,8 +180,7 @@ assigns ``FLASH_AREA_NFFS`` to the ``sys/reboot`` package
 definitions and the two overrides from the ``syscfg.yml`` files that
 cause the error:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     # Package: sys/config
     syscfg.defs.CONFIG_FCB:
@@ -197,7 +193,7 @@ cause the error:
     syscfg.defs:
         REBOOT_LOG_FLASH_AREA:
             description: 'The flash area for the reboot log'
-            type: 'flash_owner' 
+            type: 'flash_owner'
             value:
 
     #Package: hw/bsp/native
@@ -205,13 +201,13 @@ cause the error:
          CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
 
     #Package: apps/slinky
-    syscfg.vals: 
+    syscfg.vals:
         REBOOT_LOG_FLASH_AREA: FLASH_AREA_NFFS
 
-Restriction Violations For setting definitions with ``restrictions``
-~~~~~~~~~~~~~~~~~~~~~~~~~
+Restriction Violations
+~~~~~~~~~~~~~~~~~~~~~~
 
-specified, newt checks for the following violations:
+For setting definitions with ``restrictions`` specified, newt checks for the following violations:
 
 -  A setting with a ``$notnull`` restriction does not have a value.
 -  For a setting with expression restrictions, some required setting
@@ -227,7 +223,7 @@ setting with ``$notnull`` restriction does not have a value:
 
 
     Error: Syscfg restriction violations detected:
-        NFFS_FLASH_AREA must not be null 
+        NFFS_FLASH_AREA must not be null
 
     Setting history (newest -> oldest):
         NFFS_FLASH_AREA: [fs/nffs:]
@@ -237,8 +233,7 @@ The above error occurs because the ``fs/nffs`` package defines the
 packages override the setting. The following is an excerpt of the
 definition in the ``syscfg.yml`` file that causes the error:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     #Package: fs/nffs
     syscfg.defs:
@@ -257,7 +252,6 @@ expression restriction violation:
 
 .. code-block:: console
 
-
     Error: Syscfg restriction violations detected:
         CONFIG_FCB=1 requires CONFIG_FCB_FLASH_AREA be set, but CONFIG_FCB_FLASH_AREA=
 
@@ -271,8 +265,7 @@ the ``CONFIG_FCB_FLASH_AREA`` setting must also be set. The following
 are excerpts of the definition and the override from the ``syscfg.yml``
 files that cause the error:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     # Package:  sys/config
     syscfg.defs:
@@ -290,7 +283,6 @@ files that cause the error:
 Task Priority Violations
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
-
 For ``task_priority`` type setting definitions, newt checks for the
 following violations:
 
@@ -310,7 +302,6 @@ for this example because currently only one Mynewt package defines a
 
 .. code-block:: console
 
-
     Error: duplicate priority value: setting1=SHELL_TASK_PRIORITY setting2=SLINKY_TASK_PRIORITY pkg1=apps/slinky pkg2=sys/shell value=1
 
 The above error occurs because the ``apps/slinky`` package defines a
@@ -326,7 +317,6 @@ setting is assigned an invalid task priority value:
 
 .. code-block:: console
 
-
     Error: invalid priority value: value too great (> 239); setting=SLINKY_TASK_PRIORITY value=240 pkg=apps/slinky
 
 The above error occurs because the ``apps/slinky`` package defines the
@@ -337,8 +327,7 @@ value.
 priority violation error messages.
 
 Duplicate System Configuration Setting Definition
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 A setting definition must be unique. Newt checks that only one package
 in the target defines a setting. The following example shows the error
@@ -347,12 +336,13 @@ message that newt outputs when multiple packages define the
 
 .. code-block:: console
 
-
     Error: setting LOG_NEWTMGR redefined
 
 **Note:** Newt does not output the ``Setting history`` with duplicate
-setting error messages. ###Override of Undefined System Configuration
-Setting
+setting error messages.
+
+Override of Undefined System Configuration Setting
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The ``newt build`` command ignores overrides of undefined system
 configuration settings. The command does not print a warning when you
@@ -368,14 +358,16 @@ options to troubleshoot this problem:
 
 Note: The ``newt build -ldebug`` command generates lots of output and we
 recommend that you use the ``newt target config show`` command option.
-####Example: Ignoring Override of Undefined Setting Message
+
+Example: Ignoring Override of Undefined Setting Message
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The following example shows that the ``apps/slinky`` application
 overrides the ``LOG_NEWTMGR`` setting but omits the **T** as an example
 of an error and overrides the misspelled **LOG\_NEWMGR** setting. Here
 is an excerpt from its ``syscfg.yml`` file:
 
-.. code-block:: console
+.. code-block:: yaml
 
     #package: apps/slinky
     syscfg.vals:
@@ -392,7 +384,6 @@ following WARNING message:
 
 .. code-block:: console
 
-
     2017/02/18 17:19:12.119 [WARNING] Ignoring override of undefined settings:
     2017/02/18 17:19:12.119 [WARNING]     LOG_NEWMGR
     2017/02/18 17:19:12.119 [WARNING]     NFFS_FLASH_AREA
@@ -405,7 +396,6 @@ DEBUG message:
 
 .. code-block:: console
 
-
     2017/02/18 17:06:21.451 [DEBUG] Ignoring override of undefined settings:
     2017/02/18 17:06:21.451 [DEBUG]     LOG_NEWMGR
     2017/02/18 17:06:21.451 [DEBUG]     NFFS_FLASH_AREA
@@ -414,8 +404,7 @@ DEBUG message:
     2017/02/18 17:06:21.451 [DEBUG]     NFFS_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS]
 
 BSP Package Overrides Undefined Configuration Settings
-^^^^^^^^^^^^^^^^^^^
-
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 You might see a warning that indicates your application's BSP package is
 overriding some undefined settings. As you can see from the previous
@@ -443,8 +432,7 @@ flash area settings for all packages in its ``syscfg.yml`` file. The
 the ``NFFS_FLASH_AREA`` setting. Newt warns that the ``hw/bsp/native``
 packages overrides the undefined ``NFFS_FLASH_AREA`` setting.
 
-.. code-block:: consoles
-
+.. code-block:: yaml
 
     # hw/bsp/native bsp.yml
     bsp.flash_map:
diff --git a/docs/os/modules/sysinitconfig/sysinitconfig.rst b/docs/os/modules/sysinitconfig/sysinitconfig.rst
index 550889262..9bb3cf5ea 100644
--- a/docs/os/modules/sysinitconfig/sysinitconfig.rst
+++ b/docs/os/modules/sysinitconfig/sysinitconfig.rst
@@ -1,22 +1,30 @@
 System Configuration and Initialization
 ---------------------------------------
 
+.. toctree::
+   :hidden:
+
+   sysconfig_error
+
 This guide describes how Mynewt manages system configuration and
 initialization. It shows you how to tell Mynewt to use default or
 customized values to initialize packages that you develop or use to
 build a target. This guide:
 
 -  Assumes you have read the
-   `Concepts </os/get_started/vocabulary.html>`__ section that describes
+   :ref:`concepts` section that describes
    the Mynewt package hierarchy and its use of the ``pkg.yml`` and
    ``syscfg.yml`` files.
--  Assumes you have read the `Newt Tool Theory of
-   Operation </newt/newt_operation.html>`__ and are familiar with how newt
+-  Assumes you have read the Mynewt :doc:`../../../newt/newt_operation` and are familiar with how newt
    determines package dependencies for your target build.
 -  Covers only the system initialization for hardware independent
    packages. It does not cover the Board Support Package (BSP) and other
    hardware dependent system initialization.
 
+.. contents::
+   :local:
+   :depth: 3
+
 Mynewt defines several configuration parameters in the ``pkg.yml`` and
 ``syscfg.yml`` files. The newt tool uses this information to:
 
@@ -51,8 +59,7 @@ system configuration settings for a package. ``defs`` is a mapping (or
 associative array) of system configuration setting definitions. It has
 the following syntax:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     syscfg.defs:
         PKGA_SYSCFG_NAME1:
@@ -77,283 +84,74 @@ Each setting definition consists of the following key-value mapping:
    ``type``, and ``restrictions``. They are described in following
    table:
 
-.. raw:: html
-
-   <table style="width:90%", align="center">
-
-.. raw:: html
-
-   <tr>
-
-.. raw:: html
-
-   <th>
-
-Field
-
-.. raw:: html
-
-   </th>
-
-.. raw:: html
-
-   <th>
-
-Description
-
-.. raw:: html
-
-   </th>
-
-.. raw:: html
-
-   </tr>
-
-.. raw:: html
-
-   <tr>
-
-.. raw:: html
-
-   <td>
-
-description
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   <td>
-
-Describes the usage for the setting. This field is optional.
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   <tr>
-
-.. raw:: html
-
-   <td>
-
-value
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   <td>
-
-Specifies the default value for the setting. This field is required. The
-value depends on the type that you specify and can be an empty string.
-
-.. raw:: html
-
-   <tr>
-
-.. raw:: html
-
-   <td>
-
-type
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   <td>
-
-Specifies the data type for the value field. This field is optional. You
-can specify one of three types:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-raw - The value data is uninterpreted. This is the default type.
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-task\_priority - Specifies a Mynewt task priority number. The task
-priority number assigned to each setting must be unique and between 0
-and 239. value can be one of the following:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-A number between 0 and 239 - The task priority number to use for the
-setting.
-
-.. raw:: html
-
-   </li>
+   ============  ===========
+   Field         Description
+   ============  ===========
+   description   Describes the usage for the setting. This field is optional.
 
-.. raw:: html
+   value         Specifies the default value for the setting. This field is required. The
+                 value depends on the type that you specify and can be an empty string.
 
-   <li>
+   type          Specifies the data type for the value field. This field is optional. You
+                 can specify one of three types:
 
-any - Specify any to have newt automatically assign a priority for the
-setting.
-newt alphabetically orders all system configuration settings of this
-type and assigns the next highest available task priority number to each
-setting.
+                 ``raw``:
+                   The ``value`` data is uninterpreted. This is the default ``type``.
 
-.. raw:: html
+                 ``task_priority``:
+                   Specifies a Mynewt task priority number. The task
+                   priority number assigned to each setting must be unique and between 0
+                   and 239. value can be one of the following:
 
-   </li>
+                   A number between 0 and 239 - The task priority number to use for the
+                   setting.
 
-.. raw:: html
+                   ``any`` - Specify ``any`` to have newt automatically assign a priority for the
+                   setting.
+                   newt alphabetically orders all system configuration settings of this
+                   type and assigns the next highest available task priority number to each
+                   setting.
 
-   </ul>
+                 ``flash_owner``:
+                   Specifies a flash area. The value should be the name of a
+                   flash area defined in the BSP flash map for your target board.
 
-.. raw:: html
+   restrictions    Specifies a list of restrictions on the setting value. **This field is
+                   optional**. You can specify two formats:
 
-   </li>
+                   ``$notnull``:
+                     Specifies that the setting cannot have the empty string for a
+                     value. It essentially means that an empty string is not a sensible value
+                     and a package must override it with an appropriate value.
 
-.. raw:: html
+                   ``expression``:
+                     Specifies a boolean expression of the form
+                     ``[!]&ltrequired-setting>[if &ltbase-value>]``
 
-   <li>
+                   Examples:
 
-flash\_owner - Specifies a flash area. The value should be the name of a
-flash area defined in the BSP flash map for your target board.
+                   ``restrictions: !LOG_FCB`` - When this setting is enabled, ``LOG_FCB`` must be
+                   disabled.
 
-.. raw:: html
+                   ``restrictions: LOG_FCB if 0`` - When this setting is disabled, ``LOG_FCB``
+                   must be enabled.
 
-   </li>
+   ============  ===========
 
-.. raw:: html
-
-   </ul>
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   </tr>
-
-.. raw:: html
-
-   <tr>
-
-.. raw:: html
-
-   <td>
-
-restrictions
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   <td>
-
-Specifies a list of restrictions on the setting value. This field is
-optional. You can specify two formats:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-$notnull - Specifies that the setting cannot have the empty string for a
-value. It essentially means that an empty string is not a sensible value
-and a package must override it with an appropriate value.
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-expression - Specifies a boolean expression of the form
-[!]&ltrequired-setting>[if &ltbase-value>] Examples:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-restrictions: !LOG\_FCB - When this setting is enabled, LOG\_FCB must be
-disabled.
-
-.. raw:: html
-
-   <li>
-
-restrictions: LOG\_FCB if 0 - When this setting is disabled, LOG\_FCB
-must be enabled.
-
-.. raw:: html
-
-   </ul>
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-.. raw:: html
-
-   </td>
-
-.. raw:: html
-
-   </tr>
-
-.. raw:: html
-
-   </table>
 
 Examples of Configuration Settings
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-**Example 1:** The following example is an excerpt from the
+Example 1
+`````````
+
+The following example is an excerpt from the
 ``sys/log/full`` package ``syscfg.yml`` file. It defines the
 ``LOG_LEVEL`` configuration setting to specify the log level and the
 ``LOG_NEWTMGR`` configuration setting to specify whether to enable or
 disable the newtmgr logging feature.
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     syscfg.defs:
         LOG_LEVEL:
@@ -361,19 +159,21 @@ disable the newtmgr logging feature.
             value: 0
             type: raw
 
-           ...       
+           ...
 
-        LOG_NEWTMGR: 
+        LOG_NEWTMGR:
             description: 'Enables or disables newtmgr command tool logging'
             value: 0
 
-**Example 2:** The following example is an excerpt from the
+Example 2
+`````````
+
+The following example is an excerpt from the
 ``net/nimble/controller`` package ``syscfg.yml`` file. It defines the
 ``BLE_LL_PRIO`` configuration setting with a ``task_priority`` type and
 assigns task priority 0 to the BLE link layer task.
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     syscfg.defs:
         BLE_LL_PRIO:
@@ -381,11 +181,13 @@ assigns task priority 0 to the BLE link layer task.
             type: 'task_priority'
             value: 0
 
-**Example 3:** The following example is an excerpt from the ``fs/nffs``
-package ``syscfg.yml`` file.
+Example 3
+`````````
 
-.. code-block:: console
+The following example is an excerpt from the ``fs/nffs``
+package ``syscfg.yml`` file.
 
+.. code-block:: yaml
 
     syscfg.defs:
         NFFS_FLASH_AREA:
@@ -402,7 +204,7 @@ by the BSP in its ``bsp.yml`` file. For example, the ``bsp.yml`` for
 nrf52dk board (``hw/bsp/nrf52dk/bsp.yml``) defines an area named
 ``FLASH_AREA_NFFS``:
 
-.. code-block:: console
+.. code-block:: yaml
 
         FLASH_AREA_NFFS:
             user_id: 1
@@ -414,7 +216,7 @@ The ``syscfg.yml`` file for the same board
 (``hw/bsp/nrf52dk/syscfg.yml``) specifies that the above area be used
 for ``NFFS_FLASH_AREA``.
 
-.. code-block:: console
+.. code-block:: yaml
 
     syscfg.vals:
         CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
@@ -448,8 +250,7 @@ mechanism allows:
 ``vals`` specifies the mappings of system configuration setting
 name-value pairs as follows:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     syscfg.vals:
         PKGA_SYSCFG_NAME1: VALUE1
@@ -493,14 +294,16 @@ of updating individual package ``syscfg.yml`` files.
 Examples of Overrides
 ^^^^^^^^^^^^^^^^^^^^^
 
-**Example 4:** The following example is an excerpt from the
+Example 4
+``````````
+
+The following example is an excerpt from the
 ``apps/slinky`` package ``syscfg.yml`` file. The application package
 overrides, in addition to other packages, the ``sys/log/full`` package
-system configuration settings defined in **Example 1**. It changes the
-LOG\_NEWTMGR system configuration setting value from ``0`` to ``1``.
-
-.. code-block:: console
+system configuration settings defined in `Example 1`_. It changes the
+LOG_NEWTMGR system configuration setting value from ``0`` to ``1``.
 
+.. code-block:: yaml
 
     syscfg.vals:
         # Enable the shell task.
@@ -512,14 +315,16 @@ LOG\_NEWTMGR system configuration setting value from ``0`` to ``1``.
         STATS_NEWTMGR: 1
         LOG_NEWTMGR: 1
 
-**Example 5:** The following example are excerpts from the
+Example 5
+`````````
+
+The following example are excerpts from the
 ``hw/bsp/native`` package ``bsp.yml`` and ``syscfg.yml`` files. The
 package defines the flash areas for the BSP flash map in the ``bsp.yml``
 file, and sets the ``NFFS_FLASH_AREA`` configuration setting value to
 use the flash area named ``FLASH_AREA_NFFS`` in the ``syscfg.yml`` file.
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     bsp.flash_map:
         areas:
@@ -558,11 +363,11 @@ follows:
 
 -  Adds the prefix ``MYNEWT_VAL_``.
 -  Replaces all occurrences of "/", "-", and " " in the setting name
-   with "\_".
+   with "_".
 -  Converts all characters to upper case.
 
 For example, the #define for my-config-name setting name is
-MYNEWT\_VAL\_MY\_CONFIG\_NAME.
+MYNEWT_VAL_MY_CONFIG_NAME.
 
 Newt groups the settings in ``syscfg.h`` by the packages that defined
 them. It also indicates the package that changed a system configuration
@@ -589,8 +394,7 @@ The ``syscfg.h`` file shows the ``sys/log/full`` package definitions and
 also indicates that ``app/slinky`` changed the value for the
 ``LOG_NEWTMGR`` settings.
 
-.. code-block:: console
-
+.. code-block:: cpp
 
     /**
      * This file was generated by Apache Newt version: 1.0.0-dev
@@ -608,8 +412,7 @@ also indicates that ``app/slinky`` changed the value for the
      */
     #define MYNEWT_VAL(x)                           MYNEWT_VAL_ ## x
 
-
-         ...
+    /* ... */
 
     /*** kernel/os */
     #ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
@@ -620,7 +423,7 @@ also indicates that ``app/slinky`` changed the value for the
     #define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292)
     #endif
 
-         ...
+    /* ... */
 
     /*** sys/log/full */
 
@@ -628,7 +431,7 @@ also indicates that ``app/slinky`` changed the value for the
     #define MYNEWT_VAL_LOG_LEVEL (0)
     #endif
 
-         ...
+    /* ... */
 
     /* Overridden by apps/slinky (defined by sys/log/full) */
     #ifndef MYNEWT_VAL_LOG_NEWTMGR
@@ -644,8 +447,7 @@ the target application has enabled the ``newtmgr log`` functionality. It
 only registers the the callbacks to process the ``newtmgr log`` commands
 when the setting value is non-zero.
 
-.. code-block:: console
-
+.. code-block:: cpp
 
     void
     log_init(void)
@@ -661,7 +463,8 @@ when the setting value is non-zero.
             return;
         }
         log_inited = 1;
-            ...
+
+        /* ... */
 
     #if MYNEWT_VAL(LOG_NEWTMGR)
         rc = log_nmgr_register_group();
@@ -691,8 +494,7 @@ access the ``sysinit()`` function.
 
 Here is an example of a ``main()`` function:
 
-.. code-block:: console
-
+.. code-block:: cpp
 
     int
     main(int argc, char **argv)
@@ -700,14 +502,13 @@ Here is an example of a ``main()`` function:
         /* First, call sysinit() to perform the system and package initialization */
         sysinit();
 
-          ... other application initialization processing....
+        /* ... other application initialization processing ... */
 
-         
         /*  Last, process events from the default event queue.  */
         while (1) {
            os_eventq_run(os_eventq_dflt_get());
         }
-        /* main never returns */   
+        /* main never returns */
     }
 
 Specifying Package Initialization Functions
@@ -720,8 +521,7 @@ optionally, specify one or more package initialization functions that
 
 A package initialization function must have the following prototype:
 
-.. code-block:: console
-
+.. code-block:: cpp
 
     void init_func_name(void)
 
@@ -744,12 +544,11 @@ stages.
 The ``pkg.init`` parameter has the following syntax in the ``pkg.yml``
 file:
 
-.. code-block:: console
+.. code-block:: yaml
 
-
-    pkg.init: 
-        pkg_init_func1_name: pkg_init_func1_stage 
-        pkg_init_func2_name: pkg_init_func2_stage 
+    pkg.init:
+        pkg_init_func1_name: pkg_init_func1_stage
+        pkg_init_func2_name: pkg_init_func2_stage
 
                   ...
 
@@ -767,7 +566,7 @@ support the legacy format. They will not be maintained for future
 releases and we recommend that you migrate to use the ``pkg.init``
 parameter.
 
-Generated sysinit\_app() Function
+Generated sysinit_app() Function
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The newt tool processes the ``pkg.init`` parameters in all the
@@ -776,10 +575,9 @@ in the ``<target-path>/generated/src/<target-name>-sysinit_app.c`` file,
 and includes the file in the build. Here is an example ``sysinit_app()``
 function:
 
-.. code-block:: console
-
+.. code-block:: cpp
 
-    **
+    /**
      * This file was generated by Apache Newt (incubating) version: 1.0.0-dev
      */
 
@@ -789,7 +587,7 @@ function:
     void os_pkg_init(void);
     void imgmgr_module_init(void);
 
-          ...
+    /* ... */
 
     void stats_module_init(void);
 
@@ -819,10 +617,10 @@ function:
         /* 100.1: sys/mfg */
         mfg_init();
 
-             ....
+        /* ... */
 
         /*** Stage 300 */
-        /* 300.0: sys/config */    
+        /* 300.0: sys/config */
         config_pkg_init();
 
         /*** Stage 500 */
@@ -831,7 +629,7 @@ function:
         /* 500.1: sys/shell */
         shell_init();
 
-              ...
+        /* ... */
 
         /* 500.4: mgmt/imgmgr */
         imgmgr_module_init();
@@ -849,8 +647,7 @@ You can use the system configuration setting values to conditionally
 specify parameter values in ``pkg.yml`` and ``syscfg.yml`` files. The
 syntax is:
 
-.. code-block:: console
-
+.. code-block:: yaml
 
     parameter_name.PKGA_SYSCFG_NAME:
          parameter_value
@@ -860,7 +657,7 @@ This specifies that ``parameter_value`` is only set for
 value is non-zero. Here is an example from the ``libs/os`` package
 ``pkg.yml`` file:
 
-::
+.. code-block:: yaml
 
     pkg.deps:
         - sys/sysinit
diff --git a/docs/os/os_user_guide.rst b/docs/os/os_user_guide.rst
index eb1bee4a3..3360f441c 100644
--- a/docs/os/os_user_guide.rst
+++ b/docs/os/os_user_guide.rst
@@ -6,6 +6,7 @@ OS User Guide
 
    OS Core <core_os/mynewt_os>
    core_os/porting/port_os
+   modules/sysinitconfig/sysinitconfig
 
 This guide provides comprehensive information about Mynewt OS, the
 real-time operating system for embedded systems. It is intended both for


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services