| |
| |
| <!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>Validation and Error Messages — 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="Compile-Time Configuration and Initialization" href="sysinitconfig.html"/> |
| <link rel="next" title="File System Abstraction" href="../fs/fs.html"/> |
| <link rel="prev" title="Compile-Time Configuration and Initialization" href="sysinitconfig.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.12.0, Apache NimBLE 1.7.0 </a> released April 4, 2024) |
| </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> / |
| |
| <a href="sysinitconfig.html">Compile-Time Configuration and Initialization</a> / |
| |
| Validation and Error Messages |
| |
| <div class="sourcelink"> |
| <a href="https://github.com/apache/mynewt-core/edit/master/docs/os/modules/sysinitconfig/sysconfig_error.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_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" selected="selected" > |
| 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 & 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="reference internal" href="sysinitconfig.html">Compile-Time Configuration</a><ul class="current"> |
| <li class="toctree-l3 current"><a class="current reference internal" href="#">Validation and Error Messages</a></li> |
| </ul> |
| </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> |
| </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="alert alert-warning"> |
| <p> |
| Version 1.6.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> |
| |
| |
| |
| <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="validation-and-error-messages"> |
| <h1>Validation and Error Messages<a class="headerlink" href="#validation-and-error-messages" title="Permalink to this headline">¶</a></h1> |
| <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 class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">build</span> <span class="pre"><target-name></span></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.</p> |
| <p>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 class="docutils literal notranslate"><span class="pre">Setting</span> <span class="pre">history</span></code> with the order of package overrides to |
| help you resolve the errors.</p> |
| <div class="contents local topic" id="contents"> |
| <ul class="simple"> |
| <li><p><a class="reference internal" href="#value-override-violations" id="id1">Value Override Violations</a></p> |
| <ul> |
| <li><p><a class="reference internal" href="#example-ambiguity-violation-error-message" id="id2">Example: Ambiguity Violation Error Message</a></p></li> |
| <li><p><a class="reference internal" href="#example-priority-violation-error-message" id="id3">Example: Priority Violation Error Message</a></p></li> |
| </ul> |
| </li> |
| <li><p><a class="reference internal" href="#flash-area-violations" id="id4">Flash Area Violations</a></p> |
| <ul> |
| <li><p><a class="reference internal" href="#example-undefined-flash-area-error-message" id="id5">Example: Undefined Flash Area Error Message</a></p></li> |
| <li><p><a class="reference internal" href="#example-multiple-flash-area-assignment-error-message" id="id6">Example: Multiple Flash Area Assignment Error Message</a></p></li> |
| </ul> |
| </li> |
| <li><p><a class="reference internal" href="#restriction-violations" id="id7">Restriction Violations</a></p> |
| <ul> |
| <li><p><a class="reference internal" href="#example-notnull-restriction-violation-error-message" id="id8">Example: $notnull Restriction Violation Error Message</a></p></li> |
| <li><p><a class="reference internal" href="#example-expression-restriction-violation-error-message" id="id9">Example: Expression Restriction Violation Error Message</a></p></li> |
| </ul> |
| </li> |
| <li><p><a class="reference internal" href="#task-priority-violations" id="id10">Task Priority Violations</a></p> |
| <ul> |
| <li><p><a class="reference internal" href="#example-duplicate-task-priority-assignment-error-message" id="id11">Example: Duplicate Task Priority Assignment Error Message</a></p></li> |
| <li><p><a class="reference internal" href="#example-invalid-task-priority-error-message" id="id12">Example: Invalid Task Priority Error Message</a></p></li> |
| </ul> |
| </li> |
| <li><p><a class="reference internal" href="#duplicate-system-configuration-setting-definition" id="id13">Duplicate System Configuration Setting Definition</a></p></li> |
| <li><p><a class="reference internal" href="#override-of-undefined-system-configuration-setting" id="id14">Override of Undefined System Configuration Setting</a></p> |
| <ul> |
| <li><p><a class="reference internal" href="#example-ignoring-override-of-undefined-setting-message" id="id15">Example: Ignoring Override of Undefined Setting Message</a></p></li> |
| <li><p><a class="reference internal" href="#bsp-package-overrides-undefined-configuration-settings" id="id16">BSP Package Overrides Undefined Configuration Settings</a></p></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <p><strong>Note:</strong> The <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">target</span> <span class="pre">config</span> <span class="pre"><target-name></span></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> |
| <div class="section" id="value-override-violations"> |
| <h2><a class="toc-backref" href="#id1">Value Override Violations</a><a class="headerlink" href="#value-override-violations" title="Permalink to this headline">¶</a></h2> |
| <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 class="simple"> |
| <li><p>Ambiguity Violation - Two packages of the same priority override a |
| setting with different values. And no higher priority package |
| overrides the setting.</p></li> |
| <li><p>Priority Violation - A package overrides a setting defined by a |
| package with higher or equal priority.</p></li> |
| </ul> |
| <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> |
| <div class="section" id="example-ambiguity-violation-error-message"> |
| <h3><a class="toc-backref" href="#id2">Example: Ambiguity Violation Error Message</a><a class="headerlink" href="#example-ambiguity-violation-error-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows the error message that newt outputs for an |
| ambiguity violation:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: Syscfg ambiguities detected:</span> |
| <span class="go"> Setting: LOG_NEWTMGR, Packages: [apps/slinky, apps/splitty]</span> |
| <span class="go">Setting history (newest -> oldest):</span> |
| <span class="go"> LOG_NEWTMGR: [apps/splitty:0, apps/slinky:1, sys/log/full:0]</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> and <code class="docutils literal notranslate"><span class="pre">apps/splitty</span></code> |
| packages in the split image target both override the same setting with |
| different values. The <code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> package sets the <code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> |
| package <code class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></code> setting to 1, and the <code class="docutils literal notranslate"><span class="pre">apps/splitty</span></code> package |
| sets the setting to 0. The overrides are ambiguous because both are |
| <code class="docutils literal notranslate"><span class="pre">app</span></code> packages and have the same priority. The following are excerpts |
| of the defintion and the two overrides from the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files |
| that cause the error:</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1">#Package: sys/log/full</span> |
| <span class="nt">syscfg.defs</span><span class="p">:</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">'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'</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="c1">#Package: apps/slinky</span> |
| <span class="nt">syscfg.vals</span><span class="p">:</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> |
| |
| <span class="c1">#Package: apps/splitty</span> |
| <span class="nt">syscfg.vals</span><span class="p">:</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">0</span> |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="example-priority-violation-error-message"> |
| <h3><a class="toc-backref" href="#id3">Example: Priority Violation Error Message</a><a class="headerlink" href="#example-priority-violation-error-message" title="Permalink to this headline">¶</a></h3> |
| <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="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: Priority violations detected (Packages can only override settings defined by packages of lower priority):</span> |
| <span class="go"> Package: mgmt/newtmgr overriding setting: LOG_NEWTMGR defined by sys/log/full</span> |
| |
| <span class="go">Setting history (newest -> oldest):</span> |
| <span class="go"> LOG_NEWTMGR: [sys/log/full:0]</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">mgmt/newtmgr</span></code> lib package |
| overrides the <code class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></code> setting that the <code class="docutils literal notranslate"><span class="pre">sys/log/full</span></code> lib |
| package defines. The following are excerpts of the definition and the |
| override from the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files that cause this error:</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1">#Package: sys/log/full</span> |
| <span class="nt">syscfg.defs</span><span class="p">:</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">'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'</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="c1">#Package: mgmt/newtmgr</span> |
| <span class="nt">syscfg.vals</span><span class="p">:</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> |
| <div class="section" id="flash-area-violations"> |
| <h2><a class="toc-backref" href="#id4">Flash Area Violations</a><a class="headerlink" href="#flash-area-violations" title="Permalink to this headline">¶</a></h2> |
| <p>For <code class="docutils literal notranslate"><span class="pre">flash_owner</span></code> type setting definitions, newt checks for the |
| following violations:</p> |
| <ul class="simple"> |
| <li><p>An undefined flash area is assigned to a setting.</p></li> |
| <li><p>A flash area is assigned to multiple settings.</p></li> |
| </ul> |
| <div class="section" id="example-undefined-flash-area-error-message"> |
| <h3><a class="toc-backref" href="#id5">Example: Undefined Flash Area Error Message</a><a class="headerlink" href="#example-undefined-flash-area-error-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows the error message that newt outputs for an |
| undefined flash area.</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Building target targets/sim_slinky</span> |
| <span class="go">Error: Flash errors detected:</span> |
| <span class="go"> Setting REBOOT_LOG_FLASH_AREA specifies unknown flash area: FLASH_AREA_NOEXIST</span> |
| |
| <span class="go">Setting history (newest -> oldest):</span> |
| <span class="go"> REBOOT_LOG_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NOEXIST, sys/reboot:]</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">hw/bsp/native</span></code> package assigns the |
| undefined <code class="docutils literal notranslate"><span class="pre">FLASH_AREA_NOEXIST</span></code> flash area to the <code class="docutils literal notranslate"><span class="pre">sys/reboot</span></code> |
| package <code class="docutils literal notranslate"><span class="pre">REBOOT_LOG_FLASH_AREA</span></code> setting. The following are excerpts of |
| the definition and the override from the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files that cause |
| the error:</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1">#Package: sys/reboot</span> |
| <span class="nt">syscfg.defs</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">REBOOT_LOG_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">'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">reboot</span><span class="nv"> </span><span class="s">log.'</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="c1">#Package: hw/bsp/native</span> |
| <span class="nt">syscfg.vals</span><span class="p">:</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_NOEXIST</span> |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="example-multiple-flash-area-assignment-error-message"> |
| <h3><a class="toc-backref" href="#id6">Example: Multiple Flash Area Assignment Error Message</a><a class="headerlink" href="#example-multiple-flash-area-assignment-error-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows the error message that newt outputs when |
| multiple settings are assigned the same flash area:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: Flash errors detected:</span> |
| <span class="go"> Multiple flash_owner settings specify the same flash area</span> |
| <span class="go"> settings: REBOOT_LOG_FLASH_AREA, CONFIG_FCB_FLASH_AREA</span> |
| <span class="go"> flash area: FLASH_AREA_NFFS</span> |
| |
| <span class="go">Setting history (newest -> oldest):</span> |
| <span class="go"> CONFIG_FCB_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS, sys/config:]</span> |
| <span class="go"> REBOOT_LOG_FLASH_AREA: [apps/slinky:FLASH_AREA_NFFS, sys/reboot:]</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">hw/bsp/native</span></code> package assigns the |
| <code class="docutils literal notranslate"><span class="pre">FLASH_AREA_NFFS</span></code> flash area to the <code class="docutils literal notranslate"><span class="pre">sys/config/</span></code> package |
| <code class="docutils literal notranslate"><span class="pre">CONFIG_FCB_FLASH_AREA</span></code> setting, and the <code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> package also |
| assigns <code class="docutils literal notranslate"><span class="pre">FLASH_AREA_NFFS</span></code> to the <code class="docutils literal notranslate"><span class="pre">sys/reboot</span></code> package |
| <code class="docutils literal notranslate"><span class="pre">REBOOT_LOG_FLASH_AREA</span></code> setting. The following are excerpts of the two |
| definitions and the two overrides from the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> files that |
| cause the error:</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Package: sys/config</span> |
| <span class="nt">syscfg.defs.CONFIG_FCB</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="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s">'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">for</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">Config</span><span class="nv"> </span><span class="s">Flash</span><span class="nv"> </span><span class="s">Circular</span><span class="nv"> </span><span class="s">Buffer'</span> |
| <span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="s">'flash_owner'</span> |
| <span class="w"> </span><span class="nt">value</span><span class="p">:</span> |
| |
| <span class="c1"># Package: sys/reboot</span> |
| <span class="nt">syscfg.defs</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">REBOOT_LOG_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">'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">for</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">reboot</span><span class="nv"> </span><span class="s">log'</span> |
| <span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="s">'flash_owner'</span> |
| <span class="w"> </span><span class="nt">value</span><span class="p">:</span> |
| |
| <span class="c1">#Package: hw/bsp/native</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="c1">#Package: apps/slinky</span> |
| <span class="nt">syscfg.vals</span><span class="p">:</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_NFFS</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="restriction-violations"> |
| <h2><a class="toc-backref" href="#id7">Restriction Violations</a><a class="headerlink" href="#restriction-violations" title="Permalink to this headline">¶</a></h2> |
| <p>For setting definitions with <code class="docutils literal notranslate"><span class="pre">restrictions</span></code> specified, newt checks for the following violations:</p> |
| <ul class="simple"> |
| <li><p>A setting with a <code class="docutils literal notranslate"><span class="pre">$notnull</span></code> restriction does not have a value.</p></li> |
| <li><p>For a setting with expression restrictions, some required setting |
| values in the expressions evaluate to false.</p></li> |
| </ul> |
| <div class="section" id="example-notnull-restriction-violation-error-message"> |
| <h3><a class="toc-backref" href="#id8">Example: $notnull Restriction Violation Error Message</a><a class="headerlink" href="#example-notnull-restriction-violation-error-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows the error message that newt outputs when a |
| setting with <code class="docutils literal notranslate"><span class="pre">$notnull</span></code> restriction does not have a value:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: Syscfg restriction violations detected:</span> |
| <span class="go"> NFFS_FLASH_AREA must not be null</span> |
| |
| <span class="go">Setting history (newest -> oldest):</span> |
| <span class="go"> NFFS_FLASH_AREA: [fs/nffs:]</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">fs/nffs</span></code> package defines the |
| <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code> setting with a <code class="docutils literal notranslate"><span class="pre">$notnull</span></code> restriction and no |
| packages override the setting. The following is an excerpt of the |
| definition in the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file that causes the error:</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1">#Package: fs/nffs</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">'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'</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> |
| </div> |
| <div class="section" id="example-expression-restriction-violation-error-message"> |
| <h3><a class="toc-backref" href="#id9">Example: Expression Restriction Violation Error Message</a><a class="headerlink" href="#example-expression-restriction-violation-error-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows the error message that newt outputs for an |
| expression restriction violation:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: Syscfg restriction violations detected:</span> |
| <span class="go"> CONFIG_FCB=1 requires CONFIG_FCB_FLASH_AREA be set, but CONFIG_FCB_FLASH_AREA=</span> |
| |
| <span class="go">Setting history (newest -> oldest):</span> |
| <span class="go"> CONFIG_FCB: [targets/sim_slinky:1, sys/config:0]</span> |
| <span class="go"> CONFIG_FCB_FLASH_AREA: [sys/config:]</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">sys/config</span></code> package defines the |
| <code class="docutils literal notranslate"><span class="pre">CONFIG_FCB</span></code> setting with a restriction that when set, requires that |
| the <code class="docutils literal notranslate"><span class="pre">CONFIG_FCB_FLASH_AREA</span></code> setting must also be set. The following |
| are excerpts of the definition and the override from the <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> |
| files that cause the error:</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Package: sys/config</span> |
| <span class="nt">syscfg.defs</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">CONFIG_FCB</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">'Uses</span><span class="nv"> </span><span class="s">Config</span><span class="nv"> </span><span class="s">Flash</span><span class="nv"> </span><span class="s">Circular</span><span class="nv"> </span><span class="s">Buffer'</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">restrictions</span><span class="p">:</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">'!CONFIG_NFFS'</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">'CONFIG_FCB_FLASH_AREA'</span> |
| |
| <span class="c1"># Package: targets/sim_slinky</span> |
| <span class="nt">syscfg.vals</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">CONFIG_FCB</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="task-priority-violations"> |
| <h2><a class="toc-backref" href="#id10">Task Priority Violations</a><a class="headerlink" href="#task-priority-violations" title="Permalink to this headline">¶</a></h2> |
| <p>For <code class="docutils literal notranslate"><span class="pre">task_priority</span></code> type setting definitions, newt checks for the |
| following violations:</p> |
| <ul class="simple"> |
| <li><p>A task priority number is assigned to multiple settings.</p></li> |
| <li><p>The task priority number is greater than 239.</p></li> |
| </ul> |
| <div class="section" id="example-duplicate-task-priority-assignment-error-message"> |
| <h3><a class="toc-backref" href="#id11">Example: Duplicate Task Priority Assignment Error Message</a><a class="headerlink" href="#example-duplicate-task-priority-assignment-error-message" title="Permalink to this headline">¶</a></h3> |
| <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 class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> and <code class="docutils literal notranslate"><span class="pre">sys/shell</span></code> settings. These settings are created |
| for this example because currently only one Mynewt package defines a |
| <code class="docutils literal notranslate"><span class="pre">task_priority</span></code> type setting.</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: duplicate priority value: setting1=SHELL_TASK_PRIORITY setting2=SLINKY_TASK_PRIORITY pkg1=apps/slinky pkg2=sys/shell value=1</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> package defines a |
| <code class="docutils literal notranslate"><span class="pre">SLINKY_TASK_PRIORITY</span></code> setting with a default task priority of 1 and |
| the <code class="docutils literal notranslate"><span class="pre">sys/shell</span></code> package also defines a <code class="docutils literal notranslate"><span class="pre">SHELL_TASK_PRIORITY</span></code> setting |
| with a default task priority of 1.</p> |
| </div> |
| <div class="section" id="example-invalid-task-priority-error-message"> |
| <h3><a class="toc-backref" href="#id12">Example: Invalid Task Priority Error Message</a><a class="headerlink" href="#example-invalid-task-priority-error-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows the error message that newt outputs when a |
| setting is assigned an invalid task priority value:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: invalid priority value: value too great (> 239); setting=SLINKY_TASK_PRIORITY value=240 pkg=apps/slinky</span> |
| </pre></div> |
| </div> |
| <p>The above error occurs because the <code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> package defines the |
| <code class="docutils literal notranslate"><span class="pre">SLINKY_TASK_PRIORITY</span></code> setting with 240 for the default task priority |
| value.</p> |
| <p><strong>Note:</strong> Newt does not output the <code class="docutils literal notranslate"><span class="pre">Setting</span> <span class="pre">history</span></code> with task |
| priority violation error messages.</p> |
| </div> |
| </div> |
| <div class="section" id="duplicate-system-configuration-setting-definition"> |
| <h2><a class="toc-backref" href="#id13">Duplicate System Configuration Setting Definition</a><a class="headerlink" href="#duplicate-system-configuration-setting-definition" title="Permalink to this headline">¶</a></h2> |
| <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 class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></code> setting:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">Error: setting LOG_NEWTMGR redefined</span> |
| </pre></div> |
| </div> |
| <p><strong>Note:</strong> Newt does not output the <code class="docutils literal notranslate"><span class="pre">Setting</span> <span class="pre">history</span></code> with duplicate |
| setting error messages.</p> |
| </div> |
| <div class="section" id="override-of-undefined-system-configuration-setting"> |
| <h2><a class="toc-backref" href="#id14">Override of Undefined System Configuration Setting</a><a class="headerlink" href="#override-of-undefined-system-configuration-setting" title="Permalink to this headline">¶</a></h2> |
| <p>The <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">build</span></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 class="simple"> |
| <li><p>Run 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></code> command to see the configuration |
| setting definitions and overrides.</p></li> |
| <li><p>Run the <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">build</span> <span class="pre">-ldebug</span></code> command to build your target with |
| DEBUG log level.</p></li> |
| </ul> |
| <p>Note: The <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">build</span> <span class="pre">-ldebug</span></code> command generates lots of output and we |
| recommend that you 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></code> command option.</p> |
| <div class="section" id="example-ignoring-override-of-undefined-setting-message"> |
| <h3><a class="toc-backref" href="#id15">Example: Ignoring Override of Undefined Setting Message</a><a class="headerlink" href="#example-ignoring-override-of-undefined-setting-message" title="Permalink to this headline">¶</a></h3> |
| <p>The following example shows that the <code class="docutils literal notranslate"><span class="pre">apps/slinky</span></code> application |
| overrides the <code class="docutils literal notranslate"><span class="pre">LOG_NEWTMGR</span></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 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="c1">#package: apps/slinky</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_NEWMGR</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span> |
| </pre></div> |
| </div> |
| <p>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">slinky_sim</span></code> command outputs the |
| following WARNING message:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">2017/02/18 17:19:12.119 [WARNING] Ignoring override of undefined settings:</span> |
| <span class="go">2017/02/18 17:19:12.119 [WARNING] LOG_NEWMGR</span> |
| <span class="go">2017/02/18 17:19:12.119 [WARNING] NFFS_FLASH_AREA</span> |
| <span class="go">2017/02/18 17:19:12.119 [WARNING] Setting history (newest -> oldest):</span> |
| <span class="go">2017/02/18 17:19:12.119 [WARNING] LOG_NEWMGR: [apps/slinky:1]</span> |
| <span class="go">2017/02/18 17:19:12.119 [WARNING] NFFS_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS]</span> |
| </pre></div> |
| </div> |
| <p>The <code class="docutils literal notranslate"><span class="pre">newt</span> <span class="pre">build</span> <span class="pre">-ldebug</span> <span class="pre">slinky_sim</span></code> command outputs the following |
| DEBUG message:</p> |
| <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">2017/02/18 17:06:21.451 [DEBUG] Ignoring override of undefined settings:</span> |
| <span class="go">2017/02/18 17:06:21.451 [DEBUG] LOG_NEWMGR</span> |
| <span class="go">2017/02/18 17:06:21.451 [DEBUG] NFFS_FLASH_AREA</span> |
| <span class="go">2017/02/18 17:06:21.451 [DEBUG] Setting history (newest -> oldest):</span> |
| <span class="go">2017/02/18 17:06:21.451 [DEBUG] LOG_NEWMGR: [apps/slinky:1]</span> |
| <span class="go">2017/02/18 17:06:21.451 [DEBUG] NFFS_FLASH_AREA: [hw/bsp/native:FLASH_AREA_NFFS]</span> |
| </pre></div> |
| </div> |
| </div> |
| <div class="section" id="bsp-package-overrides-undefined-configuration-settings"> |
| <h3><a class="toc-backref" href="#id16">BSP Package Overrides Undefined Configuration Settings</a><a class="headerlink" href="#bsp-package-overrides-undefined-configuration-settings" title="Permalink to this headline">¶</a></h3> |
| <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 class="docutils literal notranslate"><span class="pre">hw/bsp/native</span></code> package is |
| overriding the undefined <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></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 class="docutils literal notranslate"><span class="pre">bsp.yml</span></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 class="docutils literal notranslate"><span class="pre">hw/bsp/native</span></code> package’s <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 for the <code class="docutils literal notranslate"><span class="pre">slinky_sim</span></code> target. The BSP package |
| defines the flash area map in its <code class="docutils literal notranslate"><span class="pre">bsp.yml</span></code> file and overrides the |
| flash area settings for all packages in its <code class="docutils literal notranslate"><span class="pre">syscfg.yml</span></code> file. The |
| <code class="docutils literal notranslate"><span class="pre">slinky_sim</span></code> target does not use the <code class="docutils literal notranslate"><span class="pre">fs/nffs</span></code> package which defines |
| the <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code> setting. Newt warns that the <code class="docutils literal notranslate"><span class="pre">hw/bsp/native</span></code> |
| packages overrides the undefined <code class="docutils literal notranslate"><span class="pre">NFFS_FLASH_AREA</span></code> setting.</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># hw/bsp/native bsp.yml</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="nt">FLASH_AREA_IMAGE_SCRATCH</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">0x000e0000</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">128kB</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="c1"># hw/bsp/native syscfg.yml</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> |
| <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> |
| </pre></div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| |
| <div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../fs/fs.html" class="btn btn-neutral float-right" title="File System Abstraction" accesskey="n">Next: File System Abstraction <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="sysinitconfig.html" class="btn btn-neutral" title="Compile-Time Configuration and Initialization" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: Compile-Time Configuration and Initialization</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> |