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 2015/11/10 09:00:18 UTC

[11/14] incubator-mynewt-site git commit: removing all files from asf-site to redo doc structure

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0d880edf/site/chapter1/project1/index.html
----------------------------------------------------------------------
diff --git a/site/chapter1/project1/index.html b/site/chapter1/project1/index.html
deleted file mode 100644
index fe52246..0000000
--- a/site/chapter1/project1/index.html
+++ /dev/null
@@ -1,1188 +0,0 @@
-<!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.incubator.apache.org/index.html/chapter1/project1/">
-        <link rel="shortcut icon" href="../../img/favicon.ico">
-
-	<title>Blinky, The First Project - Mynewt</title>
-
-        <link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
-        <link href="../../css/font-awesome-4.0.3.css" rel="stylesheet">
-        <link href="../../css/base.css" rel="stylesheet">
-        <link rel="stylesheet" href="../../css/highlight.css">
-
-        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
-        <!--[if lt IE 9]>
-            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
-            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
-        <![endif]-->
-
-        
-    </head>
-
-    <body>
-
-        <div class="navbar navbar-default 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>
-            
-
-            <!-- Main title -->
-            <a class="navbar-brand" href="../..">Mynewt</a>
-        </div>
-
-        <!-- Expanded navigation -->
-        <div class="navbar-collapse collapse">
-            
-                <!-- Main navigation -->
-                <ul class="nav navbar-nav">
-                
-                
-                    <li >
-                        <a href="../..">Doc Home</a>
-                    </li>
-                
-                
-                
-                    <li class="dropdown active">
-                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Getting Started <b class="caret"></b></a>
-                        <ul class="dropdown-menu">
-                        
-                            
-<li >
-    <a href="../newt_concepts/">Newt Concepts</a>
-</li>
-
-                        
-                            
-<li class="active">
-    <a href="./">Blinky, The First Project</a>
-</li>
-
-                        
-                        </ul>
-                    </li>
-                
-                
-                
-                    <li class="dropdown">
-                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Getting Acclimated <b class="caret"></b></a>
-                        <ul class="dropdown-menu">
-                        
-                            
-<li >
-    <a href="../../chapter2/vocabulary/">Understanding Newt Terms</a>
-</li>
-
-                        
-                            
-<li >
-    <a href="../../chapter2/project2/">Project 2</a>
-</li>
-
-                        
-                            
-<li >
-    <a href="../../chapter2/project3/">Project 3</a>
-</li>
-
-                        
-                        </ul>
-                    </li>
-                
-                
-                
-                    <li class="dropdown">
-                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Newt tool Reference <b class="caret"></b></a>
-                        <ul class="dropdown-menu">
-                        
-                            
-<li >
-    <a href="../../chapter3/newt_ops/">Command structure</a>
-</li>
-
-                        
-                            
-<li >
-    <a href="../../chapter3/newt_tool_reference/">Command list</a>
-</li>
-
-                        
-                        </ul>
-                    </li>
-                
-                
-                </ul>
-            
-
-            <ul class="nav navbar-nav navbar-right">
-                <li>
-                    <a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
-                        <i class="fa fa-search"></i> Search
-                    </a>
-                </li>
-                
-                    <li >
-                        <a rel="next" href="../newt_concepts/">
-                            <i class="fa fa-arrow-left"></i> Previous
-                        </a>
-                    </li>
-                    <li >
-                        <a rel="prev" href="../../chapter2/vocabulary/">
-                            Next <i class="fa fa-arrow-right"></i>
-                        </a>
-                    </li>
-                
-                
-            </ul>
-        </div>
-    </div>
-</div>
-
-        <div class="container">
-            
-                <div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
-    <ul class="nav bs-sidenav">
-    
-        <li class="main active"><a href="#blinky-the-first-project">Blinky, the First Project</a></li>
-        
-            <li><a href="#objective">Objective</a></li>
-        
-            <li><a href="#what-you-need">What you need</a></li>
-        
-            <li><a href="#getting-your-mac-ready">Getting your Mac Ready</a></li>
-        
-            <li><a href="#getting-your-ubuntu-machine-ready">Getting your Ubuntu machine Ready</a></li>
-        
-            <li><a href="#getting-your-windows-machine-ready">Getting your Windows machine Ready</a></li>
-        
-            <li><a href="#building-test-code-on-simulator">Building test code on simulator</a></li>
-        
-            <li><a href="#building-test-code-on-simulator-on-windows-machine">Building test code on simulator on Windows machine</a></li>
-        
-            <li><a href="#making-an-led-blink">Making an LED blink</a></li>
-        
-            <li><a href="#using-flash-to-make-led-blink">Using flash to make LED blink</a></li>
-        
-    
-    </ul>
-</div></div>
-                <div class="col-md-9" role="main">
-
-<h2 id="blinky-the-first-project">Blinky, the First Project<a class="headerlink" href="#blinky-the-first-project" title="Permanent link">&para;</a></h2>
-<h3 id="objective">Objective<a class="headerlink" href="#objective" title="Permanent link">&para;</a></h3>
-<p>We will show you how you can use eggs from a nest on Mynewt to make an LED on a target board blink. We will call it <strong> Project Blinky</strong>. The goals of this tutorial are threefold:</p>
-<ol>
-<li>First, you will learn how to set up your environment to be ready to use Mynewt OS and newt tool. </li>
-<li>Second, we will walk you through a download of eggs for building and testing <a href="#building-test-code-on-simulator">on a simulated target</a> on a non-Windows machine.</li>
-<li>Third, you will download eggs and use tools to create a runtime image for a board to <a href="#making-an-led-blink">make its LED blink</a>. </li>
-</ol>
-<p>If you want to explore even further, you can try to upload the image to the board's flash memory and have it <a href="#using-flash-to-make-led-blink">boot from flash</a>!</p>
-<h3 id="what-you-need">What you need<a class="headerlink" href="#what-you-need" title="Permanent link">&para;</a></h3>
-<ol>
-<li>STM32-E407 development board from Olimex.</li>
-<li>ARM-USB-TINY-H connector with JTAG interface for debugging ARM microcontrollers (comes with the ribbon cable to hook up to the board)</li>
-<li>USB A-B type cable to connect the debugger to your personal computer</li>
-<li>Personal Computer</li>
-</ol>
-<p>The instructions assume the user is using a Bourne-compatible shell (e.g. bash or zsh) on your computer. You may already have some of the required packages on your machine.  In that 
-case, simply skip the corresponding installation step in the instructions under <a href="./#getting-your-mac-ready">Getting your Mac Ready</a> or <a href="./#getting-your-ubuntu-machine-ready">Getting your Ubuntu machine Ready</a> or <a href="#getting-your-windows-machine-ready">Getting your Windows machine Ready</a>. While the given instructions should work on other versions, they have been tested for the three specific releases of operating systems noted here:</p>
-<ul>
-<li>Mac: OS X Yosemite Version 10.10.5</li>
-<li>Linux: Ubuntu 14.10 (Utopic Unicorn)</li>
-<li>Windows: Windows 10</li>
-</ul>
-<h3 id="getting-your-mac-ready">Getting your Mac Ready<a class="headerlink" href="#getting-your-mac-ready" title="Permanent link">&para;</a></h3>
-<h4 id="getting-an-account-on-github">Getting an account on GitHub<a class="headerlink" href="#getting-an-account-on-github" title="Permanent link">&para;</a></h4>
-<ul>
-<li>Get an account on GitHub. Make sure you have joined the "Newt Operating System" organization.</li>
-</ul>
-<h4 id="installing-homebrew-to-ease-installs-on-os-x">Installing Homebrew to ease installs on OS X<a class="headerlink" href="#installing-homebrew-to-ease-installs-on-os-x" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>Do you have Homebrew? If not, open a terminal on your Mac and paste the following at a Terminal prompt. It will ask you for your sudo password.</p>
-<pre><code>$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-</code></pre>
-<p>Alternatively, you can just extract (or <code>git clone</code>) Homebrew and install it to <code>/usr/local</code>.</p>
-</li>
-</ul>
-<h4 id="creating-local-repository">Creating local repository<a class="headerlink" href="#creating-local-repository" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>The directory structure must be first readied for using Go. Go code must be kept inside a workspace. A workspace is a directory hierarchy with three directories at its root:</p>
-<ul>
-<li>
-<p>src contains Go source files organized into packages (one package per directory),</p>
-</li>
-<li>
-<p>pkg contains package objects, and</p>
-</li>
-<li>
-<p>bin contains executable commands.</p>
-</li>
-</ul>
-<p>The GOPATH environment variable specifies the location of your workspace. First create a 'dev' directory and then a 'go' directory under it. Set the GOPATH environment variable to this directory and then proceed to create the directory for cloning the newt tool repository.</p>
-<pre><code>$ cd $HOME
-$ mkdir -p dev/go  
-$ cd dev/go
-$ export GOPATH=`pwd`
-</code></pre>
-<p>Note that you need to add export statements to ~/.bash_profile to export variables permanently.
-    $ vi ~/.bash_profile</p>
-</li>
-<li>
-<p>The next step is to set up the repository for the package building tool "newt" on your local machine. First create the appropriate directory for it and then clone the newt tool repository from the online apache repository (or its github.com mirror) into this newly created directory. Check the installation.</p>
-<pre><code>$ mkdir -p $GOPATH/src/github.com/mynewt  
-$ cd $GOPATH/src/github.com/mynewt
-$ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git newt
-$ ls
-newt
-$ cd newt
-$ ls
-Godeps                  README.md               coding_style.txt        newt.go
-LICENSE                 cli                     design.txt
-</code></pre>
-</li>
-</ul>
-<h4 id="installing-go-and-godep">Installing Go and Godep<a class="headerlink" href="#installing-go-and-godep" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>Next you will use brew to install go. The summary message at the end of the installation should indicate that it is installed in the /usr/local/Cellar/go/ directory. You will use the go command 'install' to compile and install packages (called eggs in the Mynewt world) and dependencies. </p>
-<pre><code>$ brew install go
-==&gt; 
-==&gt; 
-==&gt; *Summary*
-🍺  /usr/local/Cellar/go/1.5.1: 5330 files, 273M
-$ cd $GOPATH/src/github.com/mynewt/newt
-</code></pre>
-<p>Alternatively, you can download the go package directly from (https://golang.org/dl/) instead of brewing it. Install it in /usr/local directory.</p>
-</li>
-<li>
-<p>Now you will get the godep package. Return to the go directory level and get godep. Check for it in the bin subdirectory. Add the go environment to path. Make sure it is added to your .bash_profile.</p>
-<pre><code>$ cd $GOPATH
-$ go get github.com/tools/godep
-$ ls
-bin     pkg     src
-$ ls bin
-godep
-$ export PATH=$PATH:$GOPATH/bin
-</code></pre>
-</li>
-<li>
-<p>Use the go command 'install' to compile and install packages and dependencies. In preparation for the install, you may use the godep command 'restore' to check out listed dependency versions in $GOPATH and link all the necessary files. Note that you may have to go to the <code>~/dev/go/src/github.com/mynewt/newt</code> directory to successfully run the restore command (e.g. on certain distributions of Linux). You may also have to do a <code>go get</code> before the restore to make sure all the necessary packages and dependencies are correct.</p>
-<pre><code>$ cd ~/dev/go/src/github.com/mynewt/newt
-$ go get
-$ ~/dev/go/bin/godep restore
-$ go install
-</code></pre>
-</li>
-</ul>
-<h4 id="building-the-newt-tool">Building the Newt tool<a class="headerlink" href="#building-the-newt-tool" title="Permanent link">&para;</a></h4>
-<ul>
-<li>You will now use go to run the newt.go program to build the newt tool. You will have to use <code>go build</code> command which compiles and writes the resulting executable to an output file named <code>newt</code>. However, it does not install the results along with its dependencies in $GOPATH/bin (for that you will need to use <code>go install</code>). Now try running newt using the compiled binary. For example, check for the version number by typing 'newt version'. See all the possible commands available to a user of newt by typing 'newt -h'.</li>
-</ul>
-<p>Note: If you are going to be be modifying the newt tool itself often and wish to compile the program every time you call it, you may want to store the command in a variable in your .bash_profile. So type in <code>export newt="go run $GOPATH/src/github.com/mynewt/newt/newt.go"</code> in your .bash_profile and execute it by calling <code>$newt</code> at the prompt instead of <code>newt</code>. Don't forget to reload the updated bash profile by typing <code>source ~/.bash_profile</code> at the prompt! Here, you use <code>go run</code> which runs the compiled binary directly without producing an executable.</p>
-<pre><code>    $ go run %GOPATH%/src/github.com/mynewt/newt/newt.go
-    $ cd ~/dev/go/src/github.com/mynewt/newt
-    $ ls
-    Godeps          README.md       coding_style.txt    newt
-    LICENSE         cli         design.txt      newt.go
-    $ newt version
-    Newt version:  1.0
-    $ newt -h
-    Newt allows you to create your own embedded project based on the Mynewt
-    operating system. Newt provides both build and package management in a
-    single tool, which allows you to compose an embedded workspace, and set
-    of projects, and then build the necessary artifacts from those projects.
-    For more information on the Mynewt operating system, please visit
-    https://www.github.com/mynewt/documentation.
-
-    Please use the newt help command, and specify the name of the command
-    you want help for, for help on how to use a specific command
-
-    Usage:
-     newt [flags]
-     newt [command]
-
-    Examples:
-     newt
-     newt help [&lt;command-name&gt;]
-       For help on &lt;command-name&gt;.  If not specified, print this message.
-
-
-    Available Commands:
-     version     Display the Newt version number.
-     target      Set and view target information
-     egg         Commands to list and inspect eggs on a nest
-     nest        Commands to manage nests &amp; clutches (remote egg repositories)
-     help        Help about any command
-
-    Flags:
-     -h, --help=false: help for newt
-     -l, --loglevel="WARN": Log level, defaults to WARN.
-     -q, --quiet=false: Be quiet; only display error output.
-     -s, --silent=false: Be silent; don't output anything.
-     -v, --verbose=false: Enable verbose output when executing commands.
-
-
-    Use "newt help [command]" for more information about a command.
-</code></pre>
-<ul>
-<li>Without creating a project repository you can't do a whole lot with the Newt tool. So you'll have to wait till you have downloaded a nest to try out the tool. </li>
-</ul>
-<h4 id="getting-the-debugger-ready">Getting the debugger ready<a class="headerlink" href="#getting-the-debugger-ready" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>Before you start building nests and hatching eggs, you need to do one final step in the environment preparation - install gcc / libc that can produce 32-bit executables. So, first install gcc. You will see the brew steps and a final summary confirming install.</p>
-<pre><code>$ brew install gcc
-...
-...
-==&gt; Summary
-🍺  /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M
-</code></pre>
-</li>
-<li>
-<p>ARM maintains a pre-built GNU toolchain with a GCC source branch targeted at Embedded ARM Processors namely Cortex-R/Cortex-M processor families. Install the PX4 Toolchain and check the version installed. Make sure that the symbolic link installed by Homebrew points to the correct version of the debugger. If not, you can either change the symbolic link using the "ln -f -s" command or just go ahead and try with the version it points to!</p>
-<pre><code>$ brew tap PX4/homebrew-px4
-$ brew update
-$ brew install gcc-arm-none-eabi-49
-$ arm-none-eabi-gcc --version  
-arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
-Copyright (C) 2014 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-$ ls -al /usr/local/bin/arm-none-eabi-gdb
-lrwxr-xr-x  1 aditihilbert  admin  69 Sep 22 17:16 /usr/local/bin/arm-none-eabi-gdb -&gt; /usr/local/Cellar/gcc-arm-none-eabi-49/20150609/bin/arm-none-eabi-gdb
-</code></pre>
-<p>Note: If no version is specified, brew will install the latest version available. StackOS will eventually work with multiple versions available including the latest releases. However, at present we have tested only with this version and recommend it for getting started. </p>
-</li>
-<li>
-<p>You have to install OpenOCD (Open On-Chip Debugger) which is an open-source software that will allow you to interface with the JTAG debug connector/adaptor for the Olimex board. It lets you program, debug, and test embedded target devices which, in this case, is the Olimex board. Use brew to install it. Brew adds a simlink /usr/local/bin/openocd to the openocd directory in the Cellar.</p>
-<pre><code>$ brew install open-ocd
-$ which openocd
-/usr/local/bin/openocd
-$ ls -l $(which openocd)
-lrwxr-xr-x  1 &lt;user&gt;  admin  36 Sep 17 16:22 /usr/local/bin/openocd -&gt; ../Cellar/open-ocd/0.9.0/bin/openocd
-</code></pre>
-</li>
-<li>
-<p>Proceed to the <a href="#building-test-code-on-simulator">Building test code on simulator</a> section.</p>
-</li>
-</ul>
-<h3 id="getting-your-ubuntu-machine-ready">Getting your Ubuntu machine Ready<a class="headerlink" href="#getting-your-ubuntu-machine-ready" title="Permanent link">&para;</a></h3>
-<h4 id="getting-an-account-on-github_1">Getting an account on GitHub<a class="headerlink" href="#getting-an-account-on-github_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>Get an account on GitHub. Make sure you have joined the "Newt Operating System" organization.</li>
-</ul>
-<h4 id="installing-some-prerequisites">Installing some prerequisites<a class="headerlink" href="#installing-some-prerequisites" title="Permanent link">&para;</a></h4>
-<ul>
-<li>Install git, libcurl, and the go language if you do not have them already.<pre><code>$ sudo apt-get install git 
-$ sudo apt-get install libcurl4-gnutls-dev 
-$ sudo apt-get install golang
-</code></pre>
-</li>
-</ul>
-<h4 id="creating-local-repository_1">Creating local repository<a class="headerlink" href="#creating-local-repository_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>The directory structure must be first readied for using Go. Go code must be kept inside a workspace. A workspace is a directory hierarchy with three directories at its root:</p>
-<ul>
-<li>
-<p>src contains Go source files organized into packages (one package per directory),</p>
-</li>
-<li>
-<p>pkg contains package objects, and</p>
-</li>
-<li>
-<p>bin contains executable commands.</p>
-</li>
-</ul>
-<p>The GOPATH environment variable specifies the location of your workspace. First create a 'dev' directory and then a 'go' directory under it. Set the GOPATH environment variable to this directory and then proceed to create the directory for cloning the newt tool repository.</p>
-<pre><code>$ cd $HOME
-$ mkdir -p dev/go  
-$ cd dev/go
-$ export GOPATH=$PWD
-</code></pre>
-<p>Note that you need to add export statements to ~/.bashrc (or equivalent) to export variables permanently.</p>
-</li>
-<li>
-<p>Next, install godep. Note that the following command produces no output.</p>
-<pre><code>$ go get github.com/tools/godep
-</code></pre>
-</li>
-<li>
-<p>Set up the repository for the package building tool "newt" on your local machine. First create the appropriate directory for it and then clone the newt tool repository from the online apache repository (or its github.com mirror) into this newly created directory. Check the contents of the directory.</p>
-<pre><code>$ mkdir -p $GOPATH/src/github.com/mynewt  
-$ cd $GOPATH/src/github.com/mynewt
-$ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git newt
-$ ls
-newt
-$ cd newt
-$ ls
-Godeps                  README.md               coding_style.txt        newt.go
-LICENSE                 cli                     design.txt
-</code></pre>
-</li>
-<li>
-<p>Use the go command 'install' to compile and install packages and dependencies. Add go environment to path. Again, to make the export variable permanent, add it to your ~/.bashrc (or equivalent) file.</p>
-<pre><code>$ $GOPATH/bin/godep restore 
-$ go get 
-$ go install 
-$ export PATH=$PATH:$GOPATH/bin
-</code></pre>
-</li>
-</ul>
-<h4 id="building-the-newt-tool_1">Building the newt tool<a class="headerlink" href="#building-the-newt-tool_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>You will now use go to run the newt.go program to build the newt tool. You will have to use <code>go build</code> command which compiles and writes the resulting executable to an output file named <code>newt</code>. However, it does not install the results along with its dependencies in $GOPATH/bin (for that you will need to use <code>go install</code>). Now try running newt using the compiled binary. For example, check for the version number by typing 'newt version'. See all the possible commands available to a user of newt by typing 'newt -h'.</li>
-</ul>
-<p>Note: If you are going to be be modifying the newt tool itself often and wish to compile the program every time you call it, you may want to store the command in a variable in your .bash_profile. So type in <code>export newt="go run $GOPATH/src/github.com/mynewt/newt/newt.go"</code> in your ~/.bashrc (or equivalent) and execute it by calling <code>$newt</code> at the prompt instead of <code>newt</code>. Here, you use <code>go run</code> which runs the compiled binary directly without producing an executable.</p>
-<pre><code>    $ go build %GOPATH%/src/github.com/mynewt/newt/newt.go
-    $ cd ~/dev/go/src/github.com/mynewt/newt
-    $ ls
-    Godeps          README.md       coding_style.txt    newt
-    LICENSE         cli         design.txt      newt.go
-    $ newt version
-    Newt version:  1.0
-    $ newt -h
-    Newt allows you to create your own embedded project based on the Mynewt
-    operating system. Newt provides both build and package management in a
-    single tool, which allows you to compose an embedded workspace, and set
-    of projects, and then build the necessary artifacts from those projects.
-    For more information on the Mynewt operating system, please visit
-    https://www.github.com/mynewt/documentation.
-
-    Please use the newt help command, and specify the name of the command
-    you want help for, for help on how to use a specific command
-
-    Usage:
-     newt [flags]
-     newt [command]
-
-    Examples:
-     newt
-     newt help [&lt;command-name&gt;]
-       For help on &lt;command-name&gt;.  If not specified, print this message.
-
-
-    Available Commands:
-     version     Display the Newt version number.
-     target      Set and view target information
-     egg         Commands to list and inspect eggs on a nest
-     nest        Commands to manage nests &amp; clutches (remote egg repositories)
-     help        Help about any command
-
-    Flags:
-     -h, --help=false: help for newt
-     -l, --loglevel="WARN": Log level, defaults to WARN.
-     -q, --quiet=false: Be quiet; only display error output.
-     -s, --silent=false: Be silent; don't output anything.
-     -v, --verbose=false: Enable verbose output when executing commands.
-
-
-    Use "newt help [command]" for more information about a command.
-</code></pre>
-<ul>
-<li>Without creating a project repository you can't do a whole lot with the Newt tool. So you'll have to wait till you have downloaded a nest to try out the tool. </li>
-</ul>
-<h4 id="getting-the-debugger-ready_1">Getting the debugger ready<a class="headerlink" href="#getting-the-debugger-ready_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>Before you start building nests and hatching eggs, you need to do one final step in the environment preparation - install gcc / libc that can produce 32-bit executables. You can install these as follows: </p>
-<pre><code>$ sudo apt-get install gcc-multilib libc6-i386
-</code></pre>
-</li>
-<li>
-<p>For the LED project on the Olimex hardware, you have to install gcc for AM 4.9.3.  This package can be installed with apt-get as documented <a href="https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded">here</a>.</p>
-<pre><code>$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi 
-$ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded 
-$ sudo apt-get update 
-$ sudo apt-get install gcc-arm-none-eabi
-</code></pre>
-</li>
-<li>
-<p>And finally, you have to install OpenOCD (Open On-Chip Debugger) which is an open-source software that will allow you to interface with the JTAG debug connector/adaptor for the Olimex board. It lets you program, debug, and test embedded target devices which, in this case, is the Olimex board. You have to acquire OpenOCD 0.8.0. </p>
-<p>If you are running Ubuntu 15.x, then you are in luck and you can simply run: </p>
-<pre><code>$ sudo apt-get install openocd
-</code></pre>
-<p>Other versions of Ubuntu may not have the correct version of openocd available.  In this case, you should download the openocd 0.8.0 package from <a href="https://launchpad.net/ubuntu/vivid/+source/openocd">https://launchpad.net/ubuntu/vivid/+source/openocd</a>. The direct link to the amd64 build is <a href="http://launchpadlibrarian.net/188260097/openocd_0.8.0-4_amd64.deb">http://launchpadlibrarian.net/188260097/openocd_0.8.0-4_amd64.deb</a>. </p>
-</li>
-<li>
-<p>Proceed to the <a href="#building-test-code-on-simulator">Building test code on simulator</a> section.</p>
-</li>
-</ul>
-<h3 id="getting-your-windows-machine-ready">Getting your Windows machine Ready<a class="headerlink" href="#getting-your-windows-machine-ready" title="Permanent link">&para;</a></h3>
-<h4 id="getting-an-account-on-github_2">Getting an account on GitHub<a class="headerlink" href="#getting-an-account-on-github_2" title="Permanent link">&para;</a></h4>
-<ul>
-<li>Get an account on GitHub. Make sure you have joined the "Newt Operating System" organization.</li>
-</ul>
-<h4 id="installing-some-prerequisites_1">Installing some prerequisites<a class="headerlink" href="#installing-some-prerequisites_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>You have to install the following if you do not have them already.  The steps below indicate specific folders where each of these programs should be installed. You can choose different locations, but the remainder of this
-tutorial for a Windows machine assumes the specified folders.    </p>
-<ul>
-<li>win-builds-i686</li>
-<li>win-builds-x86_64</li>
-<li>MSYS</li>
-<li>gcc for ARM</li>
-<li>openocd</li>
-<li>zadig</li>
-<li>git</li>
-<li>
-<p>go</p>
-<ul>
-<li><em>win-builds (mingw64) 1.5 for i686</em></li>
-</ul>
-<p>Download from <a href="http://win-builds.org/doku.php/download_and_installation_from_windows">http://win-builds.org/doku.php/download_and_installation_from_windows</a>. Install at: "C:\win-builds-i686".</p>
-<p>Be sure to click the i686 option (not x86_64). The defaults for all other options are OK. The installer will want to download a bunch of additional packages. They are not all necessary, but it is simplest to just accept the defaults.</p>
-<ul>
-<li><em>win-builds (mingw64) 1.5 for x86_64</em></li>
-</ul>
-<p>Download from <a href="http://win-builds.org/doku.php/download_and_installation_from_windows">http://win-builds.org/doku.php/download_and_installation_from_windows</a>. Install at "C:\win-builds-x86_64"</p>
-<p>Run the installer a second time, but this time click the x86_64 option, NOT i686.  The defaults for all other options are OK.</p>
-<ul>
-<li><em>MSYS</em></li>
-</ul>
-<p>Start your download from <a href="http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip">http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip</a></p>
-<p>Unzip to "C:\msys"</p>
-<ul>
-<li><em>gcc for ARM, 4.9.3</em></li>
-</ul>
-<p>Download the Windows installer from <a href="https://launchpad.net/gcc-arm-embedded/+download">https://launchpad.net/gcc-arm-embedded/+download</a> and install at "C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3".</p>
-<ul>
-<li>OpenOCD 0.8.0</li>
-</ul>
-<p>Download OpenOCD 0.8.0 from <a href="http://www.freddiechopin.info/en/download/category/4-openocd">http://www.freddiechopin.info/en/download/category/4-openocd</a>. Unzip to "C:\openocd".</p>
-<ul>
-<li>Zadig 2.1.2</li>
-</ul>
-<p>Download it from <a href="http://zadig.akeo.ie">http://zadig.akeo.ie</a> and install it at "C:\zadig".</p>
-<ul>
-<li>Git</li>
-</ul>
-<p>Click on <a href="https://git-scm.com/download/win">https://git-scm.com/download/win</a> to start the download. Install at "C:\Program Files (x86)\Git". Specify the "Use Git from the Windows Command Prompt" option.  The defaults for all other options are OK.</p>
-<ul>
-<li>Go</li>
-</ul>
-<p>Download the release for Microsoft Windows from <a href="https://golang.org/dl/">https://golang.org/dl/</a> and install it "C:\Go".</p>
-</li>
-</ul>
-</li>
-</ul>
-<h4 id="creating-local-repository_2">Creating local repository<a class="headerlink" href="#creating-local-repository_2" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>The directory structure must be first readied for using Go. Go code must be kept inside a workspace. A workspace is a directory hierarchy with three directories at its root:</p>
-<ul>
-<li>
-<p>src contains Go source files organized into packages (one package per directory),</p>
-</li>
-<li>
-<p>pkg contains package objects, and</p>
-</li>
-<li>
-<p>bin contains executable commands.</p>
-</li>
-</ul>
-<p>The GOPATH environment variable specifies the location of your workspace. First create a 'dev' directory and then a 'go' directory under it. Set the GOPATH environment variable to this directory and then proceed to create the directory for cloning the newt tool repository.</p>
-<pre><code>$ cd c:\
-$ mkdir dev\go
-$ cd dev\go
-</code></pre>
-</li>
-<li>
-<p>Set the following user environment variables using the steps outlined here.</p>
-<ul>
-<li>GOPATH: C:\dev\go</li>
-<li>PATH: C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin;%GOPATH%\bin;C:\win-builds-x86_64\bin;C:\win-builds-i686\bin;C:\msys\bin</li>
-</ul>
-<p>Steps:</p>
-<ol>
-<li>Right-click the start button</li>
-<li>Click "Control panel"</li>
-<li>Click "System and Security"</li>
-<li>Click "System"</li>
-<li>Click "Advanced system settings" in the left panel</li>
-<li>Click the "Envoronment Variables..." button</li>
-<li>There will be two sets of environment variables: user variables
-  in the upper half of the screen, and system variables in the lower
-  half.  Configuring the user variables is recommended and tested 
-  (though system variables will work as well).</li>
-</ol>
-</li>
-<li>
-<p>Next, install godep. Note that the following command produces no output.</p>
-<pre><code>$ go get github.com/tools/godep
-</code></pre>
-</li>
-<li>
-<p>Set up the repository for the package building tool "newt" on your local machine. First create the appropriate directory for it and then clone the newt tool repository from the online apache repository (or its github.com mirror) into this newly created directory. Check the contents of the directory.</p>
-<pre><code>$ mkdir %GOPATH%\src\github.com\mynewt
-$ cd %GOPATH%\src\github.com\mynewt
-$ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git newt
-$ ls
-newt
-$ cd newt
-$ ls
-Godeps                  README.md               coding_style.txt        newt.go
-LICENSE                 cli                     design.txt
-</code></pre>
-</li>
-<li>
-<p>Use the go command 'install' to compile and install packages and dependencies. Add go environment to path. Again, to make the export variable permanent, add it to your ~/.bashrc (or equivalent) file.</p>
-<pre><code>$ %GOPATH%\bin\godep restore 
-$ go get 
-$ go install
-</code></pre>
-</li>
-</ul>
-<h4 id="building-the-newt-tool_2">Building the newt tool<a class="headerlink" href="#building-the-newt-tool_2" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>You will now use go to run the newt.go program to build the newt tool. You will have to use <code>go build</code> command which compiles and writes the resulting executable to an output file named <code>newt</code>. However, it does not install the results along with its dependencies in $GOPATH/bin (for that you will need to use <code>go install</code>). Now try running newt using the compiled binary. For example, check for the version number by typing 'newt version'. See all the possible commands available to a user of newt by typing 'newt -h'.</p>
-<p>Note: If you are going to be be modifying the newt tool itself often and wish to compile the program every time you call it, you may want to define the newt environment variable that allows you to execute the command via <code>%newt%</code>. Use <code>set newt=go run %GOPATH%\src\github.com\mynewt\newt\newt.go</code> or set it from the GUI. Here, you use <code>go run</code> which runs the compiled binary directly without producing an executable.</p>
-<pre><code>$ go build %GOPATH%\src\github.com\mynewt\newt\newt.go
-$ cd ~/dev/go/src/github.com/mynewt/newt
-$ dir
-Godeps          README.md       coding_style.txt    newt
-LICENSE         cli         design.txt      newt.go
-$ newt version
-Newt version:  1.0
-$ newt -h
-Newt allows you to create your own embedded project based on the Mynewt
-operating system. Newt provides both build and package management in a
-single tool, which allows you to compose an embedded workspace, and set
-of projects, and then build the necessary artifacts from those projects.
-For more information on the Mynewt operating system, please visit
-https://www.github.com/mynewt/documentation.
-
-Please use the newt help command, and specify the name of the command
-you want help for, for help on how to use a specific command
-
-Usage:
- newt [flags]
- newt [command]
-
-Examples:
- newt
- newt help [&lt;command-name&gt;]
-   For help on &lt;command-name&gt;.  If not specified, print this message.
-
-Available Commands:
- version     Display the Newt version number.
- target      Set and view target information
- egg         Commands to list and inspect eggs on a nest
- nest        Commands to manage nests &amp; clutches (remote egg repositories)
- help        Help about any command
-
-Flags:
- -h, --help=false: help for newt
- -l, --loglevel="WARN": Log level, defaults to WARN.
- -q, --quiet=false: Be quiet; only display error output.
- -s, --silent=false: Be silent; don't output anything.
- -v, --verbose=false: Enable verbose output when executing commands.
-
-Use "newt help [command]" for more information about a command.
-</code></pre>
-</li>
-<li>
-<p>Without creating a project repository you can't do a whole lot with the Newt tool. So you'll have to wait till you have downloaded a nest to try out the tool. </p>
-</li>
-</ul>
-<h4 id="getting-the-debugger-ready_2">Getting the debugger ready<a class="headerlink" href="#getting-the-debugger-ready_2" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>Use Zadig to configure the USB driver for your Olimex debugger.  If your debugger is already set up, you can skip this step.</p>
-<ol>
-<li>Plug in your Olimex debugger.</li>
-<li>Start Zadig.</li>
-<li>Check the Options -&gt; List All Devices checkbox.</li>
-<li>Select "Olimex OpenOCD JTAG ARM-USB-TINY-H" in the dropdown menu.</li>
-<li>Select the "WinUSB" driver.</li>
-<li>Click the "Install Driver" button.</li>
-</ol>
-</li>
-</ul>
-<h4 id="proceed-to-the-building-test-code-on-simulator-on-windows-machine-section">Proceed to the <a href="#building-test-code-on-simulator">Building test code on simulator on Windows machine</a> section.<a class="headerlink" href="#proceed-to-the-building-test-code-on-simulator-on-windows-machine-section" title="Permanent link">&para;</a></h4>
-<p>Note: Currently, the simulator cannot be run in the Windows machine. We are still working on it. So you will go ahead and <a href="#making-an-led-blink">make an LED blink</a> on the Olimex hardware directly. </p>
-<p>However, before you skip to the hardware target, you still need to build your first nest as outlined in step 1 in the <a href="#building-test-code-on-simulator">Building test code on simulator</a>.</p>
-<h3 id="building-test-code-on-simulator">Building test code on simulator<a class="headerlink" href="#building-test-code-on-simulator" title="Permanent link">&para;</a></h3>
-<p>Note: Currently, the simulator cannot be run in the Windows machine. We are working on it. If you are on a Windows machine, do step 1 below and then proceed to the <a href="#making-an-led-blink">Making an LED blink</a> on the Olimex hardware directly.</p>
-<ol>
-<li>
-<p>First, you have to create a repository for the project i.e. build your first nest! Go to ~/dev and clone the larva repository from the apache git repository into a local directory named <code>larva</code>.</p>
-<p>Substitute DOS commands for Unix commands as necessary in the following steps if your machine is running Windows. The newt tool commands do not change.</p>
-<pre><code>$ cd ~/dev 
-$ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva
-$ ls
-go  larva
-$ cd larva
-$ ls
-LICENSE     clutch.yml  hw      nest.yml      project
-README.md   compiler    libs        net       scripts
-</code></pre>
-</li>
-<li>
-<p>You will now create a new target using the newt tool. You can either use the compiled binary <code>newt</code> or run the newt.go program using <code>$newt</code> (assuming you have stored the command in a variable in your .bash_profile or .bashrc). When you do a <code>newt target show</code> or <code>$newt target show</code> it should list all the projects you have created so far. </p>
-<pre><code>$ newt target create sim_test
-Creating target sim_test
-Target sim_test sucessfully created!
-$ newt target show
-sim_test
-    name: sim_test
-    arch: sim
-</code></pre>
-</li>
-<li>
-<p>Now continue to populate and build out the sim project.</p>
-<pre><code>$ newt target set sim_test project=test
-Target sim_test successfully set project to test
-$ newt target set sim_test compiler_def=debug
-Target sim_test successfully set compiler_def to debug
-$ newt target set sim_test bsp=hw/bsp/native
-Target sim_test successfully set bsp to hw/bsp/native
-$ newt target set sim_test compiler=sim
-Target sim_test successfully set compiler to sim
-$ newt target show sim_test
-sim_test
-    arch: sim
-    project: test
-    compiler_def: debug
-    bsp: hw/bsp/native
-    compiler: sim
-    name: sim_test
-</code></pre>
-</li>
-<li>
-<p>Configure newt to use the gnu build tools native to OS X or linux. In order for sim to work properly, it needs to be using 32-bit gcc (gcc-5). Replace 
-~/dev/larva/compiler/sim/compiler.yml with the compiler/sim/osx-compiler.yml or linux-compiler.yml file, depending on the system. </p>
-<p>For a Mac OS X environment:</p>
-<pre><code>$ cp compiler/sim/osx-compiler.yml compiler/sim/compiler.yml
-</code></pre>
-<p>For a Linux machine:</p>
-<pre><code>$ cp compiler/sim/linux-compiler.yml compiler/sim/compiler.yml
-</code></pre>
-</li>
-<li>
-<p>Next, create (hatch!) the eggs for this project using the newt tool - basically, build the packages for it. You can specify the VERBOSE option if you want to see the gory details. </p>
-<pre><code>$ $newt target build sim_test
-Successfully run!
-</code></pre>
-<p>You can specify the VERBOSE option if you want to see the gory details.</p>
-<pre><code>$newt -l VERBOSE target build sim_test
-2015/09/29 09:46:12 [INFO] Building project test
-2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//bootutil...
-2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//cmsis-core...
-2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//ffs..
-...
-Successfully run!
-</code></pre>
-</li>
-<li>
-<p>Try running the test suite executable inside this project and enjoy your first successful hatch.</p>
-<pre><code>$ ./project/test/bin/sim_test/test.elf
-[pass] os_mempool_test_suite/os_mempool_test_case
-[pass] os_mutex_test_suite/os_mutex_test_basic
-[pass] os_mutex_test_suite/os_mutex_test_case_1
-[pass] os_mutex_test_suite/os_mutex_test_case_2
-[pass] os_sem_test_suite/os_sem_test_basic
-[pass] os_sem_test_suite/os_sem_test_case_1
-[pass] os_sem_test_suite/os_sem_test_case_2
-[pass] os_sem_test_suite/os_sem_test_case_3
-[pass] os_sem_test_suite/os_sem_test_case_4
-[pass] os_mbuf_test_suite/os_mbuf_test_case_1
-[pass] os_mbuf_test_suite/os_mbuf_test_case_2
-[pass] os_mbuf_test_suite/os_mbuf_test_case_3
-[pass] gen_1_1/ffs_test_unlink
-[pass] gen_1_1/ffs_test_rename
-[pass] gen_1_1/ffs_test_truncate
-[pass] gen_1_1/ffs_test_append
-[pass] gen_1_1/ffs_test_read
-[pass] gen_1_1/ffs_test_overwrite_one
-[pass] gen_1_1/ffs_test_overwrite_two
-[pass] gen_1_1/ffs_test_overwrite_three
-...
-...
-[pass] boot_test_main/boot_test_vb_ns_11
-</code></pre>
-</li>
-</ol>
-<h3 id="building-test-code-on-simulator-on-windows-machine">Building test code on simulator on Windows machine<a class="headerlink" href="#building-test-code-on-simulator-on-windows-machine" title="Permanent link">&para;</a></h3>
-<p>Coming soon.</p>
-<h3 id="making-an-led-blink">Making an LED blink<a class="headerlink" href="#making-an-led-blink" title="Permanent link">&para;</a></h3>
-<h4 id="preparing-the-software">Preparing the Software<a class="headerlink" href="#preparing-the-software" title="Permanent link">&para;</a></h4>
-<ol>
-<li>
-<p>Make sure the PATH environment variable includes the $HOME/dev/go/bin directory (or C:\%GOPATH%\bin on Windows machine). </p>
-<p>Substitute DOS commands for Unix commands as necessary in the following steps if your machine is running Windows. The newt tool commands do not change.</p>
-</li>
-<li>
-<p>You first have to create a repository for the project. Go to the ~dev/larva directory and build out a second project inside larva. The project name is "blinky", in keeping with the objective. Starting with the target name, you have to specify the different aspects of the project to pull the appropriate eggs and build the right package for the board. In this case that means setting the architecture (arch), compiler, board support package (bsp), project, and compiler mode.</p>
-<pre><code>$ newt target create blinky
-Creating target blinky
-Target blinky sucessfully created!
-$ newt target set blinky arch=cortex_m4
-Target blinky successfully set arch to arm
-$ newt target set blinky compiler=arm-none-eabi-m4
-Target blinky successfully set compiler to arm-none-eabi-m4
-$ newt target set blinky project=blinky
-Target blinky successfully set project to blinky
-$ newt target set blinky compiler_def=debug
-Target blinky successfully set compiler_def to debug
-$ newt target set blinky bsp=hw/bsp/olimex_stm32-e407_devboard
-Target blinky successfully set bsp to hw/bsp/olimex_stm32-e407_devboard
-$ newt target show blinky
-blinky
-    compiler: arm-none-eabi-m4
-    project: blinky
-    compiler_def: debug
-    bsp: hw/bsp/olimex_stm32-e407_devboard
-    name: blinky
-    arch: cortex_m4
-</code></pre>
-</li>
-<li>
-<p>Now you have to build the image. The linker script within the <code>hw/bsp/olimex_stm32-e407_devboard</code> egg builds an image for flash memory by default. Therefore, you need to switch that script with <code>run_from_sram.ld</code> in order to get the egg to produce an image for SRAM. <font color="red"> We are working on making it easier to specify where the executable will be run from for a particular project and automatically choose the correct linker scripts and generate the appropriate image. It will be specified as a project identity e.g. bootloader, RAM, flash (default) and the target will build accordingly. </font>. </p>
-<p>Once the target is built, you can find the executable "blinky.elf" in the project directory at ~/dev/larva/project/blinky/bin/blinky. It's a good idea to take a little time to understand the directory structure.</p>
-<pre><code>$ cd ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard
-$ diff olimex_stm32-e407_devboard.ld run_from_sram.ld
-$ cp run_from_sram.ld olimex_stm32-e407_devboard.ld
-$ cd ~/dev/larva/project/blinky/bin/blinky
-$ newt target build blinky
-Building target blinky (project = blinky)
-Compiling case.c
-Compiling suite.c
-...
-Successfully run!
-$ ls
-LICENSE     clutch.yml  hw      nest.yml    project
-README.md   compiler    libs        net     scripts
-$ cd project
-$ ls
-bin2img     bletest     blinky      boot        ffs2native  test
-$ cd blinky
-$ ls
-bin     blinky.yml  egg.yml     src
-$ cd bin
-$ ls
-blinky
-$ cd blinky
-$ ls
-blinky.elf  blinky.elf.bin  blinky.elf.cmd  blinky.elf.lst  blinky.elf.map
-</code></pre>
-</li>
-<li>
-<p>Check that you have all the scripts needed to get OpenOCD up and talking with the project's specific hardware. Check whether you already have the scripts in your <code>/usr/share/openocd/scripts/</code> directory as they may have been part of the openocd download. If yes, you are all set and can proceed to preparing the hardware. If not, continue with this step.</p>
-<p>Currently, the following 5 files are required. They are likely to be packed into a .tar file and made available under mynewt on github.com. Unpack it in the blinky directory using <code>tar xvfz</code> command. Go into the openocd directory created and make sure that the gdb-8888.cfg file indicates the correct file ('blinky.elf' in this case) to load and its full path. Specifically, add 'load ~/dev/larva/project/main/bin/blink/main.elf' and 'symbol-file ~/larva/larva/project/main/bin/blink/main.elf' to this file. Alternatively, you could load these files from within the debugger (gdb) as explained later in the project when you connect to the board using openocd.   </p>
-<ul>
-<li>ocd-8888.cfg</li>
-<li>olimex-arm-usb-tiny-h-ftdi.cfg</li>
-<li>arm-gdb.cfg</li>
-<li>gdb-dev_test-8888.cfg</li>
-<li>stm32f4x.cfg  </li>
-</ul>
-<p>Check the arm-gdb.cfg file and see whether the executable you created in the previous step is specified as the file to be loaded to the board. You have the choice of specifying the target and load from within the gdb debugger (Section "Let's Go", Step 2) instead.</p>
-<pre><code>$ cat gdb-8888.cfg
-echo \n*** Set target charset ASCII\n
-set target-charset ASCII
-#set arm fallback-mode arm
-#echo \n*** set arm fallback-mode arm ***\n
-echo \n*** Connecting to OpenOCD over port #8888 ***\n
-target remote localhost:8888
-echo \n*** loading nic.out.elf ***\n
-load ~/dev/larva/project/main/bin/blink/main.elf
-symbol-file ~/dev/larva/project/main/bin/blink/main.elf 
-#echo *** Set breakpoint and run to main() to sync with gdb ***\n
-#b main
-#continue
-#delete 1
-
-#set arm fallback-mode thumb
-#echo \n*** set arm fallback-mode thumb ***\n\n
-</code></pre>
-<p>Note that an OpenOCD configuration script is available from Olimex for the STM32-E407 development board e.g. at <a href="https://www.olimex.com/Products/ARM/ST/STM32-E407/resources/stm32f4x.cfg">https://www.olimex.com/Products/ARM/ST/STM32-E407/resources/stm32f4x.cfg</a>, however getting it to work with different versions of OpenOCD and gcc could get tricky. [<span style="color:red"><em>This will be simplified eventually into a consolidated single action step instead of manual tweaks currently required</em></span>]</p>
-</li>
-</ol>
-<h4 id="preparing-the-hardware-to-boot-from-embedded-sram">Preparing the hardware to boot from embedded SRAM<a class="headerlink" href="#preparing-the-hardware-to-boot-from-embedded-sram" title="Permanent link">&para;</a></h4>
-<ol>
-<li>
-<p>Locate the boot jumpers on the board.
-<img alt="Alt Layout - Top View" src="../pics/topview.png" />
-<img alt="Alt Layout - Bottom View" src="../pics/bottomview.png" /></p>
-</li>
-<li>
-<p>B1_1/B1_0 and B0_1/B0_0 are PTH jumpers which can be moved relatively easy. Note that the markings on the board may not always be accurate. Always refer to the manual for the correct positioning of jumpers in case of doubt. The two jumpers must always be moved together – they are responsible for the boot mode if bootloader is present. The board can search for bootloader on three places – User Flash Memory, System Memory or the Embedded SRAM. We will configure it to boot from SRAM by jumpering B0_1 and B1_1.</p>
-</li>
-<li>
-<p>Connect USB-OTG#2 in the picture above to a USB port on your computer (or a powered USB hub to make sure there is enough power available to the board). </p>
-</li>
-<li>
-<p>Connect the JTAG connector to the SWD/JTAG interface on the board. The other end of the cable should be connected to the USB port or hub of your computer.</p>
-</li>
-<li>
-<p>The red PWR LED should be lit. </p>
-</li>
-</ol>
-<h4 id="lets-go">Let's Go!<a class="headerlink" href="#lets-go" title="Permanent link">&para;</a></h4>
-<ol>
-<li>
-<p>Go into the openocd directory and start an OCD session. You should see some status messages are shown below. Check the value of the msp (main service pointer) register. If it is not 0x10010000 as indicated below, you will have to manually set it after you open the gdp tool to load the image on it (next step). Note the <code>-c "reset halt"</code> flag that tells it to halt after opening the session. It will now require a manual "continue" command from the GNU debugger in step 3. </p>
-<pre><code>$ cd ~/dev/larva/project/blinky/bin/blinky/openocd
-$ openocd -f olimex-arm-usb-tiny-h-ftdi.cfg -f ocd-8888.cfg -f stm32f4x.cfg -c "reset halt" 
-Open On-Chip Debugger 0.8.0 (2015-09-22-18:21)
-Licensed under GNU GPL v2
-For bug reports, read
-    http://openocd.sourceforge.net/doc/doxygen/bugs.html
-Info : only one transport option; autoselect 'jtag'
-adapter speed: 1000 kHz
-adapter_nsrst_assert_width: 500
-adapter_nsrst_delay: 100
-jtag_ntrst_delay: 100
-cortex_m reset_config sysresetreq
-Info : clock speed 1000 kHz
-Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
-Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
-Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
-Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
-Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
-target state: halted
-target halted due to debug-request, current mode: Thread 
-xPSR: 0x01000000 pc: 0x2000053c msp: 0x10010000
-</code></pre>
-<p>If your scripts are in <code>/usr/share/openocd/scripts/</code> directory you may need to provide the full path information in the arguments.</p>
-<pre><code>$ openocd -f /usr/share/openocd/scripts/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /usr/share/openocd/scripts/target/stm32f4x.cfg -c "gdb_port 8888; init; reset halt"
-</code></pre>
-<p>If you are on a Windows machine, connect to the board with openocd using the following:</p>
-<pre><code>$ cd C:\openocd
-$ bin\openocd-0.8.0.exe -f scripts\interface\ftdi\olimex-arm-usb-tiny-h.cfg -f scripts\target\stm32f4x.cfg -c "gdb_port 8888; init; reset halt"
-</code></pre>
-</li>
-<li>
-<p>Open a new terminal window and run the GNU debugger for ARM. Specifying the script gdb-8888.cfg tells it what image to load. You should now have a (gdb) prompt inside the debugger.</p>
-<pre><code>$ cd ~/dev/larva/project/blinky/bin/blinky/openocd
-$ arm-none-eabi-gdb -x gdb-8888.cfg 
-GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
-Copyright (C) 2014 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
-and "show warranty" for details.
-This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
-Type "show configuration" for configuration details.
-For bug reporting instructions, please see:
-&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
-Find the GDB manual and other documentation resources online at:
-&lt;http://www.gnu.org/software/gdb/documentation/&gt;.
-For help, type "help".
-Type "apropos word" to search for commands related to "word".
-
-*** Set target charset ASCII
-
-*** Connecting to OpenOCD over port #8888 ***
-0x20000580 in ?? ()
-
-*** loading image ***
-Loading section .text, size 0x65d4 lma 0x20000000
-Loading section .ARM.extab, size 0x24 lma 0x200065dc
-Loading section .ARM.exidx, size 0xd8 lma 0x20006600
-Loading section .data, size 0x8f8 lma 0x200066d8
-Start address 0x2000053c, load size 28624
-Transfer rate: 78 KB/sec, 2862 bytes/write.
-(gdb)
-</code></pre>
-<p>Instead of the script, you could connect to the openocd process and tell the debugger what image to load from within gdb (which is 'blinky.elf' in this case). Below is an example input/output when doing it on a Windows machine. Note the forward slashes.</p>
-<pre><code>C:\dev\larva&gt;arm-none-eabi-gdb -q
-(gdb) target remote localhost:8888
-Remote debugging using localhost:8888
-0xb064f054 in ?? ()
-...
-(gdb) load C:/dev/larva/project/blinky/bin/blinky/blinky.elf
-Loading section .text, size 0x6778 lma 0x20000000
-Loading section .ARM.extab, size 0x18 lma 0x20006778
-Loading section .ARM.exidx, size 0xc8 lma 0x20006790
-Loading section .data, size 0x8f8 lma 0x20006858
-Start address 0x20000528, load size 29008
-Transfer rate: 72 KB/sec, 2900 bytes/write.
-(gdb) symbol-file C:/dev/larva/project/blinky/bin/blinky/blinky.elf
-Reading symbols from C:/dev/larva/project/blinky/bin/blinky/blinky.elf...done.
-</code></pre>
-</li>
-<li>
-<p>From within gdb check the registers. Set the msp register for the main stack pointer to the expected value as shown here. </p>
-<p>Finally, hit <code>c</code> to continue... and your green LED should blink!</p>
-<pre><code>(gdb) info reg all
- r0             0x0 0
- r1             0x0 0
- r2             0x0 0
- r3             0x0 0
- r4             0x0 0
- r5             0x0 0
- r6             0x0 0
- r7             0x0 0
- r8             0x0 0
- r9             0x0 0
- r10            0x0 0
- r11            0x0 0
- r12            0x0 0
- sp             0x10010000  0x10010000
- lr             0xffffffff  -1
- pc             0x20000580  0x20000580 &lt;Reset_Handler&gt;
- xPSR           0x1000000   16777216
- msp            0x10010000  0x10010000
- psp            0x0 0x0
- primask        0x0 0
- basepri        0x0 0
- faultmask      0x0 0
- control        0x0 0
- (gdb) set $msp=0x10010000
- (gdb) c
- Continuing.
-</code></pre>
-</li>
-<li>
-<p>Voilà! The board's LED should be blinking at 1 Hz.</p>
-</li>
-</ol>
-<h3 id="using-flash-to-make-led-blink">Using flash to make LED blink<a class="headerlink" href="#using-flash-to-make-led-blink" title="Permanent link">&para;</a></h3>
-<ol>
-<li>Configure the board to boot from flash by moving the two jumpers together to B0_0 and B1_0. </li>
-</ol>
-<p>You will have to reset the board once the image is uploaded to it.</p>
-<ol>
-<li>
-<p>By now you know that you have to build a new package that will run from flash. First, the olimex_stm32-e407_devboard.ld linker script which was previously made the same as run_from_sram.ld will now need the contents of run_from_flash.ld. Then the target has to be rebuilt. </p>
-<pre><code>$ cd ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard
-$ diff olimex_stm32-e407_devboard.ld run_from_sram.ld
-$ cp run_from_flash.ld olimex_stm32-e407_devboard.ld
-$ cd ~/dev/larva/project/blinky/bin/blinky
-$ newt target build blinky
-</code></pre>
-</li>
-<li>
-<p>Go to the project directory and download the image to flash ... in a flash! </p>
-<pre><code>$ cd ~/dev/larva/project/blinky/bin/blinky
-$ newt target download blinky
-Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
-</code></pre>
-</li>
-<li>
-<p>The LED should be blinking!</p>
-</li>
-<li>
-<p>But wait...let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olimex JTAG adaptor. The debug connection to the JTAG port is now severed. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board. </p>
-<p>The LED light will start blinking again. Success!</p>
-<p>Note #1: If you want to download the image to flash and a gdb session opened up, use <code>newt target debug blinky</code> instead of <code>newt target download blinky</code>.</p>
-<pre><code>$ newt target debug blinky
-Debugging with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky
-Debugging ~/dev/larva/project/blinky/bin/blinky/blinky.elf
-GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
-Copyright (C) 2014 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
-and "show warranty" for details.
-This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
-Type "show configuration" for configuration details.
-For bug reporting instructions, please see:
-&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
-Find the GDB manual and other documentation resources online at:
-&lt;http://www.gnu.org/software/gdb/documentation/&gt;.
-For help, type "help".
-Type "apropos word" to search for commands related to "word"...
-Reading symbols from /Users/aditihilbert/dev/larva/project/blinky/bin/blinky/blinky.elf...done.
-Open On-Chip Debugger 0.8.0 (2015-09-22-18:21)
-Licensed under GNU GPL v2
-For bug reports, read
-    http://openocd.sourceforge.net/doc/doxygen/bugs.html
-Info : only one transport option; autoselect 'jtag'
-adapter speed: 1000 kHz
-adapter_nsrst_delay: 100
-jtag_ntrst_delay: 100
-Warn : target name is deprecated use: 'cortex_m'
-DEPRECATED! use 'cortex_m' not 'cortex_m3'
-cortex_m reset_config sysresetreq
-Info : clock speed 1000 kHz
-Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
-Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
-Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
-Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
-Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
-target state: halted
-target halted due to debug-request, current mode: Thread 
-xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000
-Info : accepting 'gdb' connection from 3333
-Info : device id = 0x10036413
-Info : flash size = 1024kbytes
-Reset_Handler () at startup_STM32F40x.s:199
-199     ldr    r1, =__etext
-(gdb)
-</code></pre>
-<p>Note #2: If you want to erase the flash and load the image again you may use the following commands from within gdb. <code>flash erase_sector 0 0 x</code> tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the contents of the sector starting at location 'lma' you should therefore see all f's. The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.</p>
-<pre><code>(gdb) monitor flash erase_sector 0 0 4
-erased sectors 0 through 4 on flash bank 0 in 2.296712s
-(gdb) x/32wx 0x8000000 
-0x8000000 &lt;__isr_vector&gt;:   0xffffffff  0xffffffff 0xffffffff 0xffffffff 
-0x8000010 &lt;__isr_vector+16&gt;:    0xffffffff 0xffffffff 0xffffffff 0xffffffff
-...
-</code></pre>
-</li>
-</ol></div>
-            
-        </div>
-
-        <footer class="col-md-12">
-            <hr>
-            
-            <p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</p>
-        </footer>
-
-        <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>var base_url = '../..';</script>
-        <script data-main="../../mkdocs/js/search.js" src="../../mkdocs/js/require.js"></script>
-        <script src="../../js/base.js"></script>
-
-        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
-            <div class="modal-dialog">
-                <div class="modal-content">
-                    <div class="modal-header">
-                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-                        <h4 class="modal-title" id="exampleModalLabel">Search</h4>
-                    </div>
-                    <div class="modal-body">
-                        <p>
-                            From here you can search these documents. Enter
-                            your search terms below.
-                        </p>
-                        <form role="form">
-                            <div class="form-group">
-                                <input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query">
-                            </div>
-                        </form>
-                        <div id="mkdocs-search-results"></div>
-                    </div>
-                    <div class="modal-footer">
-                    </div>
-                </div>
-            </div>
-        </div>
-
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0d880edf/site/chapter2/project2/index.html
----------------------------------------------------------------------
diff --git a/site/chapter2/project2/index.html b/site/chapter2/project2/index.html
deleted file mode 100644
index fa6607b..0000000
--- a/site/chapter2/project2/index.html
+++ /dev/null
@@ -1,573 +0,0 @@
-<!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.incubator.apache.org/index.html/chapter2/project2/">
-        <link rel="shortcut icon" href="../../img/favicon.ico">
-
-	<title>Project 2 - Mynewt</title>
-
-        <link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
-        <link href="../../css/font-awesome-4.0.3.css" rel="stylesheet">
-        <link href="../../css/base.css" rel="stylesheet">
-        <link rel="stylesheet" href="../../css/highlight.css">
-
-        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
-        <!--[if lt IE 9]>
-            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
-            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
-        <![endif]-->
-
-        
-    </head>
-
-    <body>
-
-        <div class="navbar navbar-default 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>
-            
-
-            <!-- Main title -->
-            <a class="navbar-brand" href="../..">Mynewt</a>
-        </div>
-
-        <!-- Expanded navigation -->
-        <div class="navbar-collapse collapse">
-            
-                <!-- Main navigation -->
-                <ul class="nav navbar-nav">
-                
-                
-                    <li >
-                        <a href="../..">Doc Home</a>
-                    </li>
-                
-                
-                
-                    <li class="dropdown">
-                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Getting Started <b class="caret"></b></a>
-                        <ul class="dropdown-menu">
-                        
-                            
-<li >
-    <a href="../../chapter1/newt_concepts/">Newt Concepts</a>
-</li>
-
-                        
-                            
-<li >
-    <a href="../../chapter1/project1/">Blinky, The First Project</a>
-</li>
-
-                        
-                        </ul>
-                    </li>
-                
-                
-                
-                    <li class="dropdown active">
-                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Getting Acclimated <b class="caret"></b></a>
-                        <ul class="dropdown-menu">
-                        
-                            
-<li >
-    <a href="../vocabulary/">Understanding Newt Terms</a>
-</li>
-
-                        
-                            
-<li class="active">
-    <a href="./">Project 2</a>
-</li>
-
-                        
-                            
-<li >
-    <a href="../project3/">Project 3</a>
-</li>
-
-                        
-                        </ul>
-                    </li>
-                
-                
-                
-                    <li class="dropdown">
-                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Newt tool Reference <b class="caret"></b></a>
-                        <ul class="dropdown-menu">
-                        
-                            
-<li >
-    <a href="../../chapter3/newt_ops/">Command structure</a>
-</li>
-
-                        
-                            
-<li >
-    <a href="../../chapter3/newt_tool_reference/">Command list</a>
-</li>
-
-                        
-                        </ul>
-                    </li>
-                
-                
-                </ul>
-            
-
-            <ul class="nav navbar-nav navbar-right">
-                <li>
-                    <a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
-                        <i class="fa fa-search"></i> Search
-                    </a>
-                </li>
-                
-                    <li >
-                        <a rel="next" href="../vocabulary/">
-                            <i class="fa fa-arrow-left"></i> Previous
-                        </a>
-                    </li>
-                    <li >
-                        <a rel="prev" href="../project3/">
-                            Next <i class="fa fa-arrow-right"></i>
-                        </a>
-                    </li>
-                
-                
-            </ul>
-        </div>
-    </div>
-</div>
-
-        <div class="container">
-            
-                <div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
-    <ul class="nav bs-sidenav">
-    
-        <li class="main active"><a href="#project-2-blinky-on-additional-boards">Project 2 - Blinky on additional boards</a></li>
-        
-            <li><a href="#objective">Objective</a></li>
-        
-            <li><a href="#stm32f303vc-mcu">STM32F303VC MCU</a></li>
-        
-            <li><a href="#nrf52-series">nRF52 Series</a></li>
-        
-    
-    </ul>
-</div></div>
-                <div class="col-md-9" role="main">
-
-<h2 id="project-2-blinky-on-additional-boards">Project 2 - Blinky on additional boards<a class="headerlink" href="#project-2-blinky-on-additional-boards" title="Permanent link">&para;</a></h2>
-<h3 id="objective">Objective<a class="headerlink" href="#objective" title="Permanent link">&para;</a></h3>
-<p>The goal of this tutorial is to download a generic firmware skeleton ("bootstrap image") that applies to any hardware and then throw in additional applicable eggs to generate a build for a specific board. </p>
-<p>The following target hardware chips are covered:</p>
-<ul>
-<li><a href="#stm32f303vc-mcu">STM32F303VC MCU</a> from STMicroelectronics</li>
-<li><a href="#nrf52-series">nRF52 Series</a> from Nordic Semiconductors </li>
-</ul>
-<h3 id="stm32f303vc-mcu">STM32F303VC MCU<a class="headerlink" href="#stm32f303vc-mcu" title="Permanent link">&para;</a></h3>
-<h4 id="hardware-needed">Hardware needed<a class="headerlink" href="#hardware-needed" title="Permanent link">&para;</a></h4>
-<ul>
-<li>Discovery kit with STM32F303VC MCU</li>
-<li>Laptop running Mac OS</li>
-</ul>
-<h4 id="step-by-step-instructions-to-build-image">Step by Step Instructions to build image<a class="headerlink" href="#step-by-step-instructions-to-build-image" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>The first step is to download the generic skeleton of the project. The eggs installed are not hardware architecture specific.</p>
-<pre><code>[user:~/foo]$ newt nest create test_project
-Downloading nest skeleton from https://www.github.com/mynewt/tadpole...   ok!
-Nest test_project successfully created in ~/foo/test_project
-
-[user:~/foo]$ cd test_project/
-</code></pre>
-</li>
-<li>
-<p>Then, the clutch of eggs named larva is added from the nest (also named larva) on the github. This step simply downloads the clutch description file and does not actually install the eggs that constitute the clutch. The clutch description file (<code>clutch.yml</code>) will be used to check dependencies during the egg install to ensure completeness. It serves as a reference for all the eggs in the clutch that one can choose from and install.</p>
-<pre><code>[user:~/foo/test_project]$ newt nest add-clutch larva https://github.com/mynewt/larva
-Downloading clutch.yml from https://github.com/mynewt/larva/master... ok!
-Verifying clutch.yml format... ok!
-Clutch larva successfully installed to Nest.
-</code></pre>
-</li>
-<li>
-<p>The next step is to install relevant eggs from the larva nest on github. The instructions assume that you know what application or project you are interested in (the blinky application, in this case), what hardware you are using (STM32F3DISCOVERY board, in this case) and hence, what board support package you need. </p>
-<pre><code>[user:~/foo/test_projec]$ newt egg install project/blinky          
-Downloading larva from https://github.com/mynewt/larva//master... ok!
-Installing project/blinky
-Installation was a success!
-
-[user:~/foo/test_project]$ newt egg install hw/bsp/stm32f3discovery
-Downloading larva from https://github.com/mynewt/larva//master... ok!
-Installing hw/bsp/stm32f3discovery
-Installing hw/mcu/stm/stm32f3xx
-Installing libs/cmsis-core
-Installing compiler/arm-none-eabi-m4
-Installation was a success!
-</code></pre>
-</li>
-<li>
-<p>It's time to create a target for the project and define the target attributes. </p>
-<pre><code>[user:~/foo/test_project]$ newt target create blink_f3disc
-Creating target blink_f3disc
-Target blink_f3disc successfully created!
-
-[user:~/foo/test_project]$ newt target set blink_f3disc project=blinky
-Target blink_f3disc successfully set project to blinky
-
-[user:~/foo/test_project]$ newt target set blink_f3disc bsp=hw/bsp/stm32f3discovery
-Target blink_f3disc successfully set bsp to hw/bsp/stm32f3discovery
-
-[marko@Markos-MacBook-Pro-2:~/foo/test_project]$ newt target set blink_f3disc compiler_def=debug
-Target blink_f3disc successfully set compiler_def to debug
-
-[user:~/foo/test_project]$ newt target set blink_f3disc compiler=arm-none-eabi-m4
-Target blink_f3disc successfully set compiler to arm-none-eabi-m4
-
-[user:~/foo/test_project]$ newt target set blink_f3disc arch=cortex_m4
-Target blink_f3disc successfully set arch to cortex_m4
-
-[user:~/foo/test_project]$ newt target show blink_f3disc
-blink_f3disc
-    arch: cortex_m4
-    project: blinky
-    bsp: hw/bsp/stm32f3discovery
-    compiler_def: debug
-    compiler: arm-none-eabi-m4
-    name: blink_f3disc
-</code></pre>
-</li>
-<li>
-<p>Finally, you get to build the target and generate an executable that can now be uploaded to the board via the JTAG port. You can go into the openocd directory and start an OCD session as you did in Project 1.</p>
-<pre><code>[user:~/foo/test_project]$ newt target build         blink_f3disc
-Building target blink_f3disc (project = blinky)
-Compiling case.c
-Compiling suite.c
-Compiling testutil.c
-Compiling testutil_arch_arm.c
-Archiving libtestutil.a
-Compiling os.c
-Compiling os_callout.c
-Compiling os_eventq.c
-Compiling os_heap.c
-Compiling os_mbuf.c
-Compiling os_mempool.c
-Compiling os_mutex.c
-Compiling os_sanity.c
-Compiling os_sched.c
-Compiling os_sem.c
-Compiling os_task.c
-Compiling os_time.c
-Compiling os_arch_arm.c
-Assembling HAL_CM4.s
-Assembling SVC_Table.s
-Archiving libos.a
-Compiling hal_gpio.c
-Compiling stm32f3xx_hal_gpio.c
-Archiving libstm32f3xx.a
-Compiling cmsis_nvic.c
-Compiling libc_stubs.c
-Compiling os_bsp.c
-Compiling sbrk.c
-Compiling system_stm32f3xx.c
-Assembling startup_stm32f303xc.s
-Archiving libstm32f3discovery.a
-Compiling main.c
-Building project blinky
-Linking blinky.elf
-Successfully run!
-</code></pre>
-</li>
-</ul>
-<h3 id="nrf52-series">nRF52 Series<a class="headerlink" href="#nrf52-series" title="Permanent link">&para;</a></h3>
-<h4 id="hardware-needed_1">Hardware needed<a class="headerlink" href="#hardware-needed_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>nRF52 Development Kit</li>
-<li>Laptop running Mac OS</li>
-</ul>
-<h4 id="step-by-step-instructions-to-build-image_1">Step by Step Instructions to build image<a class="headerlink" href="#step-by-step-instructions-to-build-image_1" title="Permanent link">&para;</a></h4>
-<ul>
-<li>
-<p>The first step is to download the generic skeleton of the project. The eggs installed are not hardware architecture specific.</p>
-<pre><code>[]user@~/dev]$ newt nest create nordic_blinky
-Downloading nest skeleton from https://www.github.com/mynewt/tadpole... ok!
-Nest nordic_blinky successfully created in ~dev/nordic_blinky
-
-user@~/dev$ cd nordic_blinky/
-</code></pre>
-</li>
-<li>
-<p>Then, the clutch of eggs named larva is added from the nest (also named larva) on the github. This step simply downloads the clutch description file and does not actually install the eggs that constitute the clutch. The clutch description file (<code>clutch.yml</code>) will be used to check dependencies during the egg install to ensure completeness. It serves as a reference for all the eggs in the clutch that one can choose from and install.</p>
-<pre><code>[]user@~/dev/nordic_blinky]$ newt nest add-clutch larva https://github.com/mynewt/larva
-Downloading clutch.yml from https://github.com/mynewt/larva/master... ok!
-Verifying clutch.yml format...ok!
-Clutch larva successfully installed to Nest.
-</code></pre>
-</li>
-<li>
-<p>The next step is to install relevant eggs from the larva nest on github. The instructions assume that you know what application or project you are interested in (the blinky application, in this case), what hardware you are using (STM32F3DISCOVERY board, in this case) and hence, what board support package you need. </p>
-<pre><code>[user@~/dev/nordic_blinky]$ newt egg install project/blinky 
-Downloading larva from https://github.com/mynewt/larva//master... ok!
-Installing project/blinky
-Installation was a success!
-
-[user@~/dev/nordic_blinky]$ newt egg install hw/bsp/nrf52pdk
-Downloading larva from https://github.com/mynewt/larva//master... ok!
-Installing hw/bsp/nrf52pdk
-Installing hw/mcu/nordic/nrf52xxx
-Installing libs/cmsis-core
-Installing compiler/arm-none-eabi-m4
-Installation was a success!
-</code></pre>
-</li>
-<li>
-<p>It's time to create a target for the project and define the target attributes. </p>
-<pre><code>[user@~/dev/nordic_blinky]$ newt target create blink_nordic
-Creating target blink_nordic
-Target blink_nordic successfully created!
-[user@~/dev/nordic_blinky]$ newt target set blink_nordic project=blinky
-Target blink_nordic successfully set project to blinky
-[user@~/dev/nordic_blinky]$ newt target set blink_nordic bsp=hw/bsp/nrf52pdk
-Target blink_nordic successfully set bsp to hw/bsp/nrf52pdk
-[user@~/dev/nordic_blinky]$ newt target set blink_nordic compiler_def=debug
-Target blink_nordic successfully set compiler_def to debug
-[user@~/dev/nordic_blinky]$ newt target set blink_nordic compiler=arm-none-eabi-m4
-Target blink_nordic successfully set compiler to arm-none-eabi-m4
-[user@~/dev/nordic_blinky]$ newt target set blink_nordic arch=cortex_m4
-Target blink_nordic successfully set arch to cortex_m4
-[user@~/dev/nordic_blinky]$ newt target show
-blink_nordic
-    compiler: arm-none-eabi-m4
-    name: blink_nordic
-    arch: cortex_m4
-    project: blinky
-    bsp: hw/bsp/nrf52pdk
-    compiler_def: debug
-</code></pre>
-</li>
-<li>
-<p>Finally, you get to build the target and generate an executable that can now be uploaded to the board via the on-board SEGGER J-Link debugger. </p>
-<pre><code>[user@~/dev/nordic_blinky]$ newt target build blink_nordic
-Building target blink_nordic (project = blinky)
-Compiling case.c
-Compiling suite.c
-Compiling testutil.c
-Compiling testutil_arch_arm.c
-Archiving libtestutil.a
-Compiling os.c
-Compiling os_callout.c
-Compiling os_eventq.c
-Compiling os_heap.c
-Compiling os_mbuf.c
-Compiling os_mempool.c
-Compiling os_mutex.c
-Compiling os_sanity.c
-Compiling os_sched.c
-Compiling os_sem.c
-Compiling os_task.c
-Compiling os_time.c
-Compiling os_arch_arm.c
-Assembling HAL_CM4.s
-Assembling SVC_Table.s
-Archiving libos.a
-Compiling hal_cputime.c
-Compiling hal_gpio.c
-Compiling hal_uart.c
-Archiving libnrf52xxx.a
-Compiling cmsis_nvic.c
-Compiling hal_bsp.c
-Compiling libc_stubs.c
-Compiling os_bsp.c
-Compiling sbrk.c
-Compiling system_nrf52.c
-Assembling gcc_startup_nrf52.s
-Archiving libnrf52pdk.a
-Compiling main.c
-Building project blinky
-Linking blinky.elf
-Successfully run!
-</code></pre>
-</li>
-<li>
-<p>In order to be able to communicate with the SEGGER J-Link debugger on the dev board, you have to download and install the J-Link GDB Server software on to your laptop. You may download the "Software and documentation pack for Mac OS X" from <a href="https://www.segger.com/jlink-software.html">https://www.segger.com/jlink-software.html</a>. The command line version of the server is used in the steps below. </p>
-</li>
-<li>
-<p>Open a new terminal and start a J-Link session.</p>
-<pre><code>[user@~/dev/nordic_blinky/project/blinky/bin]$ which JLinkGDBServer
-/usr/local/bin/JLinkGDBServer
-[user@~/dev/nordic_blinky/project/blinky/bin]$ JLinkGDBServer -if SWD
-SEGGER J-Link GDB Server V5.02f Command Line Version
-
-JLinkARM.dll V5.02f (DLL compiled Oct  2 2015 20:55:03)
-
------GDB Server start settings-----
-GDBInit file:                  none
-GDB Server Listening port:     2331
-SWO raw output listening port: 2332
-Terminal I/O port:             2333
-Accept remote connection:      yes
-Generate logfile:              off
-Verify download:               off
-Init regs on start:            off
-Silent mode:                   off
-Single run mode:               off
-Target connection timeout:     0 ms
-------J-Link related settings------
-J-Link Host interface:         USB
-J-Link script:                 none
-J-Link settings file:          none
-------Target related settings------
-Target device:                 unspecified
-Target interface:              SWD
-Target interface speed:        1000kHz
-Target endian:                 little
-
-Connecting to J-Link...
-J-Link is connected.
-Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Aug 28 2015 19:26:24
-Hardware: V1.00
-S/N: 682371959
-Checking target voltage...
-Target voltage: 3.30 V
-Listening on TCP/IP port 2331
-Connecting to target...Connected to target
-Waiting for GDB connection...Connected to 127.0.0.1
-</code></pre>
-</li>
-<li>
-<p>You need a configuration file for the GDB session to be opened correctly and the image ("blinky.elf") you built for this target downloaded to flash. A sample config script is given below. Alternatively, you could choose to type each command at the gdb prompt.</p>
-<pre><code> [user@~/dev/nordic_blinky/project/blinky/bin/blink_nordic]$ cat jlink-gdb.cfg 
- echo ***Setting up the environment for debugging gdb.***\n
- set complaints 1
- set prompt (gdb) 
- set endian little
- echo \n*** Set target charset ASCII\n
- set target-charset ASCII
- echo \n*** Connecting over port #2331 ***\n
- target remote localhost:2331
- echo \n*** Enable flash write and set device to nrf52 ***\n
- monitor flash download=1
- monitor flash device=nRF52
- echo \n*** loading blinky.elf ***\n
- load ~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky.elf 
- symbol-file ~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky.elf
- echo \n*** Resetting target ***\n
- monitor reset
- echo \n*** Halting target ***\n
- monitor halt
-</code></pre>
-</li>
-<li>
-<p>Start the gdb session and monitor that it loads the image, resets the target, and halts for a command to continue. </p>
-<pre><code>[user@~/dev/nordic_blinky/project/blinky/bin/blink_nordic]$ arm-none-eabi-gdb -x ~/dev/nordic_blinky/project/blinky/bin/blink_nordic/jlink-gdb.cfg
-
-GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
-Copyright (C) 2014 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
-and "show warranty" for details.
-This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
-Type "show configuration" for configuration details.
-For bug reporting instructions, please see:
-&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
-Find the GDB manual and other documentation resources online at:
-&lt;http://www.gnu.org/software/gdb/documentation/&gt;.
-For help, type "help".
-Type "apropos word" to search for commands related to "word".
-
-***Setting up the environment for debugging gdb.***
-The target is assumed to be little endian
-
-*** Set target charset ASCII
-
-*** Connecting over port #2331 ***
-0x00003c34 in ?? ()
-
-*** Enable flash write and set device to nrf52 ***
-Flash download enabled
-Selecting device: nRF52
-
-*** loading blinky.elf ***
-Loading section .text, size 0x5c84 lma 0x0
-Loading section .ARM.extab, size 0x24 lma 0x5c84
-Loading section .ARM.exidx, size 0xd8 lma 0x5ca8
-Loading section .data, size 0x8f8 lma 0x5d80
-Start address 0x48c, load size 26232
-Transfer rate: 12808 KB/sec, 2914 bytes/write.
-During symbol reading, unexpected overlap between:
- (A) section `.text' from `~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky.elf' [0x0, 0x5c84)
- (B) section `*COM*' from `~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky.elf' [0x0, 0x0).
-Will ignore section B.
-
-*** Resetting target ***
-Resetting target
-
-*** Halting target ***
-</code></pre>
-</li>
-<li>
-<p>Type 'c' to continue. The LED on the board will start to blink. You will also see some activity in the terminal showing the open J-Link GDB server connection. The LED will continue to blink after you quit out of that connection.</p>
-<pre><code>(gdb) c
-Continuing.
-</code></pre>
-</li>
-</ul></div>
-            
-        </div>
-
-        <footer class="col-md-12">
-            <hr>
-            
-            <p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</p>
-        </footer>
-
-        <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>var base_url = '../..';</script>
-        <script data-main="../../mkdocs/js/search.js" src="../../mkdocs/js/require.js"></script>
-        <script src="../../js/base.js"></script>
-
-        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
-            <div class="modal-dialog">
-                <div class="modal-content">
-                    <div class="modal-header">
-                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-                        <h4 class="modal-title" id="exampleModalLabel">Search</h4>
-                    </div>
-                    <div class="modal-body">
-                        <p>
-                            From here you can search these documents. Enter
-                            your search terms below.
-                        </p>
-                        <form role="form">
-                            <div class="form-group">
-                                <input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query">
-                            </div>
-                        </form>
-                        <div id="mkdocs-search-results"></div>
-                    </div>
-                    <div class="modal-footer">
-                    </div>
-                </div>
-            </div>
-        </div>
-
-    </body>
-</html>