You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/06/20 21:42:38 UTC

[36/51] [partial] incubator-mynewt-site git commit: generated two versions of docs - develop and v0_9_0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d18c34dd/develop/network/ble/ini_stack/ble_parent_ini/index.html
----------------------------------------------------------------------
diff --git a/develop/network/ble/ini_stack/ble_parent_ini/index.html b/develop/network/ble/ini_stack/ble_parent_ini/index.html
new file mode 100644
index 0000000..aaaaa99
--- /dev/null
+++ b/develop/network/ble/ini_stack/ble_parent_ini/index.html
@@ -0,0 +1,615 @@
+<!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">
+        
+        
+        <link rel="canonical" href="http://mynewt.apache.org/network/ble/ini_stack/ble_parent_ini/">
+        <link rel="shortcut icon" href="../../../../img/favicon.ico">
+
+	<title>Initialize parent task - Apache Mynewt</title>
+
+        <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link href="../../../../css/font-awesome-4.0.3.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=Roboto:400,500,700,900,300,100' rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+        <link href="../../../../extra.css" rel="stylesheet">
+
+        <!-- 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="Initialize parent task">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 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="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">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>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" alt="MyNewt" title="MyNewt">
+        <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="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/get_started/get_started/">Basic Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../nimble_setup/">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_ini_intro/">Initialize stack</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li >
+      <a href="../ble_add_cpu/">Add cputime</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_mempool/">Create mem pool</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_devadd/">Initialize device addr</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_statpkg/">Initialize stats pkg</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_consolepkg/">Initialize console pkg</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_controller_ini/">Initialize controller</a>
+    </li>
+
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">Initialize parent task</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_host_ini/">Initialize host</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../bletiny_api/">API for bletiny app</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../ble_intro/">BLE User Guide</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../ble_ini_intro/">Initialize stack</a></li>
+        
+      
+      
+        <li>&raquo; Initialize parent task</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="create-the-host-parent-task">Create the host parent task</h2>
+<p>The NimBLE stack requires an application task to function.  One application
+task in particular is designated as the <em>host parent task</em>.  In addition to
+application-specific work, the host parent task does work for NimBLE by
+processing events generated by the host.</p>
+<p>The process of creating an OS task is described in the <a href="#../../../../os/tutorials/event_queue/">Add Task
+tutorial</a>.</p>
+<p><strong>Priority:</strong>
+It is up to you which priority to use for the host parent task.  Unlike the
+controller, the host does not have any strict timing requirements, so the
+priority should be based on the application's needs.  In the below example, we
+use a priority of <strong>1</strong>.</p>
+<p><strong>Stack size:</strong>
+The host parent task's stack needs to be sufficiently large to handle BLE
+operations.  This depends on the set of BLE features your application uses, and
+on the specifics application callbacks that the stack is configured to use.  A
+safe value is to use here is <strong>300 words</strong>; that is the value used in the below
+example.</p>
+<p>The parent task must do two things:</p>
+<ul>
+<li>Call <code>ble_hs_start()</code> before starting its task loop.</li>
+<li>Handle <em>OS_EVENT_T_TIMER</em> events within its task loop.</li>
+</ul>
+<p>The <code>ble_hs_start()</code> function is declared as follows:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">int</span> <span style="color: #000000">ble_hs_start</span>(<span style="color: #A90D91">void</span>)
+</pre></div>
+
+
+<p>The <code>ble_hs_start()</code> function causes the host to send a sequence of HCI
+commands to the controller.  This sequence of commands is necessary for the
+host and controller to remain in sync.</p>
+<p>We add an application task to our example below.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="background-color: #ffffcc"><span style="color: #633820">#include &quot;os/os.h&quot;</span>
+</span>
+<span style="background-color: #ffffcc"><span style="color: #177500">/** Application task. */</span>
+</span><span style="background-color: #ffffcc"><span style="color: #A90D91">static</span> <span style="color: #A90D91">struct</span> <span style="color: #000000">os_task</span> <span style="color: #000000">app_task</span>;
+</span>
+<span style="background-color: #ffffcc"><span style="color: #177500">/** Application task event queue. */</span>
+</span><span style="background-color: #ffffcc"><span style="color: #A90D91">static</span> <span style="color: #A90D91">struct</span> <span style="color: #000000">os_eventq</span> <span style="color: #000000">app_evq</span>;
+</span>
+<span style="background-color: #ffffcc"><span style="color: #177500">/** Application task stack. */</span>
+</span><span style="background-color: #ffffcc"><span style="color: #633820">#define APP_STACK_SIZE          (OS_STACK_ALIGN(300))</span>
+</span><span style="background-color: #ffffcc"><span style="color: #A90D91">static</span> <span style="color: #A90D91">os_stack_t</span> <span style="color: #000000">app_stack</span>[<span style="color: #000000">APP_STACK_SIZE</span>];
+</span>
+<span style="background-color: #ffffcc"><span style="color: #177500">/**</span>
+</span><span style="background-color: #ffffcc"><span style="color: #177500"> * Application task.</span>
+</span><span style="background-color: #ffffcc"><span style="color: #177500"> */</span>
+</span><span style="background-color: #ffffcc"><span style="color: #A90D91">static</span> <span style="color: #A90D91">void</span>
+</span><span style="background-color: #ffffcc"><span style="color: #000000">app_task_handler</span>(<span style="color: #A90D91">void</span> <span style="color: #000000">*arg</span>)
+</span><span style="background-color: #ffffcc">{
+</span><span style="background-color: #ffffcc">    <span style="color: #A90D91">struct</span> <span style="color: #000000">os_callout_func</span> <span style="color: #000000">*cf</span>;
+</span><span style="background-color: #ffffcc">    <span style="color: #A90D91">struct</span> <span style="color: #000000">os_event</span> <span style="color: #000000">*ev</span>;
+</span><span style="background-color: #ffffcc">    <span style="color: #A90D91">int</span> <span style="color: #000000">rc</span>;
+</span>
+<span style="background-color: #ffffcc">    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">ble_hs_start</span>();
+</span><span style="background-color: #ffffcc">    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+</span>
+<span style="background-color: #ffffcc">    <span style="color: #A90D91">while</span> (<span style="color: #1C01CE">1</span>) {
+</span><span style="background-color: #ffffcc">        <span style="color: #000000">ev</span> <span style="color: #000000">=</span> <span style="color: #000000">os_eventq_get</span>(<span style="color: #000000">&amp;app_evq</span>);
+</span><span style="background-color: #ffffcc">        <span style="color: #A90D91">switch</span> (<span style="color: #000000">ev-&gt;ev_type</span>) {
+</span><span style="background-color: #ffffcc">        <span style="color: #A90D91">case</span> <span style="color: #000000">OS_EVENT_T_TIMER</span>:
+</span><span style="background-color: #ffffcc">            <span style="color: #000000">cf</span> <span style="color: #000000">=</span> (<span style="color: #A90D91">struct</span> <span style="color: #000000">os_callout_func</span> <span style="color: #000000">*</span>)<span style="color: #000000">ev</span>;
+</span><span style="background-color: #ffffcc">            <span style="color: #000000">assert</span>(<span style="color: #000000">cf-&gt;cf_func</span>);
+</span><span style="background-color: #ffffcc">            <span style="color: #000000">cf-&gt;cf_func</span>(<span style="color: #000000">cf-&gt;cf_arg</span>);
+</span><span style="background-color: #ffffcc">            <span style="color: #A90D91">break</span>;
+</span><span style="background-color: #ffffcc">        <span style="color: #A90D91">default</span><span style="color: #000000">:</span>
+</span><span style="background-color: #ffffcc">            <span style="color: #000000">assert</span>(<span style="color: #1C01CE">0</span>);
+</span><span style="background-color: #ffffcc">            <span style="color: #A90D91">break</span>;
+</span><span style="background-color: #ffffcc">        }
+</span><span style="background-color: #ffffcc">    }
+</span><span style="background-color: #ffffcc">}
+</span>
+<span style="color: #A90D91">int</span>
+<span style="color: #000000">main</span>(<span style="color: #A90D91">void</span>)
+{
+    <span style="color: #A90D91">int</span> <span style="color: #000000">rc</span>;
+
+    <span style="color: #177500">/* Initialize OS */</span>
+    <span style="color: #000000">os_init</span>();
+
+    <span style="color: #177500">/* Set cputime to count at 1 usec increments */</span>
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">cputime_init</span>(<span style="color: #1C01CE">1000000</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #177500">/* Create memory pool for Nimble packets and register with Msys */</span>
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_mempool_init</span>(<span style="color: #000000">&amp;g_mbuf_mempool</span>, <span style="color: #000000">MBUF_NUM_MBUFS</span>,
+            <span style="color: #000000">MBUF_MEMBLOCK_SIZE</span>, <span style="color: #000000">&amp;g_mbuf_buffer</span>[<span style="color: #1C01CE">0</span>], <span style="color: #C41A16">&quot;mbuf_pool&quot;</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_mbuf_pool_init</span>(<span style="color: #000000">&amp;g_mbuf_pool</span>, <span style="color: #000000">&amp;g_mbuf_mempool</span>, <span style="color: #000000">MBUF_MEMBLOCK_SIZE</span>,
+                           <span style="color: #000000">MBUF_NUM_MBUFS</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_msys_register</span>(<span style="color: #000000">&amp;g_mbuf_pool</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #177500">/* Initialize our device address */</span>
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">0</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x33</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">1</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x22</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">2</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x11</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">3</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0xcc</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">4</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0xbb</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">5</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x0a</span>;
+
+    <span style="color: #177500">/* Initialize the statistics package */</span>
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">stats_module_init</span>();
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #177500">/* Initialize the BLE LL */</span>
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">ble_ll_init</span>(<span style="color: #1C01CE">0</span>, <span style="color: #1C01CE">7</span>, <span style="color: #1C01CE">260</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+<span style="background-color: #ffffcc">    <span style="color: #177500">/* Initialize the application task. */</span>
+</span><span style="background-color: #ffffcc">    <span style="color: #000000">os_eventq_init</span>(<span style="color: #000000">&amp;app_evq</span>);
+</span><span style="background-color: #ffffcc">    <span style="color: #000000">os_task_init</span>(<span style="color: #000000">&amp;app_task</span>, <span style="color: #C41A16">&quot;app&quot;</span>, <span style="color: #000000">app_task_handler</span>, <span style="color: #A90D91">NULL</span>, <span style="color: #1C01CE">1</span>, <span style="color: #000000">OS_WAIT_FOREVER</span>,
+</span><span style="background-color: #ffffcc">                 <span style="color: #000000">app_stack</span>, <span style="color: #000000">APP_STACK_SIZE</span>);
+</span><span style="background-color: #ffffcc">
+</span>    <span style="color: #177500">/* Start the OS */</span>
+    <span style="color: #000000">os_start</span>();
+
+    <span style="color: #177500">/* os start should never return. If it does, this should be an error */</span>
+    <span style="color: #000000">assert</span>(<span style="color: #1C01CE">0</span>);
+}
+</pre></div>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../ble_controller_ini/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: Initialize controller
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../ble_host_ini/>
+        Next: Initialize host
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.<br>The Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </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>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d18c34dd/develop/network/ble/ini_stack/ble_statpkg/index.html
----------------------------------------------------------------------
diff --git a/develop/network/ble/ini_stack/ble_statpkg/index.html b/develop/network/ble/ini_stack/ble_statpkg/index.html
new file mode 100644
index 0000000..c7627fe
--- /dev/null
+++ b/develop/network/ble/ini_stack/ble_statpkg/index.html
@@ -0,0 +1,541 @@
+<!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">
+        
+        
+        <link rel="canonical" href="http://mynewt.apache.org/network/ble/ini_stack/ble_statpkg/">
+        <link rel="shortcut icon" href="../../../../img/favicon.ico">
+
+	<title>Initialize stats pkg - Apache Mynewt</title>
+
+        <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link href="../../../../css/font-awesome-4.0.3.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=Roboto:400,500,700,900,300,100' rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+        <link href="../../../../extra.css" rel="stylesheet">
+
+        <!-- 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="Initialize stats pkg">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 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="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">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>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" alt="MyNewt" title="MyNewt">
+        <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="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/get_started/get_started/">Basic Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../nimble_setup/">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_ini_intro/">Initialize stack</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li >
+      <a href="../ble_add_cpu/">Add cputime</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_mempool/">Create mem pool</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_devadd/">Initialize device addr</a>
+    </li>
+
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">Initialize stats pkg</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_consolepkg/">Initialize console pkg</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_controller_ini/">Initialize controller</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_parent_ini/">Initialize parent task</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_host_ini/">Initialize host</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../bletiny_api/">API for bletiny app</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../ble_intro/">BLE User Guide</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../ble_ini_intro/">Initialize stack</a></li>
+        
+      
+      
+        <li>&raquo; Initialize stats pkg</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="initialize-the-statistics-package">Initialize the statistics package</h2>
+<p>The NimBLE stack uses the statistics package and this must be initialized prior to initializing the Nimble stack. Initializing the statistics package is quite simple; all you need to do is call the initialization function <code>stats_module_init()</code>.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="background-color: #ffffcc"><span style="color: #633820">#include &quot;stats/stats.h&quot;</span>
+</span>
+<span style="color: #A90D91">int</span>
+<span style="color: #000000">main</span>(<span style="color: #A90D91">void</span>)
+{
+    <span style="color: #A90D91">int</span> <span style="color: #000000">rc</span>;
+
+    <span style="color: #177500">/* Initialize OS */</span>
+    <span style="color: #000000">os_init</span>();
+
+    <span style="color: #177500">/* Set cputime to count at 1 usec increments */</span>
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">cputime_init</span>(<span style="color: #1C01CE">1000000</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #177500">/* Create memory pool for Nimble packets and register with Msys */</span>
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_mempool_init</span>(<span style="color: #000000">&amp;g_mbuf_mempool</span>, <span style="color: #000000">MBUF_NUM_MBUFS</span>,
+            <span style="color: #000000">MBUF_MEMBLOCK_SIZE</span>, <span style="color: #000000">&amp;g_mbuf_buffer</span>[<span style="color: #1C01CE">0</span>], <span style="color: #C41A16">&quot;mbuf_pool&quot;</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_mbuf_pool_init</span>(<span style="color: #000000">&amp;g_mbuf_pool</span>, <span style="color: #000000">&amp;g_mbuf_mempool</span>, <span style="color: #000000">MBUF_MEMBLOCK_SIZE</span>,
+                           <span style="color: #000000">MBUF_NUM_MBUFS</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_msys_register</span>(<span style="color: #000000">&amp;g_mbuf_pool</span>);
+    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+
+    <span style="color: #177500">/* Initialize our device address */</span>
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">0</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x33</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">1</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x22</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">2</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x11</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">3</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0xcc</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">4</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0xbb</span>;
+    <span style="color: #000000">g_dev_addr</span>[<span style="color: #1C01CE">5</span>] <span style="color: #000000">=</span> <span style="color: #1C01CE">0x0a</span>;
+
+<span style="background-color: #ffffcc">    <span style="color: #177500">/* Initialize the statistics package */</span>
+</span><span style="background-color: #ffffcc">    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">stats_module_init</span>();
+</span><span style="background-color: #ffffcc">    <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
+</span>
+    <span style="color: #177500">/* Start the OS */</span>
+    <span style="color: #000000">os_start</span>();
+
+    <span style="color: #177500">/* os start should never return. If it does, this should be an error */</span>
+    <span style="color: #000000">assert</span>(<span style="color: #1C01CE">0</span>);
+}
+</pre></div>
+
+
+<p><br></p>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../ble_devadd/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: Initialize device addr
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../ble_consolepkg/>
+        Next: Initialize console pkg
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.<br>The Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </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>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d18c34dd/develop/network/ble/nimble_setup/index.html
----------------------------------------------------------------------
diff --git a/develop/network/ble/nimble_setup/index.html b/develop/network/ble/nimble_setup/index.html
new file mode 100644
index 0000000..d7411ec
--- /dev/null
+++ b/develop/network/ble/nimble_setup/index.html
@@ -0,0 +1,610 @@
+<!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">
+        
+        
+        <link rel="canonical" href="http://mynewt.apache.org/network/ble/nimble_setup/">
+        <link rel="shortcut icon" href="../../../img/favicon.ico">
+
+	<title>Set up application - Apache Mynewt</title>
+
+        <link href="../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link href="../../../css/font-awesome-4.0.3.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=Roboto:400,500,700,900,300,100' rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+        <link href="../../../extra.css" rel="stylesheet">
+
+        <!-- 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="Set up application">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 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="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">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>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" alt="MyNewt" title="MyNewt">
+        <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="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os/get_started/get_started/">Basic Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ini_stack/ble_ini_intro/">Initialize stack</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../bletiny_api/">API for bletiny app</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../../os/introduction/">Mynewt Documentation</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../ble_intro/">BLE User Guide</a></li>
+        
+      
+      
+        <li>&raquo; Set up application</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="set-up-a-nimble-application">Set up a NimBLE application</h2>
+<p>This tutorial explains how to set up an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.</p>
+<p>This tutorial assumes that you have already installed the newt tool and are familiar with its concepts.</p>
+<h3 id="create-the-application-directory">Create the application directory</h3>
+<p>You start by creating a project space for your own application work using the Newt tool (<code>my_proj1</code> in this example) and installing all the additional apps and libraries available by adding the repo <code>apache-mynewt-core</code>. See the tutorial on <a href="../../../os/tutorials/repo/add_repos/">adding a repo</a> for more on working with repos.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev$ newt new my_proj1
+Downloading project skeleton from apache/incubator-mynewt-blinky...
+Installing skeleton in my_proj1...
+Project my_proj1 successfully created.
+~/dev$ tree my_proj1
+my_proj1
+\u251c\u2500\u2500 DISCLAIMER
+\u251c\u2500\u2500 LICENSE
+\u251c\u2500\u2500 NOTICE
+\u251c\u2500\u2500 README.md
+\u251c\u2500\u2500 apps
+\u2502�� \u2514\u2500\u2500 blinky
+\u2502��     \u251c\u2500\u2500 pkg.yml
+\u2502��     \u2514\u2500\u2500 src
+\u2502��         \u2514\u2500\u2500 main.c
+\u251c\u2500\u2500 project.yml
+\u2514\u2500\u2500 targets
+    \u251c\u2500\u2500 my_blinky_sim
+    \u2502�� \u251c\u2500\u2500 pkg.yml
+    \u2502�� \u2514\u2500\u2500 target.yml
+    \u2514\u2500\u2500 unittest
+        \u251c\u2500\u2500 pkg.yml
+        \u2514\u2500\u2500 target.yml
+
+6 directories, 11 files
+
+~/dev$ cd my_proj1
+~/dev/my_proj1$ newt install
+apache-mynewt-core
+~/dev/my_proj1$ tree
+.
+\u251c\u2500\u2500 DISCLAIMER
+\u251c\u2500\u2500 LICENSE
+\u251c\u2500\u2500 NOTICE
+\u251c\u2500\u2500 README.md
+\u251c\u2500\u2500 apps
+\u2502�� \u2514\u2500\u2500 blinky
+\u2502��     \u251c\u2500\u2500 pkg.yml
+\u2502��     \u2514\u2500\u2500 src
+\u2502��         \u2514\u2500\u2500 main.c
+\u251c\u2500\u2500 project.state
+\u251c\u2500\u2500 project.yml
+\u251c\u2500\u2500 repos
+\u2502�� \u2514\u2500\u2500 apache-mynewt-core
+\u2502��     \u251c\u2500\u2500 DISCLAIMER
+\u2502��     \u251c\u2500\u2500 LICENSE
+\u2502��     \u251c\u2500\u2500 NOTICE
+\u2502��     \u251c\u2500\u2500 README.md
+\u2502��     \u251c\u2500\u2500 RELEASE_NOTES.md
+\u2502��     \u251c\u2500\u2500 apps
+\u2502��     \u2502�� \u251c\u2500\u2500 bleprph
+\u2502��     \u2502�� \u2502�� \u2514\u2500\u2500 src
+\u2502��     \u2502�� \u2502��     \u251c\u2500\u2500 bleprph.h
+\u2502��     \u2502�� \u2502��     \u251c\u2500\u2500 gatt_svr.c
+\u2502��     \u2502�� \u2502��     \u2514\u2500\u2500 main.c
+\u2502��     \u2502�� \u251c\u2500\u2500 bletest
+\u2502��     \u2502�� \u2502�� \u251c\u2500\u2500 pkg.yml
+\u2502��     \u2502�� \u2502�� \u2514\u2500\u2500 src
+\u2502��     \u2502�� \u2502��     \u2514\u2500\u2500 main.c
+\u2502��     \u2502�� \u251c\u2500\u2500 bletiny
+\u2502��     \u2502�� \u2502�� \u251c\u2500\u2500 pkg.yml
+\u2502��     \u2502�� \u2502�� \u2514\u2500\u2500 src
+\u2502��     \u2502�� \u2502��     \u251c\u2500\u2500 bletiny_priv.h
+\u2502��     \u2502�� \u2502��     \u251c\u2500\u2500 cmd.c
+\u2502��     \u2502�� \u2502��     \u251c\u2500\u2500 main.c
+\u2502��     \u2502�� \u2502��     \u251c\u2500\u2500 parse.c
+\u2502��     \u2502�� \u2502��     \u2514\u2500\u2500 periph.c
+&lt;snip&gt;
+
+232 directories, 846 files
+</pre></div>
+
+
+<p><br></p>
+<p>It's time to build your own app using one or more of the example apps available in the repo <code>apache-mynewt-core</code>. </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ ls repos/apache-mynewt-core/apps
+bleprph     bletiny     boot        luatest     test
+bletest     blinky      ffs2native  slinky
+</pre></div>
+
+
+<p><br></p>
+<p>At the very least your app must contain a <code>main()</code> function and a <code>pkg.yml</code> file.  Use the following steps to create minimal ...</p>
+<p><em>1. Create the app directory structure.</em></p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ mkdir -p apps/ble_app/src
+</pre></div>
+
+
+<p><br>
+<em>2. Paste the following contents into <code>apps/ble_app/pkg.yml</code>.</em></p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">pkg.name: apps/ble_app
+pkg.type: app
+
+pkg.deps:
+    - &quot;@apache-mynewt-core/libs/baselibc&quot;
+    - &quot;@apache-mynewt-core/libs/console/full&quot;
+    - &quot;@apache-mynewt-core/libs/os&quot;
+    - &quot;@apache-mynewt-core/net/nimble/controller&quot;
+    - &quot;@apache-mynewt-core/net/nimble/host&quot;
+</pre></div>
+
+
+<p><br>
+<em>3. Paste the following contents into <code>apps/ble_app/src/main.c</code>.</em></p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #633820">#include &lt;assert.h&gt;</span>
+<span style="color: #633820">#include &quot;os/os.h&quot;</span>
+
+<span style="color: #A90D91">int</span>
+<span style="color: #000000">main</span>(<span style="color: #A90D91">void</span>)
+{
+    <span style="color: #177500">/* Initialize OS */</span>
+    <span style="color: #000000">os_init</span>();
+
+    <span style="color: #177500">/* Start the OS */</span>
+    <span style="color: #000000">os_start</span>();
+
+    <span style="color: #177500">/* os_start should never return. If it does, this should be an error */</span>
+    <span style="color: #000000">assert</span>(<span style="color: #1C01CE">0</span>);
+}
+</pre></div>
+
+
+<p>In this <em>main()</em> all we are doing is initializing the Mynewt OS and starting it.</p>
+<p><br></p>
+<h3 id="create-the-target">Create the target</h3>
+<p>Now you have to create the target that you will use to build your application. We will call this target "ble_tgt". Type the <code>newt target create ble_tgt</code> command. You should get this:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt target create ble_tgt
+Target targets/ble_tgt successfully created
+</pre></div>
+
+
+<p>What this command just did was to create a directory called <code>ble_tgt</code> in the targets directory of your project. Two files are created in that directory: pkg.yml and target.yml.</p>
+<p>The target is not yet complete though! We need to set some target variables for this project. Currently, the nimble stack has been ported to the Nordic nrf5x chipsets; specifically the nrf51 and nrf52. This application will use the nrf52 but we will also show the setup for the nrf51 in case your project uses that chip.</p>
+<p>Here is the command you will need to set up your target for the nrf52:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt target set ble_tgt     \
+    app=apps/ble_app                        \
+    bsp=@apache-mynewt-core/hw/bsp/nrf52pdk \
+    build_profile=optimized
+Target targets/ble_tgt successfully set target.app to apps/ble_app
+Target targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf52pdk
+Target targets/ble_tgt successfully set target.build_profile to optimized
+</pre></div>
+
+
+<p>Here is the command you will need to set up your target for the nrf51:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt target set ble_tgt     \
+    app=apps/ble_app                        \
+    bsp=@apache-mynewt-core/hw/bsp/nrf51dk  \
+    build_profile=optimized
+Target targets/ble_tgt successfully set target.app to apps/ble_app
+Target targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf51dk
+Target targets/ble_tgt successfully set target.build_profile to optimized
+</pre></div>
+
+
+<p><br></p>
+<h3 id="nimble-stack-initialization">Nimble stack initialization</h3>
+<p>There are certain stack initialization steps that are required for a BLE application to be up and running. If you are running a canned example (e.g. bletiny), these steps are already done for you. When you are writing your own app, you may want to assign different initial values or initialize additional packages that you may have added to your project or written yourself. </p>
+<p>Details of the initialization step requirements are covered in <a href="../ini_stack/ble_ini_intro/">Initialize Stack</a> step.</p>
+<p><br></p>
+<h3 id="building-the-application">Building the application</h3>
+<p>Now that we have created the application and the target we can build it and test it out. The command you need to run is the <code>newt build</code> command with the target we created (<em>ble_tgt</em>). The output will show the files being compiled and linked. You should see this when all is done (except for the <em>...</em> of course):</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt build ble_tgt
+...
+Archiving os.a
+Compiling cons_fmt.c
+Compiling cons_tty.c
+Archiving full.a
+Linking ble_app.elf
+App successfully built: /Users/wes/dev/my_proj1/bin/ble_tgt/apps/ble_app/ble_app.elf
+</pre></div>
+
+
+<h3 id="conclusion">Conclusion</h3>
+<p>You now have a fully functional BLE app (never mind the fact that it doesn't
+actually do anything yet!).  With all the necessary infrastructure in place,
+you can now start turning this into a real application.  Additional tutorials
+with focus on adding application-layer functionality to your Nimble application
+will be coming soon.  In the meantime, you might get some inspiration from
+apache-mynewt-core's example Nimble apps.  These apps can be found at the below locations, relative to your project's base directory:</p>
+<ul>
+<li><em>repos/apache-mynewt-core/apps/bleprph</em></li>
+<li><em>repos/apache-mynewt-core/apps/bletiny</em></li>
+</ul>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../ble_sec/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: NimBLE Security
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../ini_stack/ble_ini_intro/>
+        Next: Initialize stack
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.<br>The Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </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>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d18c34dd/develop/newt/command_list/newt_build/index.html
----------------------------------------------------------------------
diff --git a/develop/newt/command_list/newt_build/index.html b/develop/newt/command_list/newt_build/index.html
new file mode 100644
index 0000000..441fdc7
--- /dev/null
+++ b/develop/newt/command_list/newt_build/index.html
@@ -0,0 +1,571 @@
+<!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">
+        
+        
+        <link rel="canonical" href="http://mynewt.apache.org/newt/command_list/newt_build/">
+        <link rel="shortcut icon" href="../../../img/favicon.ico">
+
+	<title>newt build - Apache Mynewt</title>
+
+        <link href="../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link href="../../../css/font-awesome-4.0.3.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=Roboto:400,500,700,900,300,100' rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+        <link href="../../../extra.css" rel="stylesheet">
+
+        <!-- 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="newt build">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 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="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">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>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" alt="MyNewt" title="MyNewt">
+        <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="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os/get_started/get_started/">Basic Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../../network/ble/ble_intro/
+">BLE User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../newt_intro/">Newt Tool Guide</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li >
+      <a href="../../newt_operation/">Newt Theory of Ops</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../newt_ops/">Command Guide</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">newt build</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_clean/">newt clean</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_create_image/">newt create-image</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_debug/">newt debug</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_help/">newt help</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_info/">newt info</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_install/">newt install</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_load/">newt load</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_new/">newt new</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_run/">newt run</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_size/">newt size</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_target/">newt target</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_test/">newt test</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_upgrade/">newt upgrade</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../newt_version/">newt version</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../newt_intro/">Newt Tool Guide</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../../newt_ops/">Command Guide</a></li>
+        
+      
+      
+        <li>&raquo; newt build</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="newt-build"><font color="#F2853F" style="font-size:24pt">newt build </font></h2>
+<p>Compiles, links, and builds one or more apps. </p>
+<h4 id="usage">Usage:</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    newt build [flags] input1
+</pre></div>
+
+
+<p>where <code>input1</code> is the name of the target to build.</p>
+<h4 id="flags">Flags:</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    -h, --help=false: help for target
+</pre></div>
+
+
+<h4 id="global-flags">Global Flags:</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    -l, --loglevel=&quot;WARN&quot;: Log level, defaults to WARN.
+    -o, --outfile string    Filename to tee log output to
+    -q, --quiet=false: Be quiet; only display error output.
+    -s, --silent=false: Be silent; don&#39;t output anything.
+    -v, --verbose=false: Enable verbose output when executing commands.
+</pre></div>
+
+
+<h4 id="examples">Examples</h4>
+<table>
+<thead>
+<tr>
+<th>Sub-command</th>
+<th>Usage</th>
+<th>Explanation</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>build</td>
+<td>newt build <br> <code>input1</code></td>
+<td>Builds the source code into an image that can be loaded on the hardware (<code>bsp</code>) associated with the target named <code>input1</code> to run the application enabled by the <code>app</code> setting associated with that target. It creates 'bin/' directory and 'bin/<input1>/apps/<app>' subdirectory inside the base directory for the app, compiles and generates binaries and executables, and places them in that subdirectory.</td>
+</tr>
+<tr>
+<td></td>
+<td>newt build <br> my_blinky_sim</td>
+<td>For example, if <code>app</code> was set to <code>apps/blinky</code> for the target "my_blinky_sim", you will find the generated .elf, .a, and .lst files in bin/my_blinky_sim/apps/blinky directory created under the base directory for the app created using <code>newt new</code> at the start of the project.</td>
+</tr>
+<tr>
+<td>build</td>
+<td>newt build my_blinky_sim myble</td>
+<td>builds the apps defined for both the targets "my_blinky_sim" and "myble".</td>
+</tr>
+</tbody>
+</table>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../../newt_ops/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: Command Guide
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../newt_clean/>
+        Next: newt clean
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.<br>The Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </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>
+
+    </body>
+</html>
\ No newline at end of file