blob: 24576034d81855ecc08b8f309e5aae0ee3105c60 [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">
<!-- This is broken by doc revisioning.
-->
<link rel="shortcut icon" href="../../../../img/favicon.ico">
<title>Validation and Error Messages - Apache Mynewt</title>
<link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
<link rel="stylesheet" href="../../../../css/highlight.css">
<link href="../../../../css/base.css" rel="stylesheet">
<link href="../../../../css/custom.css" rel="stylesheet">
<link href="../../../../css/v2.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<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="Validation and Error Messages">
<div class="container">
<div class="row v2-main-banner">
<a class="logo-cell" href="/">
<img class="logo" src="/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.12.0, Apache NimBLE 1.7.0 </a> released (April 4, 2024)
</div>
</div>
</div>
</div>
<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" 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
class=""
>
<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
class=""
>
<a href="/about/">About</a>
</li>
<li
class=""
>
<a href="/talks/">Talks</a>
</li>
<li
class="active"
>
<a href="/documentation/">Documentation</a>
</li>
<li
class=""
>
<a href="/download/">Download</a>
</li>
<li
class=""
>
<a href="/community/">Community</a>
</li>
<li
class=""
>
<a href="/events/">Events</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary">
<div class="top">
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search documentation" />
</div>
</form>
</div>
</div>
<ul class="toc-nav">
<li class="doc-version"><select class="form-control" onchange="if (this.value) window.location.href=this.value">
<option value="/latest">
Version: master
</option>
<option value="/v1_12_0/" >
Version: 1.12.0
</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" selected="selected" >
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></li>
<li ><a href="../../../introduction/">Mynewt Documentation</a>
<ul>
<li ><a href="../../../get_started/get_started/">Basic Setup</a>
</li>
<li >
<a href="../../../get_started/vocabulary/">Concepts</a>
</li>
<li ><a href="../../../tutorials/tutorials/">Tutorials</a>
</li>
<li ><a href="../../../os_user_guide/">OS User Guide</a>
<ul>
<li ><a href="../../../core_os/mynewt_os/">OS Core</a>
</li>
<li ><a href="../../../core_os/porting/port_os/">Porting to your Platform</a>
</li>
<li ><a href="../../console/console/">Console</a>
</li>
<li ><a href="../../shell/shell/">Shell</a>
</li>
<li ><a href="../../split/split/">Split Images</a>
</li>
<li ><a href="../../bootloader/bootloader/">Bootloader</a>
</li>
<li><a href="
../../fs/fs/fs/
">File System</a>
</li>
<li ><a href="../../hal/hal/">Hardware Abstraction Layer</a>
</li>
<li ><a href="../../sensor_framework/sensor_framework_overview/">Sensor Framework</a>
</li>
<li ><a href="../../drivers/driver/">Drivers</a>
</li>
<li ><a href="../../testutil/testutil/">Test Utilities</a>
</li>
<li ><a href="../../devmgmt/newtmgr/">Device Management with Newt Manager</a>
</li>
<li ><a href="../../imgmgr/imgmgr/">Image Manager</a>
</li>
<li >
<a href="../../baselibc/">Baselibc library</a>
</li>
<li ><a href="../../json/json/">JSON</a>
</li>
<li ><a href="../../fcb/fcb/">Flash Circular Buffer</a>
</li>
<li ><a href="../../stats/stats/">Stats</a>
</li>
<li ><a href="../../logs/logs/">Logs</a>
</li>
<li ><a href="../sysinitconfig/">System Configuration And Initialization</a>
<ul>
<li class="active">
<a href="./">Validation and Error Messages</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="
../../../../network/ble/ble_intro/
">BLE User Guide</a>
</li>
<li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a>
</li>
<li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a>
</li>
<li >
<a href="../../../../known_issues/">Known Issues</a>
</li>
</ul>
</li>
<li><a href="
../../../../newt/install/prev_releases/
">Appendix</a>
</li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<div class="doc-header">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="/documentation/">Docs</a></li>
<li>&raquo; <a href="os/modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a></li>
<li>&raquo; <a href="os/os_user_guide/">OS User Guide</a></li>
<li>&raquo; <a href="os/introduction/">Mynewt Documentation</a></li>
<li>&raquo; Validation and Error Messages</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/apache/mynewt-site/blob/master/docs/os/modules/sysinitconfig/sysconfig_error.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
</div>
</div>
<div class="alert alert-warning">
<p>
Version 1.2.0 is not the most recent version of the Apache Mynewt
documentation. Click <a href="/latest">here</a> to read the latest
version.
</p>
</div>
<h2 id="validation-and-error-messages">Validation and Error Messages</h2>
<p>With multiple packages defining and overriding system configuration settings, it
is easy to introduce conflicts and violations that are difficult to find. The
<code>newt build &lt;target-name&gt;</code> 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.<br />
The following sections describe the error conditions that newt detects and
the error messages that it outputs. For most errors, newt also outputs
the <code>Setting history</code> with the order of package overrides to help
you resolve the errors.</p>
<p><strong>Note:</strong> The <code>newt target config &lt;target-name&gt;</code> command also detects
errors and outputs error messages at the top of the command output.
The command outputs the package setting definitions and values after it
outputs the error messages. It is easy to miss the error messages at the top. </p>
<h3 id="value-override-violations">Value Override Violations</h3>
<p>The newt tool uses package priorities to resolve override conflicts. It uses
the value override from the highest priority package when multiple
packages override the same setting. Newt checks for the following
override violations:</p>
<ul>
<li>Ambiguity Violation - Two packages of the same priority override a setting with
different values. And no higher priority package overrides the setting.</li>
<li>
<p>Priority Violation - A package overrides a setting defined by a package with higher or
equal priority. </p>
<p><strong>Note:</strong> 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.</p>
</li>
</ul>
<p><br></p>
<h4 id="example-ambiguity-violation-error-message">Example: Ambiguity Violation Error Message</h4>
<p>The following example shows the error message that newt outputs for an ambiguity violation:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: Syscfg ambiguities detected:
Setting: LOG_NEWTMGR, Packages: [apps/slinky, apps/splitty]
Setting history (newest -&gt; oldest):
LOG_NEWTMGR: [apps/splitty:0, apps/slinky:1, sys/log/full:0]
</code></pre></div>
<p>The above error occurs because the <code>apps/slinky</code> and <code>apps/splitty</code> packages
in the split image target both override the same setting with different
values. The <code>apps/slinky</code> package sets the <code>sys/log/full</code> package <code>LOG_NEWTMGR</code>
setting to 1, and the <code>apps/splitty</code> package sets the setting to 0. The
overrides are ambiguous because both are <code>app</code> packages and
have the same priority. The following are excerpts of the defintion
and the two overrides from the <code>syscfg.yml</code> files that cause the error:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>#Package: sys/log/full
syscfg.defs:
LOG_NEWTMGR:
description: &#39;Enables or disables newtmgr command tool logging&#39;
value: 0
#Package: apps/slinky
syscfg.vals:
LOG_NEWTMGR: 1
#Package: apps/splitty
syscfg.vals:
LOG_NEWTMGR: 0
</code></pre></div>
<h4 id="example-priority-violation-error-message">Example: Priority Violation Error Message</h4>
<p>The following example shows the error message that newt outputs for a priority violation
where a package tries to change the setting that was defined by another package at
the same priority level:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>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
Setting history (newest -&gt; oldest):
LOG_NEWTMGR: [sys/log/full:0]
</code></pre></div>
<p>The above error occurs because the <code>mgmt/newtmgr</code> lib package
overrides the <code>LOG_NEWTMGR</code> setting that the <code>sys/log/full</code> lib package
defines. The following are excerpts of the definition and the override from the
<code>syscfg.yml</code> files that cause this error: </p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>#Package: sys/log/full
syscfg.defs:
LOG_NEWTMGR:
description: &#39;Enables or disables newtmgr command tool logging&#39;
value: 0
#Package: mgmt/newtmgr
syscfg.vals:
LOG_NEWTMGR: 1
</code></pre></div>
<p><br></p>
<h3 id="flash-area-violations">Flash Area Violations</h3>
<p>For <code>flash_owner</code> type setting definitions, newt checks
for the following violations:</p>
<ul>
<li>An undefined flash area is assigned to a setting.</li>
<li>A flash area is assigned to multiple settings.</li>
</ul>
<h4 id="example-undefined-flash-area-error-message">Example: Undefined Flash Area Error Message</h4>
<p>The following example shows the error message that newt outputs for an undefined flash area.</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Building target targets/sim_slinky
Error: Flash errors detected:
Setting REBOOT_LOG_FLASH_AREA specifies unknown flash area: FLASH_AREA_NOEXIST
Setting history (newest -&gt; oldest):
REBOOT_LOG_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NOEXIST, sys/reboot:]
</code></pre></div>
<p>The above error occurs because the <code>hw/bsp/native</code> package assigns the
undefined <code>FLASH_AREA_NOEXIST</code> flash area to the <code>sys/reboot</code> package
<code>REBOOT_LOG_FLASH_AREA</code> setting. The following are excerpts of the definition
and the override from the <code>syscfg.yml</code> files that cause the error:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>#Package: sys/reboot
syscfg.defs:
REBOOT_LOG_FLASH_AREA:
description: &#39;Flash Area to use for reboot log.&#39;
type: flash_owner
value:
#Package: hw/bsp/native
syscfg.vals:
REBOOT_LOG_FLASH_AREA: FLASH_AREA_NOEXIST
</code></pre></div>
<h4 id="example-multiple-flash-area-assignment-error-message">Example: Multiple Flash Area Assignment Error Message</h4>
<p>The following example shows the error message that newt outputs when multiple
settings are assigned the same flash area:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: Flash errors detected:
Multiple flash_owner settings specify the same flash area
settings: REBOOT_LOG_FLASH_AREA, CONFIG_FCB_FLASH_AREA
flash area: FLASH_AREA_NFFS
Setting history (newest -&gt; oldest):
CONFIG_FCB_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS, sys/config:]
REBOOT_LOG_FLASH_AREA: [apps/slinky:FLASH_AREA_NFFS, sys/reboot:]
</code></pre></div>
<p>The above error occurs because the <code>hw/bsp/native</code> package assigns
the <code>FLASH_AREA_NFFS</code> flash area to the <code>sys/config/</code> package
<code>CONFIG_FCB_FLASH_AREA</code> setting, and the <code>apps/slinky</code> package
also assigns <code>FLASH_AREA_NFFS</code> to the <code>sys/reboot</code> package
<code>REBOOT_LOG_FLASH_AREA</code> setting. The following are excerpts of the
two definitions and the two overrides from the <code>syscfg.yml</code> files
that cause the error:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code># Package: sys/config
syscfg.defs.CONFIG_FCB:
CONFIG_FCB_FLASH_AREA:
description: &#39;The flash area for the Config Flash Circular Buffer&#39;
type: &#39;flash_owner&#39;
value:
# Package: sys/reboot
syscfg.defs:
REBOOT_LOG_FLASH_AREA:
description: &#39;The flash area for the reboot log&#39;
type: &#39;flash_owner&#39;
value:
#Package: hw/bsp/native
syscfg.vals:
CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
#Package: apps/slinky
syscfg.vals:
REBOOT_LOG_FLASH_AREA: FLASH_AREA_NFFS
</code></pre></div>
<p><br></p>
<h3 id="restriction-violations">Restriction Violations</h3>
<p>For setting definitions with <code>restrictions</code> specified, newt checks for
the following violations:</p>
<ul>
<li>A setting with a <code>$notnull</code> restriction does not have a value. </li>
<li>For a setting with expression restrictions, some required setting
values in the expressions evaluate to false. </li>
</ul>
<h4 id="example-notnull-restriction-violation-error-message">Example: $notnull Restriction Violation Error Message</h4>
<p>The following example shows the error message that newt outputs when
a setting with <code>$notnull</code> restriction does not have a value:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: Syscfg restriction violations detected:
NFFS_FLASH_AREA must not be null
Setting history (newest -&gt; oldest):
NFFS_FLASH_AREA: [fs/nffs:]
</code></pre></div>
<p>The above error occurs because the <code>fs/nffs</code> package defines the <code>NFFS_FLASH_AREA</code>
setting with a <code>$notnull</code> restriction and no packages override the setting. The
following is an excerpt of the definition in the <code>syscfg.yml</code> file that causes the error:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>#Package: fs/nffs
syscfg.defs:
NFFS_FLASH_AREA:
description: &#39;The flash area to use for the Newtron Flash File System&#39;
type: flash_owner
value:
restrictions:
- $notnull
</code></pre></div>
<h4 id="example-expression-restriction-violation-error-message">Example: Expression Restriction Violation Error Message</h4>
<p>The following example shows the error message that newt outputs for
an expression restriction violation:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: Syscfg restriction violations detected:
CONFIG_FCB=1 requires CONFIG_FCB_FLASH_AREA be set, but CONFIG_FCB_FLASH_AREA=
Setting history (newest -&gt; oldest):
CONFIG_FCB: [targets/sim_slinky:1, sys/config:0]
CONFIG_FCB_FLASH_AREA: [sys/config:]
</code></pre></div>
<p>The above error occurs because the <code>sys/config</code> package defines the <code>CONFIG_FCB</code> setting with
a restriction that when set, requires that the <code>CONFIG_FCB_FLASH_AREA</code> setting must
also be set. The following are excerpts of the definition and the override from the <code>syscfg.yml</code>
files that cause the error:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code># Package: sys/config
syscfg.defs:
CONFIG_FCB:
description: &#39;Uses Config Flash Circular Buffer&#39;
value: 0
restrictions:
- &#39;!CONFIG_NFFS&#39;
- &#39;CONFIG_FCB_FLASH_AREA&#39;
# Package: targets/sim_slinky
syscfg.vals:
CONFIG_FCB: 1
</code></pre></div>
<p><br></p>
<h3 id="task-priority-violations">Task Priority Violations</h3>
<p>For <code>task_priority</code> type setting definitions, newt checks for the following violations:</p>
<ul>
<li>A task priority number is assigned to multiple settings. </li>
<li>The task priority number is greater than 239.</li>
</ul>
<h4 id="example-duplicate-task-priority-assignment-error-message">Example: Duplicate Task Priority Assignment Error Message</h4>
<p>The following example shows the error message that newt outputs when
a task priority number is assigned to multiple settings.</p>
<p><strong>Note:</strong> The settings used in this example are not actual <code>apps/slinky</code> and <code>sys/shell</code> settings.
These settings are created for this example because currently only one Mynewt package
defines a <code>task_priority</code> type setting. </p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: duplicate priority value: setting1=SHELL_TASK_PRIORITY setting2=SLINKY_TASK_PRIORITY pkg1=apps/slinky pkg2=sys/shell value=1
</code></pre></div>
<p>The above error occurs because the <code>apps/slinky</code> package defines a <code>SLINKY_TASK_PRIORITY</code>
setting with a default task priority of 1 and the <code>sys/shell</code> package also defines a
<code>SHELL_TASK_PRIORITY</code> setting with a default task priority of 1.</p>
<h4 id="example-invalid-task-priority-error-message">Example: Invalid Task Priority Error Message</h4>
<p>The following example shows the error message that newt outputs when
a setting is assigned an invalid task priority value:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: invalid priority value: value too great (&gt; 239); setting=SLINKY_TASK_PRIORITY value=240 pkg=apps/slinky
</code></pre></div>
<p>The above error occurs because the <code>apps/slinky</code> package defines the <code>SLINKY_TASK_PRIORITY</code> setting
with 240 for the default task priority value. </p>
<p><strong>Note:</strong> Newt does not output the <code>Setting history</code> with task priority violation error messages. </p>
<p><br></p>
<h3 id="duplicate-system-configuration-setting-definition">Duplicate System Configuration Setting Definition</h3>
<p>A setting definition must be unique. Newt checks that only one package in the
target defines a setting. The following example shows the error message that newt
outputs when multiple packages define the <code>LOG_NEWTMGR</code> setting:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>Error: setting LOG_NEWTMGR redefined
</code></pre></div>
<p><strong>Note:</strong> Newt does not output the <code>Setting history</code> with duplicate setting error messages.
<br></p>
<h3 id="override-of-undefined-system-configuration-setting">Override of Undefined System Configuration Setting</h3>
<p>The <code>newt build</code> command ignores overrides of undefined system configuration settings. The command does not print a warning when you run it with the default log level. If you override a setting and the value is not assigned to the setting, you may have misspelled the setting name or a package no longer defines the setting. You have two options to troubleshoot this problem:</p>
<ul>
<li>Run the <code>newt target config show</code> command to see the configuration setting definitions and overrides.</li>
<li>Run the <code>newt build -ldebug</code> command to build your target with DEBUG log level. </li>
</ul>
<p>Note: The <code>newt build -ldebug</code> command generates lots of output and we recommend that you use the <code>newt target config show</code> command option.
<br></p>
<h4 id="example-ignoring-override-of-undefined-setting-message">Example: Ignoring Override of Undefined Setting Message</h4>
<p>The following example shows that the <code>apps/slinky</code> application overrides the <code>LOG_NEWTMGR</code> setting but omits the <strong>T</strong> as an example of an error and overrides the misspelled <strong>LOG_NEWMGR</strong> setting. Here is an excerpt from its <code>syscfg.yml</code> file: </p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>#package: apps/slinky
syscfg.vals:
# Enable the shell task.
SHELL_TASK: 1
...
# Enable newtmgr commands.
STATS_NEWTMGR: 1
LOG_NEWMGR: 1
</code></pre></div>
<p><br>
The <code>newt target config show slinky_sim</code> command outputs the following WARNING message:</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>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
2017/02/18 17:19:12.119 [WARNING] Setting history (newest -&gt; oldest):
2017/02/18 17:19:12.119 [WARNING] LOG_NEWMGR: [apps/slinky:1]
2017/02/18 17:19:12.119 [WARNING] NFFS_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS]
</code></pre></div>
<p><br></p>
<p>The <code>newt build -ldebug slinky_sim</code> command outputs the following DEBUG message: </p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code>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
2017/02/18 17:06:21.451 [DEBUG] Setting history (newest -&gt; oldest):
2017/02/18 17:06:21.451 [DEBUG] LOG_NEWMGR: [apps/slinky:1]
2017/02/18 17:06:21.451 [DEBUG] NFFS_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS]
</code></pre></div>
<p><br></p>
<h4 id="bsp-package-overrides-undefined-configuration-settings">BSP Package Overrides Undefined Configuration Settings</h4>
<p>You might see a warning that indicates your application's BSP package is overriding some undefined settings. As you can see from the previous example, the WARNING message shows that the <code>hw/bsp/native</code> package is overriding the undefined <code>NFFS_FLASH_AREA</code> setting. This is not an error because of the way a BSP package defines and assigns its flash areas to packages that use flash memory.</p>
<p>A BSP package defines, in its <code>bsp.yml</code> file, a flash area map of the flash areas on the board. A package that uses flash memory must define a flash area configuration setting name. The BSP package overrides the package's flash area setting with one of the flash areas from its flash area map. A BSP package overrides the flash area settings for all packages that use flash memory because it does not know the packages that an application uses. When an application does not include one of these packages, the flash area setting for the package is undefined. You will see a message that indicates the BSP package overrides this undefined setting.</p>
<p>Here are excerpts from the <code>hw/bsp/native</code> package's <code>bsp.yml</code> and <code>syscfg.yml</code> files for the <code>slinky_sim</code> target. The BSP package defines the flash area map in its <code>bsp.yml</code> file and overrides the flash area settings for all packages in its <code>syscfg.yml</code> file. The <code>slinky_sim</code> target does not use the <code>fs/nffs</code> package which defines the <code>NFFS_FLASH_AREA</code> setting. Newt warns that the <code>hw/bsp/native</code> packages overrides the undefined <code>NFFS_FLASH_AREA</code> setting.</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code># hw/bsp/native bsp.yml
bsp.flash_map:
areas:
# System areas.
FLASH_AREA_BOOTLOADER:
device: 0
offset: 0x00000000
size: 16kB
...
FLASH_AREA_IMAGE_SCRATCH:
device: 0
offset: 0x000e0000
size: 128kB
# User areas.
FLASH_AREA_REBOOT_LOG:
user_id: 0
device: 0
offset: 0x00004000
size: 16kB
FLASH_AREA_NFFS:
user_id: 1
device: 0
offset: 0x00008000
# hw/bsp/native syscfg.yml
syscfg.vals:
NFFS_FLASH_AREA: FLASH_AREA_NFFS
CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
</code></pre></div>
<div class="row">
<ul class="nav nav-pills" style="margin-bottom: 10px">
<li>
</li>
<li class="pull-right">
</li>
</ul>
</div>
<footer 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">
<a href="https://www.apache.org/">
<img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
</a>
<p>
Copyright © 2015-2021 The Apache Software Foundation.<br>
<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>
</p>
<a href="">
<img src="https://www.countit.com/images/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
</div>
</div>
<a href="https://www.apache.org/licenses/">
<button class="button-footer-asf">
License
</button>
</a>
<a href="https://www.apache.org/foundation/sponsorship.html">
<button class="button-footer-asf">
Sponsorship
</button>
</a>
<a href="https://www.apache.org/foundation/thanks.html">
<button class="button-footer-asf">
Thanks
</button>
</a>
<a href="https://www.apache.org/security/">
<button class="button-footer-asf">
Security
</button>
</a>
<a href="https://apache.org/events/current-event">
<button class="button-footer-asf">
ASF Events
</button>
</a>
</footer>
</div>
</div>
</div>
<script src="../../../../js/jquery-1.10.2.min.js"></script>
<script src="../../../../js/bootstrap-3.0.3.min.js"></script>
<script src="../../../../js/highlight.pack.js"></script>
<script src="../../../../js/base.js"></script>
<script src="../../../../js/custom.js"></script>
<script src="search/main.js"></script>
</body>
</html>