blob: c9e8a2ced835886bd171c7bd864b87a575faf070 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Compile-Time Configuration &mdash; Apache Mynewt latest documentation</title>
<link rel="shortcut icon" href="../../../_static/mynewt-logo-only-newt32x32.png"/>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/sphinx_theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/bootstrap-3.0.3.min.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/v2.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/restructuredtext.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/overrides.css" type="text/css" />
<link rel="index" title="Index"
href="../../../genindex.html"/>
<link rel="search" title="Search" href="../../../search.html"/>
<link rel="top" title="Apache Mynewt latest documentation" href="../../../index.html"/>
<link rel="up" title="OS User Guide" href="../../os_user_guide.html"/>
<link rel="next" title="Validation and Error Messages" href="sysconfig_error.html"/>
<link rel="prev" title="imgr_ver_str" href="../imgmgr/imgr_ver_str.html"/>
<script src="../../../_static/js/modernizr.min.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
i["GoogleAnalyticsObject"] = r;
(i[r] =
i[r] ||
function() {
(i[r].q = i[r].q || []).push(arguments);
}),
(i[r].l = 1 * new Date());
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m);
})(window, document, "script", "//www.google-analytics.com/analytics.js", "ga");
ga("create", "UA-72162311-1", "auto");
ga("send", "pageview");
</script>
</head>
<body class="not-front page-documentation" role="document" >
<div id="wrapper">
<div class="container">
<div id="banner" class="row v2-main-banner">
<a class="logo-cell" href="/">
<img class="logo" src="../../../_static/img/logo.png">
</a>
<div class="tagline-cell">
<h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4>
</div>
<div class="news-cell">
<div class="well">
<h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.11.0, Apache NimBLE 1.6.0 </a> released September 7, 2023)
</div>
</div>
</div>
</div>
<header>
<nav id="navbar" class="navbar navbar-inverse" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a>
</li>
<li class="important">
<a href="/quick-start/">Quick Start</a>
</li>
<li>
<a href="/about/">About</a>
</li>
<li>
<a href="/talks/">Talks</a>
</li>
<li class="active">
<a href="/documentation/">Documentation</a>
</li>
<li>
<a href="/download/">Download</a>
</li>
<li>
<a href="/community/">Community</a>
</li>
<li>
<a href="/events/">Events</a>
</li>
</ul>
<!-- Search, Navigation and Repo links -->
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</nav>
</header>
<!-- STARTS MAIN CONTENT -->
<div id="main-content">
<div id="breadcrumb">
<div class="container">
<a href="/documentation/">Docs</a> /
<a href="../../os_user_guide.html">OS User Guide</a> /
Compile-Time Configuration
<div class="sourcelink">
<a href="https://github.com/apache/mynewt-core/edit/master/docs/os/modules/sysinitconfig/sysinitconfig.rst" class="icon icon-github"
rel="nofollow"> Edit on GitHub</a>
</div>
</div>
</div>
<!-- STARTS CONTAINER -->
<div class="container">
<!-- STARTS .content -->
<div id="content" class="row">
<!-- STARTS .container-sidebar -->
<div class="container-sidebar col-xs-12 col-sm-3">
<div id="docSidebar" class="sticky-container">
<div role="search" class="sphinx-search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search documentation" class="search-documentation" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<!-- Note: only works when deployed -->
<select class="form-control" onchange="if (this.value) window.location.href=this.value">
<option value="/latest" selected>
Version: latest
</option>
<option value="/v1_11_0" >
Version: 1.11.0
</option>
<option value="/v1_10_0" >
Version: 1.10.0
</option>
<option value="/v1_9_0" >
Version: 1.9.0
</option>
<option value="/v1_8_0" >
Version: 1.8.0
</option>
<option value="/v1_7_0" >
Version: 1.7.0
</option>
<option value="/v1_6_0" >
Version: 1.6.0
</option>
<option value="/v1_5_0" >
Version: 1.5.0
</option>
<option value="/v1_4_0" >
Version: 1.4.0
</option>
<option value="/v1_3_0/os/introduction" >
Version: 1.3.0
</option>
<option value="/v1_2_0/os/introduction" >
Version: 1.2.0
</option>
<option value="/v1_1_0/os/introduction" >
Version: 1.1.0
</option>
<option value="/v1_0_0/os/introduction" >
Version: 1.0.0
</option>
<option value="/v0_9_0/os/introduction" >
Version: 0.9.0
</option>
</select>
<div class="region region-sidebar">
<div class="docs-menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../get_started/index.html">Setup &amp; Get Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../concepts.html">Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../tutorials/tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../external_links.html">Third-party Resources</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../os_user_guide.html">OS User Guide</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../core_os/mynewt_os.html">Kernel</a></li>
<li class="toctree-l2"><a class="reference internal" href="../system_modules.html">System</a></li>
<li class="toctree-l2"><a class="reference internal" href="../hal/hal.html">Hardware Abstraction</a></li>
<li class="toctree-l2"><a class="reference internal" href="../bootloader/bootloader.html">Secure Bootloader</a></li>
<li class="toctree-l2"><a class="reference internal" href="../split/split.html">Split Images</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../core_os/porting/port_os.html">Porting Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../baselibc.html">Baselibc</a></li>
<li class="toctree-l2"><a class="reference internal" href="../drivers/driver.html">Drivers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../devmgmt/newtmgr.html">Device Management with Newt Manager</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mcumgr/mcumgr.html">Device Management with MCUmgr</a></li>
<li class="toctree-l2"><a class="reference internal" href="../imgmgr/imgmgr.html">Image Manager</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Compile-Time Configuration</a><ul>
<li class="toctree-l3"><a class="reference internal" href="sysconfig_error.html">Validation and Error Messages</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../sysinitdown/sysinitdown.html">System Initialization and Shutdown</a></li>
<li class="toctree-l2"><a class="reference internal" href="../extcmd/extcmd.html">Build-Time Hooks</a></li>
<li class="toctree-l2"><a class="reference internal" href="../fs/fs.html">File System</a></li>
<li class="toctree-l2"><a class="reference internal" href="../fcb/fcb.html">Flash Circular Buffer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sensor_framework/sensor_framework.html">Sensor Framework</a></li>
<li class="toctree-l2"><a class="reference internal" href="../testutil/testutil.html">Test Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../json/json.html">JSON</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mfg/mfg.html">Manufacturing support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../bsp/index.html">Board support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../network/index.html">BLE User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../newt/index.html">Newt Tool Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../newtmgr/index.html">Newt Manager Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mynewt_faq/index.html">Mynewt FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../misc/index.html">Appendix</a></li>
</ul>
</div>
</div>
</div>
<!-- ENDS STICKY CONTAINER -->
</div>
<!-- ENDS .container-sidebar -->
<div class="col-xs-12 col-sm-9">
<div class="">
<div class="rst-content">
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="compile-time-configuration">
<h1>Compile-Time Configuration<a class="headerlink" href="#compile-time-configuration" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<p>This guide describes how Mynewt manages system configuration. It shows
you how to tell Mynewt to use default or customized values to
configure packages that you develop or use to build a target. This
guide:</p>
<ul class="simple">
<li><p>Assumes you have read the
<a class="reference internal" href="../../../concepts.html#concepts"><span class="std std-ref">Concepts</span></a> section that describes
the Mynewt package hierarchy and its use of the <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> and
<code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files.</p></li>
<li><p>Assumes you have read the Mynewt <a class="reference internal" href="../../../newt/newt_operation.html"><span class="doc">Theory of Operations</span></a> and are familiar with how newt
determines package dependencies for your target build.</p></li>
</ul>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#system-configuration-setting-definitions-and-values" id="id1">System Configuration Setting Definitions and Values</a></p>
<ul>
<li><p><a class="reference internal" href="#examples-of-configuration-settings" id="id2">Examples of Configuration Settings</a></p>
<ul>
<li><p><a class="reference internal" href="#example-1" id="id3">Example 1</a></p></li>
<li><p><a class="reference internal" href="#example-2" id="id4">Example 2</a></p></li>
<li><p><a class="reference internal" href="#example-3" id="id5">Example 3</a></p></li>
</ul>
</li>
</ul>
</li>
<li><p><a class="reference internal" href="#overriding-system-configuration-setting-values" id="id6">Overriding System Configuration Setting Values</a></p>
<ul>
<li><p><a class="reference internal" href="#resolving-override-conflicts" id="id7">Resolving Override Conflicts</a></p></li>
<li><p><a class="reference internal" href="#examples-of-overrides" id="id8">Examples of Overrides</a></p>
<ul>
<li><p><a class="reference internal" href="#example-4" id="id9">Example 4</a></p></li>
<li><p><a class="reference internal" href="#example-5" id="id10">Example 5</a></p></li>
</ul>
</li>
</ul>
</li>
<li><p><a class="reference internal" href="#conditional-settings" id="id11">Conditional Settings</a></p>
<ul>
<li><p><a class="reference internal" href="#examples-of-conditional-settings" id="id12">Examples of Conditional Settings</a></p>
<ul>
<li><p><a class="reference internal" href="#example-6" id="id13">Example 6</a></p></li>
<li><p><a class="reference internal" href="#example-7" id="id14">Example 7</a></p></li>
</ul>
</li>
</ul>
</li>
<li><p><a class="reference internal" href="#generated-syscfg-h-and-referencing-system-configuration-settings" id="id15">Generated syscfg.h and Referencing System Configuration Settings</a></p>
<ul>
<li><p><a class="reference internal" href="#example-of-syscfg-h-and-how-to-reference-a-setting-name" id="id16">Example of syscfg.h and How to Reference a Setting Name</a></p></li>
</ul>
</li>
</ul>
</div>
<p>Mynewt defines several configuration parameters in the <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> and
<code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files. The newt tool uses this information to:</p>
<ul class="simple">
<li><p>Generate a system configuration header file that contains all the
package configuration settings and values.</p></li>
<li><p>Display the system configuration settings and values in the
<code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">target</span> <span class="pre">config</span></code> command.</p></li>
</ul>
<p>The benefits with this approach include:</p>
<ul class="simple">
<li><p>Allows Mynewt developers to reuse other packages and easily change
their configuration settings without updating source or header files
when implementing new packages.</p></li>
<li><p>Allows application developers to easily view the system configuration
settings and values and determine the values to override for a target
build.</p></li>
</ul>
<div class="section" id="system-configuration-setting-definitions-and-values">
<h2><a class="toc-backref" href="#id1">System Configuration Setting Definitions and Values</a><a class="headerlink" href="#system-configuration-setting-definitions-and-values" title="Permalink to this headline"></a></h2>
<p>A package can optionally:</p>
<ul class="simple">
<li><p>Define and expose the system configuration settings to allow other
packages to override the default setting values.</p></li>
<li><p>Override the system configuration setting values defined by the
packages that it depends on.</p></li>
</ul>
<p>You use the <code class="docutils literal notranslate"><span class="pre">defs</span></code> parameter in a <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file to define the
system configuration settings for a package. <code class="docutils literal notranslate"><span class="pre">defs</span></code> is a mapping (or
associative array) of system configuration setting definitions. It has
the following syntax:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.defs</span><span class="p">:</span>
<span class="w"> </span><span class="nt">PKGA_SYSCFG_NAME1</span><span class="p">:</span>
<span class="w"> </span><span class="nt">description</span><span class="p">:</span>
<span class="w"> </span><span class="nt">value</span><span class="p">:</span>
<span class="w"> </span><span class="nt">type</span><span class="p">:</span>
<span class="w"> </span><span class="nt">restrictions</span><span class="p">:</span>
<span class="w"> </span><span class="nt">PKGA_SYSCFG_NAME2</span><span class="p">:</span>
<span class="w"> </span><span class="nt">description</span><span class="p">:</span>
<span class="w"> </span><span class="nt">value</span><span class="p">:</span>
<span class="w"> </span><span class="nt">type</span><span class="p">:</span>
<span class="w"> </span><span class="nt">restrictions</span><span class="p">:</span>
</pre></div>
</div>
<p>Each setting definition consists of the following key-value mapping:</p>
<ul>
<li><p>A setting name for the key, such as <code class="docutils literal notranslate"><span class="pre">PKGA_SYSCFG_NAME1</span></code> in the
syntax example above. <strong>Note:</strong> A system configuration setting name
must be unique. The newt tool aborts the build when multiple packages
define the same setting.</p></li>
<li><p>A mapping of fields for the value. Each field itself is a key-value
pair of attributes. The field keys are <code class="docutils literal notranslate"><span class="pre">description</span></code>, <code class="docutils literal notranslate"><span class="pre">value</span></code>,
<code class="docutils literal notranslate"><span class="pre">type</span></code>, and <code class="docutils literal notranslate"><span class="pre">restrictions</span></code>. They are described in following
table:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 13%" />
<col style="width: 87%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Field</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>description</p></td>
<td><p>Describes the usage for the setting. This field is optional.</p></td>
</tr>
<tr class="row-odd"><td><p>value</p></td>
<td><p>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.</p></td>
</tr>
<tr class="row-even"><td><p>type</p></td>
<td><p>Specifies the data type for the value field. This field is optional. You
can specify one of three types:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">raw</span></code>:</dt><dd><p>The <code class="docutils literal notranslate"><span class="pre">value</span></code> data is uninterpreted. This is the default <code class="docutils literal notranslate"><span class="pre">type</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">task_priority</span></code>:</dt><dd><p>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:</p>
<p>A number between 0 and 239 - The task priority number to use for the
setting.</p>
<p><code class="docutils literal notranslate"><span class="pre">any</span></code> - Specify <code class="docutils literal notranslate"><span class="pre">any</span></code> 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.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">flash_owner</span></code>:</dt><dd><p>Specifies a flash area. The value should be the name of a
flash area defined in the BSP flash map for your target board.</p>
</dd>
</dl>
</td>
</tr>
<tr class="row-odd"><td><p>restrictions</p></td>
<td><p>Specifies a list of restrictions on the setting value. <strong>This field is
optional</strong>. You can specify two formats:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">$notnull</span></code>:</dt><dd><p>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.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">expression</span></code>:</dt><dd><p>Specifies a boolean expression of the form
<code class="docutils literal notranslate"><span class="pre">[!]&amp;ltrequired-setting&gt;[if</span> <span class="pre">&amp;ltbase-value&gt;]</span></code></p>
</dd>
</dl>
<p>Examples:</p>
<p><code class="docutils literal notranslate"><span class="pre">restrictions:</span> <span class="pre">!LOG_FCB</span></code> - When this setting is enabled, <code class="docutils literal notranslate"><span class="pre">LOG_FCB</span></code> must be
disabled.</p>
<p><code class="docutils literal notranslate"><span class="pre">restrictions:</span> <span class="pre">LOG_FCB</span> <span class="pre">if</span> <span class="pre">0</span></code> - When this setting is disabled, <code class="docutils literal notranslate"><span class="pre">LOG_FCB</span></code>
must be enabled.</p>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<div class="section" id="examples-of-configuration-settings">
<h3><a class="toc-backref" href="#id2">Examples of Configuration Settings</a><a class="headerlink" href="#examples-of-configuration-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="example-1">
<h4><a class="toc-backref" href="#id3">Example 1</a><a class="headerlink" href="#example-1" title="Permalink to this headline"></a></h4>
<p>The following example is an excerpt from the
<code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> package <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file. It defines the
<code class="docutils literal notranslate"><span class="pre">LOG_LEVEL</span></code> configuration setting to specify the log level and the
<code class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></code> configuration setting to specify whether to enable or
disable the newtmgr logging feature.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.defs</span><span class="p">:</span>
<span class="w"> </span><span class="nt">LOG_LEVEL</span><span class="p">:</span>
<span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;Log</span><span class="nv"> </span><span class="s">Level&#39;</span>
<span class="w"> </span><span class="nt">value</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">raw</span>
<span class="w"> </span><span class="w w-Error"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">LOG_NEWTMGR</span><span class="p">:</span>
<span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;Enables</span><span class="nv"> </span><span class="s">or</span><span class="nv"> </span><span class="s">disables</span><span class="nv"> </span><span class="s">newtmgr</span><span class="nv"> </span><span class="s">command</span><span class="nv"> </span><span class="s">tool</span><span class="nv"> </span><span class="s">logging&#39;</span>
<span class="w"> </span><span class="nt">value</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
</pre></div>
</div>
</div>
<div class="section" id="example-2">
<h4><a class="toc-backref" href="#id4">Example 2</a><a class="headerlink" href="#example-2" title="Permalink to this headline"></a></h4>
<p>The following example is an excerpt from the
<code class="docutils literal notranslate"><span class="pre">net/nimble/controller</span></code> package <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file. It defines the
<code class="docutils literal notranslate"><span class="pre">BLE_LL_PRIO</span></code> configuration setting with a <code class="docutils literal notranslate"><span class="pre">task_priority</span></code> type and
assigns task priority 0 to the BLE link layer task.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.defs</span><span class="p">:</span>
<span class="w"> </span><span class="nt">BLE_LL_PRIO</span><span class="p">:</span>
<span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;BLE</span><span class="nv"> </span><span class="s">link</span><span class="nv"> </span><span class="s">layer</span><span class="nv"> </span><span class="s">task</span><span class="nv"> </span><span class="s">priority&#39;</span>
<span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;task_priority&#39;</span>
<span class="w"> </span><span class="nt">value</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
</pre></div>
</div>
</div>
<div class="section" id="example-3">
<h4><a class="toc-backref" href="#id5">Example 3</a><a class="headerlink" href="#example-3" title="Permalink to this headline"></a></h4>
<p>The following example is an excerpt from the <code class="docutils literal notranslate"><span class="pre">fs/nffs</span></code>
package <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.defs</span><span class="p">:</span>
<span class="w"> </span><span class="nt">NFFS_FLASH_AREA</span><span class="p">:</span>
<span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;The</span><span class="nv"> </span><span class="s">flash</span><span class="nv"> </span><span class="s">area</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">use</span><span class="nv"> </span><span class="s">for</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">Newtron</span><span class="nv"> </span><span class="s">Flash</span><span class="nv"> </span><span class="s">File</span><span class="nv"> </span><span class="s">System&#39;</span>
<span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">flash_owner</span>
<span class="w"> </span><span class="nt">value</span><span class="p">:</span>
<span class="w"> </span><span class="nt">restrictions</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">$notnull</span>
</pre></div>
</div>
<p>It defines the <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code> configuration setting with a
<code class="docutils literal notranslate"><span class="pre">flash_owner</span></code> type indicating that a flash area needs to be specified
for the Newtron Flash File System. The flash areas are typically defined
by the BSP in its <code class="docutils literal notranslate"><span class="pre">bsp.yml</span></code> file. For example, the <code class="docutils literal notranslate"><span class="pre">bsp.yml</span></code> for
nrf52dk board (<code class="docutils literal notranslate"><span class="pre">hw/bsp/nrf52dk/bsp.yml</span></code>) defines an area named
<code class="docutils literal notranslate"><span class="pre">FLASH_AREA_NFFS</span></code>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">FLASH_AREA_NFFS</span><span class="p">:</span>
<span class="w"> </span><span class="nt">user_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="nt">device</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">offset</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0x0007d000</span>
<span class="w"> </span><span class="nt">size</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">12kB</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file for the same board
(<code class="docutils literal notranslate"><span class="pre">hw/bsp/nrf52dk/syscfg.yml</span></code>) specifies that the above area be used
for <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.vals</span><span class="p">:</span>
<span class="w"> </span><span class="nt">CONFIG_FCB_FLASH_AREA</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">FLASH_AREA_NFFS</span>
<span class="w"> </span><span class="nt">REBOOT_LOG_FLASH_AREA</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">FLASH_AREA_REBOOT_LOG</span>
<span class="w"> </span><span class="nt">NFFS_FLASH_AREA</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">FLASH_AREA_NFFS</span>
<span class="w"> </span><span class="nt">COREDUMP_FLASH_AREA</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">FLASH_AREA_IMAGE_1</span>
</pre></div>
</div>
<p>Note that the <code class="docutils literal notranslate"><span class="pre">fs/nffs/syscfg.yml</span></code> file indicates that the
<code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code> setting cannot be a null string; so a higher
priority package must set a non-null value to it. That is exactly what
the BSP package does. For more on priority of packages in setting
values, see the next section.</p>
</div>
</div>
</div>
<div class="section" id="overriding-system-configuration-setting-values">
<h2><a class="toc-backref" href="#id6">Overriding System Configuration Setting Values</a><a class="headerlink" href="#overriding-system-configuration-setting-values" title="Permalink to this headline"></a></h2>
<p>A package may use the <code class="docutils literal notranslate"><span class="pre">vals</span></code> parameter in its <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file to
override the configuration values defined by other packages. This
mechanism allows:</p>
<ul class="simple">
<li><p>Mynewt developers to implement a package and easily override the
system configuration setting values that are defined by the packages
it depends on.</p></li>
<li><p>Application developers to easily and cleanly override default
configuration settings in a single place and build a customized
target. You can use the <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">target</span> <span class="pre">config</span> <span class="pre">show</span> <span class="pre">&lt;target-name&gt;</span></code>
command to check all the system configuration setting definitions and
values in your target to determine the setting values to override.
See <a class="reference external" href="/newt/command_list/newt_target.html">newt target</a>.</p></li>
</ul>
<p><code class="docutils literal notranslate"><span class="pre">vals</span></code> specifies the mappings of system configuration setting
name-value pairs as follows:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.vals</span><span class="p">:</span>
<span class="w"> </span><span class="nt">PKGA_SYSCFG_NAME1</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">VALUE1</span>
<span class="w"> </span><span class="nt">PKGA_SYSCFG_NAME2</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">VALUE2</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">PKGN_SYSCFG_NAME1</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">VALUEN</span>
</pre></div>
</div>
<p><strong>Note</strong>: The newt tool ignores overrides of undefined system
configuration settings.</p>
<div class="section" id="resolving-override-conflicts">
<h3><a class="toc-backref" href="#id7">Resolving Override Conflicts</a><a class="headerlink" href="#resolving-override-conflicts" title="Permalink to this headline"></a></h3>
<p>The newt tool uses package priorities to determine whether a package can
override a value and resolve conflicts when multiple packages override
the same system configuration setting. The following rules apply:</p>
<ul class="simple">
<li><p>A package can only override the default values of system
configuration settings that are defined by lower priority packages.</p></li>
<li><p>When packages with different priorities override the same system
configuration setting value, newt uses the value from the highest
priority package.</p></li>
<li><p>Packages of equal priority cannot override the same system
configuration setting with different values. newt aborts the build
unless a higher priority package also overrides the value.</p></li>
</ul>
<p>The following package types are listed from highest to lowest priority:</p>
<ul class="simple">
<li><p>Target</p></li>
<li><p>App</p></li>
<li><p>unittest - A target can include either an app or unit test package,
but not both.</p></li>
<li><p>BSP</p></li>
<li><p>Lib - Includes all other system level packages such as os, lib, sdk,
and compiler. (Note that a Lib package cannot override other Lib
package settings.)</p></li>
</ul>
<p>It is recommended that you override defaults at the target level instead
of updating individual package <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files.</p>
</div>
<div class="section" id="examples-of-overrides">
<h3><a class="toc-backref" href="#id8">Examples of Overrides</a><a class="headerlink" href="#examples-of-overrides" title="Permalink to this headline"></a></h3>
<div class="section" id="example-4">
<h4><a class="toc-backref" href="#id9">Example 4</a><a class="headerlink" href="#example-4" title="Permalink to this headline"></a></h4>
<p>The following example is an excerpt from the
<code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> package <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file. The application package
overrides, in addition to other packages, the <code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> package
system configuration settings defined in <a class="reference internal" href="#example-1">Example 1</a>. It changes the
LOG_NEWTMGR system configuration setting value from <code class="docutils literal notranslate"><span class="pre">0</span></code> to <code class="docutils literal notranslate"><span class="pre">1</span></code>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">syscfg.vals</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Enable the shell task.</span>
<span class="w"> </span><span class="nt">SHELL_TASK</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="c1"># Enable newtmgr commands.</span>
<span class="w"> </span><span class="nt">STATS_NEWTMGR</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="nt">LOG_NEWTMGR</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
</pre></div>
</div>
</div>
<div class="section" id="example-5">
<h4><a class="toc-backref" href="#id10">Example 5</a><a class="headerlink" href="#example-5" title="Permalink to this headline"></a></h4>
<p>The following example are excerpts from the
<code class="docutils literal notranslate"><span class="pre">hw/bsp/native</span></code> package <code class="docutils literal notranslate"><span class="pre">bsp.yml</span></code> and <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files. The
package defines the flash areas for the BSP flash map in the <code class="docutils literal notranslate"><span class="pre">bsp.yml</span></code>
file, and sets the <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code> configuration setting value to
use the flash area named <code class="docutils literal notranslate"><span class="pre">FLASH_AREA_NFFS</span></code> in the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">bsp.flash_map</span><span class="p">:</span>
<span class="w"> </span><span class="nt">areas</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># System areas.</span>
<span class="w"> </span><span class="nt">FLASH_AREA_BOOTLOADER</span><span class="p">:</span>
<span class="w"> </span><span class="nt">device</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">offset</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0x00000000</span>
<span class="w"> </span><span class="nt">size</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">16kB</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="c1"># User areas.</span>
<span class="w"> </span><span class="nt">FLASH_AREA_REBOOT_LOG</span><span class="p">:</span>
<span class="w"> </span><span class="nt">user_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">device</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">offset</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0x00004000</span>
<span class="w"> </span><span class="nt">size</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">16kB</span>
<span class="w"> </span><span class="nt">FLASH_AREA_NFFS</span><span class="p">:</span>
<span class="w"> </span><span class="nt">user_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="nt">device</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">offset</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0x00008000</span>
<span class="w"> </span><span class="nt">size</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">32kB</span>
<span class="nt">syscfg.vals</span><span class="p">:</span>
<span class="w"> </span><span class="nt">NFFS_FLASH_AREA</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">FLASH_AREA_NFFS</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="conditional-settings">
<h2><a class="toc-backref" href="#id11">Conditional Settings</a><a class="headerlink" href="#conditional-settings" title="Permalink to this headline"></a></h2>
<p>Setings in most Mynewt YAML files can be made conditional on syscfg
settings. For example, a package might depend on a second package
<em>only if a syscfg setting has a particular value</em>. The condition can
be the value of a single syscfg setting or an arbitrary expression
involving many settings.</p>
<div class="section" id="examples-of-conditional-settings">
<h3><a class="toc-backref" href="#id12">Examples of Conditional Settings</a><a class="headerlink" href="#examples-of-conditional-settings" title="Permalink to this headline"></a></h3>
<div class="section" id="example-6">
<h4><a class="toc-backref" href="#id13">Example 6</a><a class="headerlink" href="#example-6" title="Permalink to this headline"></a></h4>
<p>In this example, a package depends on <code class="docutils literal notranslate"><span class="pre">lib/pkg2</span></code> only if
<code class="docutils literal notranslate"><span class="pre">MY_SETTING</span></code> has a true value.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">pkg.deps.MY_SETTING</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Only depend on pkg2 if MY_SETTING is true.</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lib/pkg2</span>
</pre></div>
</div>
<p>A setting is “true” if it has a value other than 0 or the empty string.
Undefined settings are not true.</p>
</div>
<div class="section" id="example-7">
<h4><a class="toc-backref" href="#id14">Example 7</a><a class="headerlink" href="#example-7" title="Permalink to this headline"></a></h4>
<p>In this example, a package overrides the setting <code class="docutils literal notranslate"><span class="pre">FOO</span></code> only if
<code class="docutils literal notranslate"><span class="pre">BAR</span></code> is greater than 5 and <code class="docutils literal notranslate"><span class="pre">BAZ</span></code> is not true.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">syscfg.vals.&#39;(BAR &gt; 5 &amp;&amp; !BAZ)</span><span class="p p-Indicator">:</span>
<span class="w"> </span><span class="c1"># Only override FOO if BAR is greater than 5 and BAZ is untrue.</span>
<span class="w"> </span><span class="nt">FOO</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">35</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="generated-syscfg-h-and-referencing-system-configuration-settings">
<h2><a class="toc-backref" href="#id15">Generated syscfg.h and Referencing System Configuration Settings</a><a class="headerlink" href="#generated-syscfg-h-and-referencing-system-configuration-settings" title="Permalink to this headline"></a></h2>
<p>The newt tool processes all the package <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files and
generates the <code class="docutils literal notranslate"><span class="pre">bin/&lt;target-path&gt;/generated/include/syscfg/syscfg.h</span></code>
include file with <code class="docutils literal notranslate"><span class="pre">#define</span></code> statements for each system configuration
setting defined. Newt creates a <code class="docutils literal notranslate"><span class="pre">#define</span></code> for a setting name as
follows:</p>
<ul class="simple">
<li><p>Adds the prefix <code class="docutils literal notranslate"><span class="pre">MYNEWT_VAL_</span></code>.</p></li>
<li><p>Replaces all occurrences of “/”, “-“, and ” ” in the setting name
with “_”.</p></li>
<li><p>Converts all characters to upper case.</p></li>
</ul>
<p>For example, the #define for my-config-name setting name is
MYNEWT_VAL_MY_CONFIG_NAME.</p>
<p>Newt groups the settings in <code class="docutils literal notranslate"><span class="pre">syscfg.h</span></code> by the packages that defined
them. It also indicates the package that changed a system configuration
setting value.</p>
<p>You must use the <code class="docutils literal notranslate"><span class="pre">MYNEWT_VAL()</span></code> macro to reference a #define of a
setting name in your header and source files. For example, to reference
the <code class="docutils literal notranslate"><span class="pre">my-config-name</span></code> setting name, you use
<code class="docutils literal notranslate"><span class="pre">MYNEWT_VAL(MY_CONFIG_NAME)</span></code>.</p>
<p><strong>Note:</strong> You only need to include <code class="docutils literal notranslate"><span class="pre">syscfg/syscfg.h</span></code> in your source
files to access the <code class="docutils literal notranslate"><span class="pre">syscfg.h</span></code> file. The newt tool sets the correct
include path to build your target.</p>
<div class="section" id="example-of-syscfg-h-and-how-to-reference-a-setting-name">
<h3><a class="toc-backref" href="#id16">Example of syscfg.h and How to Reference a Setting Name</a><a class="headerlink" href="#example-of-syscfg-h-and-how-to-reference-a-setting-name" title="Permalink to this headline"></a></h3>
<p><strong>Example 6</strong>: The following example are excerpts from a sample
<code class="docutils literal notranslate"><span class="pre">syscfg.h</span></code> file generated for an app/slinky target and from the
<code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> package <code class="docutils literal notranslate"><span class="pre">log.c</span></code> file that shows how to reference a
setting name.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">syscfg.h</span></code> file shows the <code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> package definitions and
also indicates that <code class="docutils literal notranslate"><span class="pre">app/slinky</span></code> changed the value for the
<code class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></code> settings.</p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="cm">/**</span>
<span class="cm"> * This file was generated by Apache Newt version: 1.0.0-dev</span>
<span class="cm"> */</span>
<span class="cp">#ifndef H_MYNEWT_SYSCFG_</span>
<span class="cp">#define H_MYNEWT_SYSCFG_</span>
<span class="cm">/**</span>
<span class="cm"> * This macro exists to ensure code includes this header when needed. If code</span>
<span class="cm"> * checks the existence of a setting directly via ifdef without including this</span>
<span class="cm"> * header, the setting macro will silently evaluate to 0. In contrast, an</span>
<span class="cm"> * attempt to use these macros without including this header will result in a</span>
<span class="cm"> * compiler error.</span>
<span class="cm"> */</span>
<span class="cp">#define MYNEWT_VAL(x) MYNEWT_VAL_ ## x</span>
<span class="cm">/* ... */</span>
<span class="cm">/*** kernel/os */</span>
<span class="cp">#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT</span>
<span class="cp">#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (12)</span>
<span class="cp">#endif</span>
<span class="cp">#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE</span>
<span class="cp">#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292)</span>
<span class="cp">#endif</span>
<span class="cm">/* ... */</span>
<span class="cm">/*** sys/log/full */</span>
<span class="cp">#ifndef MYNEWT_VAL_LOG_LEVEL</span>
<span class="cp">#define MYNEWT_VAL_LOG_LEVEL (0)</span>
<span class="cp">#endif</span>
<span class="cm">/* ... */</span>
<span class="cm">/* Overridden by apps/slinky (defined by sys/log/full) */</span>
<span class="cp">#ifndef MYNEWT_VAL_LOG_NEWTMGR</span>
<span class="cp">#define MYNEWT_VAL_LOG_NEWTMGR (1)</span>
<span class="cp">#endif</span>
<span class="cp">#endif</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">log_init()</span></code> function in the <code class="docutils literal notranslate"><span class="pre">sys/log/full/src/log.c</span></code> file
initializes the <code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> package. It checks the <code class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></code>
setting value, using <code class="docutils literal notranslate"><span class="pre">MYNEWT_VAL(LOG_NEWTMGR)</span></code>, to determine whether
the target application has enabled the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">log</span></code> functionality. It
only registers the the callbacks to process the <code class="docutils literal notranslate"><span class="pre">newtmgr</span> <span class="pre">log</span></code> commands
when the setting value is non-zero.</p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span>
<span class="nf">log_init</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">rc</span><span class="p">;</span>
<span class="w"> </span><span class="cm">/* Ensure this function only gets called by sysinit. */</span>
<span class="w"> </span><span class="n">SYSINIT_ASSERT_ACTIVE</span><span class="p">();</span>
<span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">rc</span><span class="p">;</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">log_inited</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="n">log_inited</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="cm">/* ... */</span>
<span class="cp">#if MYNEWT_VAL(LOG_NEWTMGR)</span>
<span class="w"> </span><span class="n">rc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">log_nmgr_register_group</span><span class="p">();</span>
<span class="w"> </span><span class="n">SYSINIT_PANIC_ASSERT</span><span class="p">(</span><span class="n">rc</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
<span class="cp">#endif</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation">
<a href="sysconfig_error.html" class="btn btn-neutral float-right" title="Validation and Error Messages" accesskey="n">Next: Validation and Error Messages <span class="fa fa-arrow-circle-right"></span></a>
<a href="../imgmgr/imgr_ver_str.html" class="btn btn-neutral" title="imgr_ver_str" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: imgr_ver_str</a>
</div>
</div>
</div>
</div>
<!-- ENDS CONTENT SECTION -->
</div>
<!-- ENDS .content -->
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12">
<p class="copyright">Apache Mynewt is available under Apache License, version 2.0.</p>
</div>
<div class="col-xs-12">
<div class="logos">
<img src="../../../_static/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
<small class="footnote">
Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt project logo are either
registered trademarks or trademarks of the Apache Software Foundation in the United States and other countries.
</small>
<a href="">
<img src="../../../_static/img/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
</div>
</div>
</div>
</div>
</footer>
</div>
<!-- ENDS #wrapper -->
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'latest',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
LINK_SUFFIX: '.html'
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/js/bootstrap-3.0.3.min.js"></script>
<script type="text/javascript" src="../../../_static/js/affix.js"></script>
<script type="text/javascript" src="../../../_static/js/main.js"></script>
</body>
</html>