blob: d220f784b325d624121b60cb83477aef3dfc7597 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- This is broken by doc revisioning.
-->
<link rel="shortcut icon" href="../../../img/favicon.ico">
<title>Blinky windows - Apache Mynewt</title>
<link href="../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
<link rel="stylesheet" href="../../../css/highlight.css">
<link href="../../../css/base.css" rel="stylesheet">
<link href="../../../css/custom.css" rel="stylesheet">
<link href="../../../css/v2.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script>
(function(i, s, o, g, r, a, m) {
i["GoogleAnalyticsObject"] = r;
(i[r] =
i[r] ||
function() {
(i[r].q = i[r].q || []).push(arguments);
}),
(i[r].l = 1 * new Date());
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m);
})(window, document, "script", "//www.google-analytics.com/analytics.js", "ga");
ga("create", "UA-72162311-1", "auto");
ga("send", "pageview");
</script>
</head>
<body class="Blinky windows">
<div class="container">
<div class="row v2-main-banner">
<a class="logo-cell" href="/">
<img class="logo" src="/img/logo.png">
</a>
<div class="tagline-cell">
<h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4>
</div>
<div class="news-cell">
<div class="well">
<h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.11.0, Apache NimBLE 1.6.0 </a> released (September 7, 2023)
</div>
</div>
</div>
</div>
<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav navbar-right">
<li
class=""
>
<a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a>
</li>
<li
class="important"
>
<a href="/quick-start/">Quick Start</a>
</li>
<li
class=""
>
<a href="/about/">About</a>
</li>
<li
class=""
>
<a href="/talks/">Talks</a>
</li>
<li
class="active"
>
<a href="/documentation/">Documentation</a>
</li>
<li
class=""
>
<a href="/download/">Download</a>
</li>
<li
class=""
>
<a href="/community/">Community</a>
</li>
<li
class=""
>
<a href="/events/">Events</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary">
<div class="top">
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search documentation" />
</div>
</form>
</div>
</div>
<ul class="toc-nav">
<li class="doc-version"><select class="form-control" onchange="if (this.value) window.location.href=this.value">
<option value="/latest">
Version: master
</option>
<option value="/v1_11_0/" >
Version: 1.11.0
</option>
<option value="/v1_10_0/" >
Version: 1.10.0
</option>
<option value="/v1_9_0/" >
Version: 1.9.0
</option>
<option value="/v1_8_0/" >
Version: 1.8.0
</option>
<option value="/v1_7_0/" >
Version: 1.7.0
</option>
<option value="/v1_6_0/" >
Version: 1.6.0
</option>
<option value="/v1_5_0/" >
Version: 1.5.0
</option>
<option value="/v1_4_0/" >
Version: 1.4.0
</option>
<option value="/v1_3_0/os/introduction" >
Version: 1.3.0
</option>
<option value="/v1_2_0/os/introduction" >
Version: 1.2.0
</option>
<option value="/v1_1_0/os/introduction" >
Version: 1.1.0
</option>
<option value="/v1_0_0/os/introduction" selected="selected" >
Version: 1.0.0
</option>
<option value="/v0_9_0/os/introduction" >
Version: 0.9.0
</option>
</select></li>
<li ><a href="../../introduction/">Mynewt Documentation</a>
</li>
<li><a href="
../../../faq/go_env/
">Appendix</a>
</li>
</ul>
</div></div>
<div class="col-md-9" role="main">
<div class="doc-header">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="/documentation/">Docs</a></li>
<li>&raquo; Blinky windows</li>
</ul>
</div>
</div>
<div class="alert alert-warning">
<p>
Version 1.0.0 is not the most recent version of the Apache Mynewt
documentation. Click <a href="/latest">here</a> to read the latest
version.
</p>
</div>
<h2 id="project-blinky-on-a-windows-machine">Project Blinky on a Windows Machine</h2>
<h3 id="getting-your-windows-machine-ready-for-simulated-target">Getting your Windows machine ready for simulated target</h3>
<p>The <code>newt</code> tool is the build software used to build Mynewt OS images or executables for any embedded hardware device/board, including the one for the current tutorial (STM32-E407 development board from Olimex). You can run the <code>newt</code> tool natively on a computer running any of the three Operating System machines - OSX, Linux, or Windows.</p>
<p>However, Mynewt OS images for a simulated target are built on the Windows machine by using Linux versions of the build software (newt)in a virtual machine on your Windows box. The Linux VM is set up by installing the Docker Toolbox. Your Windows machine will communicate with the Linux VM via transient ssh connections. You will then download a Docker image (<code>newtvm.exe</code>)that allows you to run the newt commands in the Linux Docker instance. The Docker image contains:</p>
<ul>
<li>The newt command-line tool</li>
<li>Go</li>
<li>A multilib-capable native gcc / glibc</li>
<li>An arm-none-eabi gcc</li>
<li>Native gdb</li>
</ul>
<p>The sequence of events when using the Docker image is as follows:</p>
<ol>
<li>A new docker environment is created in the Linux VM.</li>
<li>The specified command with the newtvm prefix (<code>newtvm newt</code> command) is sent to the docker environment via ssh.</li>
<li>The Linux command runs.</li>
<li>The output from the command is sent back to Windows via ssh.</li>
<li>The output is displayed in the Windows command prompt.</li>
</ol>
<h4 id="install-linux-virtual-machine">Install Linux virtual machine</h4>
<ul>
<li>
<p>Download the Docker Toolbox for Windows (version 1.9.0c or later) from <a href="https://www.docker.com/docker-toolbox">https://www.docker.com/docker-toolbox</a>. The Docker toolbox creates a consistently reproducible and self-contained environment in Linux.</p>
</li>
<li>
<p>Run the Docker Toolbox installer. All the default settings are OK.</p>
</li>
<li>
<p>You may need to add "C:\Program Files\Git\usr\bin" to your PATH
environment variable. To add to the PATH environment variable, right-click on the Start button in the bottom left corner. Choose System -&gt; Advanced system settings -&gt; Environment Variables. Click on the PATH variable under "System variables" and click Edit to check and add it if it is not already there. </p>
</li>
</ul>
<h4 id="install-newtvm-tool">Install newtvm tool</h4>
<ul>
<li>From your base user (home) directory, pull or clone the latest code from the newt repository into the <code>newt</code> directory. It includes the executable <code>newtvm.exe</code> for the newtvm tool in the <code>newtvm</code> directory.</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">C</span>:<span style="color: #000000">\Users\admin&gt;</span> <span style="color: #000000">git</span> <span style="color: #000000">clone</span> <span style="color: #000000">https:</span><span style="color: #177500">//git-wip-us.apache.org/repos/asf/incubator-mynewt-newt newt</span>
</code></pre></div>
<p>The newtvm tool is what allows you to run programs in the Linux docker
instance. </p>
<ul>
<li>Run the Docker Quickstart Terminal application inside the Docker folder under Programs. You can find it by clicking Start button -&gt; All apps. By default, the Docker Toolbox installer creates a shortcut to this program on your desktop. Wait until you see an ASCII art whale displayed in the terminal window and the Docker prompt given. </li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #633820">## .</span>
<span style="color: #633820">## ## ## ==</span>
<span style="color: #633820">## ## ## ## ## ===</span>
<span style="color: #000000">/</span><span style="color: #C41A16">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;\___/ ===</span>
<span style="color: #000000">~~~</span> {<span style="color: #000000">~~</span> <span style="color: #000000">~~~~</span> <span style="color: #000000">~~~</span> <span style="color: #000000">~~~~</span> <span style="color: #000000">~~~</span> <span style="color: #000000">~</span> <span style="color: #000000">/</span> <span style="color: #000000">===-</span> <span style="color: #000000">~~~</span>
<span style="color: #000000">\______</span> <span style="color: #000000">o</span> <span style="color: #000000">__/</span>
<span style="color: #000000">\</span> <span style="color: #000000">\</span> <span style="color: #000000">__/</span>
<span style="color: #000000">\____\_______/</span>
<span style="color: #000000">docker</span> <span style="color: #000000">is</span> <span style="color: #000000">configured</span> <span style="color: #000000">to</span> <span style="color: #000000">use</span> <span style="color: #000000">the</span> <span style="color: #A90D91">default</span> <span style="color: #000000">machine</span> <span style="color: #000000">with</span> <span style="color: #000000">IP</span> <span style="color: #1C01CE">192.168.99.100</span>
<span style="color: #000000">For</span> <span style="color: #000000">help</span> <span style="color: #000000">getting</span> <span style="color: #000000">started</span>, <span style="color: #000000">check</span> <span style="color: #000000">out</span> <span style="color: #000000">the</span> <span style="color: #000000">docs</span> <span style="color: #000000">at</span> <span style="color: #000000">https:</span><span style="color: #177500">//docs.docker.com</span>
<span style="color: #000000">admin@dev1</span> <span style="color: #000000">MINGW64</span> <span style="color: #000000">~</span> (<span style="color: #000000">master</span>)
<span style="color: #000000">$</span>
</code></pre></div>
<p>The first time you run this, it may take several minutes to complete. You will need to run the Docker Quickstart Terminal once each time you
restart your computer.</p>
<ul>
<li>Open a command prompt (e.g., Windows-R, "cmd", enter). You execute the newt tool commands as though you were running newt in Linux, but you prefix each command with "newtvm". For example:</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">C</span>:<span style="color: #000000">\Users\admin\newt\newtvm&gt;</span> <span style="color: #000000">newtvm</span> <span style="color: #000000">newt</span> <span style="color: #000000">help</span>
</code></pre></div>
<p>The newtvm tool will take a long time to run the first time you execute
it. The delay is due to the fact that the tool must download the mynewt
docker instance.</p>
<ul>
<li>You are now ready to proceed to <a href="#building-test-code-on-simulator">building the image for the simulated target</a>.</li>
</ul>
<h3 id="getting-your-windows-machine-ready-for-hardware-target">Getting your Windows machine ready for hardware target</h3>
<p>When you want to produce images for actual hardware board on your Windows machine, go through the following setup procedure and then proceed to the <a href="#Using-SRAM-to-make-LED-blink">blinky project on the Olimex board</a> with this method.</p>
<h4 id="installing-some-prerequisites">Installing some prerequisites</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">Creating local repository</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>
</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">$</span> <span style="color: #000000">cd</span> <span style="color: #000000">c:</span>\
<span style="color: #000000">$</span> <span style="color: #000000">mkdir</span> <span style="color: #000000">dev\go</span>
<span style="color: #000000">$</span> <span style="color: #000000">cd</span> <span style="color: #000000">dev\go</span>
</code></pre></div>
<ul>
<li>Set the following user environment variables using the steps outlined here.</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">*</span> <span style="color: #000000">GOPATH:</span> <span style="color: #000000">C:\dev\go</span>
<span style="color: #000000">*</span> <span style="color: #000000">PATH:</span> <span style="color: #000000">C:\Program</span> <span style="color: #000000">Files</span> (<span style="color: #000000">x86</span>)<span style="color: #000000">\GNU</span> <span style="color: #000000">Tools</span> <span style="color: #000000">ARM</span> <span style="color: #000000">Embedded\</span><span style="color: #1C01CE">4.9</span> <span style="color: #1C01CE">2015</span><span style="color: #000000">q3\bin</span>;<span style="color: #000000">%GOPATH%\bin</span>;<span style="color: #000000">C:\win-builds-x86_64\bin</span>;<span style="color: #000000">C:\win-builds-i686\bin</span>;<span style="color: #000000">C:\msys\bin</span>
</code></pre></div>
<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>
<ul>
<li>Next, install godep. Note that the following command produces no output.</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">$</span> <span style="color: #000000">go</span> <span style="color: #000000">get</span> <span style="color: #000000">github</span>.<span style="color: #000000">com/tools/godep</span>
</code></pre></div>
<ul>
<li>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.</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">$</span> <span style="color: #000000">go</span> <span style="color: #000000">get</span> <span style="color: #000000">git-wip-us</span>.<span style="color: #000000">apache</span>.<span style="color: #000000">org/repos/asf/incubator-mynewt-newt</span>.<span style="color: #000000">git/newt</span>
<span style="color: #000000">$</span> <span style="color: #000000">dir</span>
<span style="color: #000000">bin</span> <span style="color: #000000">pkg</span> <span style="color: #000000">src</span>
<span style="color: #000000">$</span> <span style="color: #000000">dir</span> <span style="color: #000000">src</span>
<span style="color: #000000">git-wip-us</span>.<span style="color: #000000">apache</span>.<span style="color: #000000">org</span> <span style="color: #000000">github</span>.<span style="color: #000000">com</span> <span style="color: #000000">gopkg</span>.<span style="color: #000000">in</span>
<span style="color: #000000">$</span> <span style="color: #000000">dir</span>
<span style="color: #000000">newt</span>
<span style="color: #000000">$</span> <span style="color: #000000">cd</span> <span style="color: #000000">newt</span>
<span style="color: #000000">$</span> <span style="color: #000000">dir</span>
<span style="color: #000000">Godeps</span> <span style="color: #000000">README</span>.<span style="color: #000000">md</span> <span style="color: #000000">coding_style</span>.<span style="color: #000000">txt</span> <span style="color: #000000">newt</span>.<span style="color: #000000">go</span>
<span style="color: #000000">LICENSE</span> <span style="color: #000000">cli</span> <span style="color: #000000">design</span>.<span style="color: #000000">txt</span>
</code></pre></div>
<ul>
<li>Check that newt is in place.</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">$</span> <span style="color: #000000">dir</span> <span style="color: #000000">$GOPATH\src\git-wip-us</span>.<span style="color: #000000">apache</span>.<span style="color: #000000">org\repos\asf\incubator-mynewt-newt</span>.<span style="color: #000000">git\newt</span>
<span style="color: #000000">Godeps</span> <span style="color: #000000">README</span>.<span style="color: #000000">md</span> <span style="color: #000000">coding_style</span>.<span style="color: #000000">txt</span> <span style="color: #000000">newt</span>.<span style="color: #000000">go</span>
<span style="color: #000000">LICENSE</span> <span style="color: #000000">cli</span> <span style="color: #000000">design</span>.<span style="color: #000000">txt</span>
</code></pre></div>
<h4 id="building-the-newt-tool">Building the newt tool</h4>
<ul>
<li>You will use Go to run the newt.go program to build the newt tool. The command used is <code>go install</code> which compiles and writes the resulting executable to an output file named <code>newt</code>. It installs the results along with its dependencies in $GOPATH/bin.</li>
</ul>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">$</span> <span style="color: #000000">go</span> <span style="color: #000000">install</span>
<span style="color: #000000">$</span> <span style="color: #000000">ls</span> <span style="color: #C41A16">&quot;$GOPATH&quot;</span><span style="color: #000000">/bin/</span>
<span style="color: #000000">godep</span> <span style="color: #000000">incubator-mynewt-newt</span>.<span style="color: #000000">git</span> <span style="color: #000000">newt</span>
</code></pre></div>
<ul>
<li>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 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>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%;"><span></span><code> <span style="color: #000000">$</span> <span style="color: #000000">newt</span> <span style="color: #000000">version</span>
<span style="color: #000000">Newt</span> <span style="color: #000000">version:</span> <span style="color: #1C01CE">1.0</span>
<span style="color: #000000">$</span> <span style="color: #000000">newt</span> <span style="color: #000000">-h</span>
<span style="color: #000000">Newt</span> <span style="color: #000000">allows</span> <span style="color: #000000">you</span> <span style="color: #000000">to</span> <span style="color: #000000">create</span> <span style="color: #000000">your</span> <span style="color: #000000">own</span> <span style="color: #000000">embedded</span> <span style="color: #000000">project</span> <span style="color: #000000">based</span> <span style="color: #000000">on</span> <span style="color: #000000">the</span> <span style="color: #000000">Mynewt</span>
<span style="color: #000000">operating</span> <span style="color: #000000">system</span>. <span style="color: #000000">Newt</span> <span style="color: #000000">provides</span> <span style="color: #000000">both</span> <span style="color: #000000">build</span> <span style="color: #000000">and</span> <span style="color: #000000">package</span> <span style="color: #000000">management</span> <span style="color: #000000">in</span> <span style="color: #000000">a</span>
<span style="color: #000000">single</span> <span style="color: #000000">tool</span>, <span style="color: #000000">which</span> <span style="color: #000000">allows</span> <span style="color: #000000">you</span> <span style="color: #000000">to</span> <span style="color: #000000">compose</span> <span style="color: #000000">an</span> <span style="color: #000000">embedded</span> <span style="color: #000000">workspace</span>, <span style="color: #000000">and</span> <span style="color: #000000">set</span>
<span style="color: #000000">of</span> <span style="color: #000000">projects</span>, <span style="color: #000000">and</span> <span style="color: #000000">then</span> <span style="color: #000000">build</span> <span style="color: #000000">the</span> <span style="color: #000000">necessary</span> <span style="color: #000000">artifacts</span> <span style="color: #000000">from</span> <span style="color: #000000">those</span> <span style="color: #000000">projects</span>.
<span style="color: #000000">For</span> <span style="color: #000000">more</span> <span style="color: #000000">information</span> <span style="color: #000000">on</span> <span style="color: #000000">the</span> <span style="color: #000000">Mynewt</span> <span style="color: #000000">operating</span> <span style="color: #000000">system</span>, <span style="color: #000000">please</span> <span style="color: #000000">visit</span>
<span style="color: #000000">https</span>:<span style="color: #177500">//www.github.com/mynewt/documentation.</span>
<span style="color: #000000">Please</span> <span style="color: #000000">use</span> <span style="color: #000000">the</span> <span style="color: #000000">newt</span> <span style="color: #000000">help</span> <span style="color: #000000">command</span>, <span style="color: #000000">and</span> <span style="color: #000000">specify</span> <span style="color: #000000">the</span> <span style="color: #000000">name</span> <span style="color: #000000">of</span> <span style="color: #000000">the</span> <span style="color: #000000">command</span>
<span style="color: #000000">you</span> <span style="color: #000000">want</span> <span style="color: #000000">help</span> <span style="color: #A90D91">for</span>, <span style="color: #A90D91">for</span> <span style="color: #000000">help</span> <span style="color: #000000">on</span> <span style="color: #000000">how</span> <span style="color: #000000">to</span> <span style="color: #000000">use</span> <span style="color: #000000">a</span> <span style="color: #000000">specific</span> <span style="color: #000000">command</span>
<span style="color: #000000">Usage</span>:
<span style="color: #000000">newt</span> [<span style="color: #000000">flags</span>]
<span style="color: #000000">newt</span> [<span style="color: #000000">command</span>]
<span style="color: #000000">Examples</span>:
<span style="color: #000000">newt</span>
<span style="color: #000000">newt</span> <span style="color: #000000">help</span> [<span style="color: #000000">&lt;command-name&gt;</span>]
<span style="color: #000000">For</span> <span style="color: #000000">help</span> <span style="color: #000000">on</span> <span style="color: #000000">&lt;command-name&gt;</span>. <span style="color: #000000">If</span> <span style="color: #000000">not</span> <span style="color: #000000">specified</span>, <span style="color: #000000">print</span> <span style="color: #000000">this</span> <span style="color: #000000">message</span>.
<span style="color: #000000">Available</span> <span style="color: #000000">Commands:</span>
<span style="color: #000000">version</span> <span style="color: #000000">Display</span> <span style="color: #000000">the</span> <span style="color: #000000">Newt</span> <span style="color: #000000">version</span> <span style="color: #000000">number</span>.
<span style="color: #000000">target</span> <span style="color: #000000">Set</span> <span style="color: #000000">and</span> <span style="color: #000000">view</span> <span style="color: #000000">target</span> <span style="color: #000000">information</span>
<span style="color: #000000">egg</span> <span style="color: #000000">Commands</span> <span style="color: #000000">to</span> <span style="color: #000000">list</span> <span style="color: #000000">and</span> <span style="color: #000000">inspect</span> <span style="color: #000000">eggs</span> <span style="color: #000000">on</span> <span style="color: #000000">a</span> <span style="color: #000000">nest</span>
<span style="color: #000000">nest</span> <span style="color: #000000">Commands</span> <span style="color: #000000">to</span> <span style="color: #000000">manage</span> <span style="color: #000000">nests</span> <span style="color: #000000">&amp;</span> <span style="color: #000000">clutches</span> (<span style="color: #000000">remote</span> <span style="color: #000000">egg</span> <span style="color: #000000">repositories</span>)
<span style="color: #000000">help</span> <span style="color: #000000">Help</span> <span style="color: #000000">about</span> <span style="color: #000000">any</span> <span style="color: #000000">command</span>
<span style="color: #000000">Flags</span>:
<span style="color: #000000">-h</span>, <span style="color: #000000">--help=</span><span style="color: #A90D91">false</span><span style="color: #000000">:</span> <span style="color: #000000">help</span> <span style="color: #A90D91">for</span> <span style="color: #000000">newt</span>
<span style="color: #000000">-l</span>, <span style="color: #000000">--loglevel=</span><span style="color: #C41A16">&quot;WARN&quot;</span><span style="color: #000000">:</span> <span style="color: #000000">Log</span> <span style="color: #000000">level</span>, <span style="color: #000000">defaults</span> <span style="color: #000000">to</span> <span style="color: #000000">WARN</span>.
<span style="color: #000000">-q</span>, <span style="color: #000000">--quiet=</span><span style="color: #A90D91">false</span><span style="color: #000000">:</span> <span style="color: #000000">Be</span> <span style="color: #000000">quiet</span>; <span style="color: #000000">only</span> <span style="color: #000000">display</span> <span style="color: #000000">error</span> <span style="color: #000000">output</span>.
<span style="color: #000000">-s</span>, <span style="color: #000000">--silent=</span><span style="color: #A90D91">false</span><span style="color: #000000">:</span> <span style="color: #000000">Be</span> <span style="color: #000000">silent</span>; <span style="color: #000000">don&#39;t</span> <span style="color: #000000">output</span> <span style="color: #000000">anything</span>.
<span style="color: #000000">-v</span>, <span style="color: #000000">--verbose=</span><span style="color: #A90D91">false</span><span style="color: #000000">:</span> <span style="color: #000000">Enable</span> <span style="color: #000000">verbose</span> <span style="color: #000000">output</span> <span style="color: #000000">when</span> <span style="color: #000000">executing</span> <span style="color: #000000">commands</span>.
<span style="color: #000000">Use</span> <span style="color: #C41A16">&quot;newt help [command]&quot;</span> <span style="color: #A90D91">for</span> <span style="color: #000000">more</span> <span style="color: #000000">information</span> <span style="color: #000000">about</span> <span style="color: #000000">a</span> <span style="color: #000000">command</span>.
</code></pre></div>
<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</h4>
<ul>
<li>Use Zadig to configure the USB driver for your Olimex debugger. If your debugger is already set up, you can skip this step.</li>
</ul>
<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>
<ul>
<li>Proceed to the section on how to <a href="#using-sram-to-make-led-blink">make an LED blink</a> section.</li>
</ul>
<div class="row">
<ul class="nav nav-pills" style="margin-bottom: 10px">
<li>
</li>
<li class="pull-right">
</li>
</ul>
</div>
<footer class="row">
<div class="col-xs-12">
<p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p>
</div>
<div class="col-xs-12">
<div class="logos">
<a href="https://www.apache.org/">
<img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
</a>
<p>
Copyright © 2015-2021 The Apache Software Foundation.<br>
<small class="footnote">
Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt
project logo are either registered trademarks or trademarks of the Apache
Software Foundation in the United States and other countries.
</small>
</p>
<a href="">
<img src="https://www.countit.com/images/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
</div>
</div>
<a href="https://www.apache.org/licenses/">
<button class="button-footer-asf">
License
</button>
</a>
<a href="https://www.apache.org/foundation/sponsorship.html">
<button class="button-footer-asf">
Sponsorship
</button>
</a>
<a href="https://www.apache.org/foundation/thanks.html">
<button class="button-footer-asf">
Thanks
</button>
</a>
<a href="https://www.apache.org/security/">
<button class="button-footer-asf">
Security
</button>
</a>
<a href="https://apache.org/events/current-event">
<button class="button-footer-asf">
ASF Events
</button>
</a>
</footer>
</div>
</div>
</div>
<script src="../../../js/jquery-1.10.2.min.js"></script>
<script src="../../../js/bootstrap-3.0.3.min.js"></script>
<script src="../../../js/highlight.pack.js"></script>
<script src="../../../js/base.js"></script>
<script src="../../../js/custom.js"></script>
<script src="search/main.js"></script>
</body>
</html>