You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/03/16 01:03:20 UTC
[1/3] incubator-mynewt-site git commit: updated newt getting started
docs
Repository: incubator-mynewt-site
Updated Branches:
refs/heads/asf-site 73c64006f -> 7d62ab1bc
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/get_started/cross_tools/index.html
----------------------------------------------------------------------
diff --git a/os/get_started/cross_tools/index.html b/os/get_started/cross_tools/index.html
index fce0568..fee4893 100644
--- a/os/get_started/cross_tools/index.html
+++ b/os/get_started/cross_tools/index.html
@@ -238,16 +238,6 @@
-
-
-
- <li>
- <a href="../project1/">Blinky, The First Hardware in Simulation</a>
- </li>
-
-
-
-
</ul>
</li>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/get_started/introduction/index.html
----------------------------------------------------------------------
diff --git a/os/get_started/introduction/index.html b/os/get_started/introduction/index.html
index 550dd7b..0f622a2 100644
--- a/os/get_started/introduction/index.html
+++ b/os/get_started/introduction/index.html
@@ -398,9 +398,9 @@ makes the operating system requirements for them unique: </p>
battery power and maximize power usage.</p>
</li>
</ul>
-<p>As more and more devices get connected, these interconnected devies perform complex tasks. To
+<p>As more and more devices get connected, these interconnected devices perform complex tasks. To
perform these tasks, you need low-level operational functionality built into the operating system.
-Typically, connected devices built with these microcontrollers perform a myriad of low-level tasks: </p>
+Typically, connected devices built with these microcontrollers perform a myriad of functions: </p>
<ul>
<li>
<p>Networking Stacks: Bluetooth Low Energy and Thread</p>
@@ -436,39 +436,128 @@ package management and build system tool, called <em>newt</em>. </p>
<p>You can install and build <em>newt</em> for <a href="http://mynewt.apache.org/newt/newt_linux/">Linux</a> or <a href="http://mynewt.apache.org/newt/newt_mac/">Mac</a>. </p>
<h3 id="build-your-first-mynewt-app-with-newt">Build your first Mynewt App with Newt<a class="headerlink" href="#build-your-first-mynewt-app-with-newt" title="Permanent link">¶</a></h3>
<p>Before you start your first Mynewt application, you must first create a new Mynewt
-application with the <em>newt</em> tool: </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt new my_app
-Downloading application skeleton from https://git-wip-us.apache.org/repos/asf/incubator-mynewt-tadpole.git... ok!
-Application my_app successfully created in /Users/mynewt/dev/my_app
+project with the <em>newt</em> tool: </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt new my_project
+Downloading project skeleton from apache/incubator-mynewt-blinky...
+Installing skeleton in my_app...
+Project my_app successfully created.
+</pre></div>
+
+
+<p>Newt populates this new project with a base skeleton of a new Apache Mynewt
+project. It has the following structure:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span><span style="color: #A90D91">cd </span>my_project
+<span style="color: #000000">$ </span>tree -L 3
+.
+├── DISCLAIMER
+├── LICENSE
+├── NOTICE
+├── README.md
+├── apps
+│ └── blinky
+│ ├── pkg.yml
+│ └── src
+├── project.yml
+└── targets
+ ├── my_blinky_sim
+ │ ├── pkg.yml
+ │ └── target.yml
+ └── unittest
+ ├── pkg.yml
+ └── target.yml
+
+<span style="color: #1C01CE">6</span> directories, <span style="color: #1C01CE">10</span> files
<span style="color: #000000">$ </span>
</pre></div>
-<p>This new application contains the core of the operating system and the hardware abstraction layer, which all fits into less than 5KB of compiled code size.</p>
-<p>Once the application is created, you can then install the packages you need, as Mynewt will automatically download them, along with their dependencies into your application.</p>
-<p>For example, let's install a file system into the "my_app" application.</p>
-<p>First, we'll search for file system packages: </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$</span> <span style="color: #000000">newt</span> <span style="color: #000000">pkg</span> <span style="color: #000000">search</span> <span style="color: #000000">fs</span>
-<span style="color: #000000">Package</span> <span style="color: #000000">list</span> <span style="color: #000000">larva</span> <span style="color: #000000">has</span> <span style="color: #000000">package</span> <span style="color: #000000">fs/nffs</span><span style="color: #1C01CE">@0.8.0</span>
-<span style="color: #000000">Package</span> <span style="color: #000000">list</span> <span style="color: #000000">larva</span> <span style="color: #000000">has</span> <span style="color: #000000">package</span> <span style="color: #000000">fs/fs</span><span style="color: #1C01CE">@0.0.0</span>
-<span style="color: #000000">Package</span> <span style="color: #000000">list</span> <span style="color: #000000">larva</span> <span style="color: #000000">has</span> <span style="color: #000000">package</span> <span style="color: #000000">project/ffs2native</span><span style="color: #1C01CE">@0.0.0</span>
+<p>Once you've switched into your new project's directory, the next step is to fetch
+any dependencies this project has. By default, all Newt projects rely on a single
+remote repository, apache-mynewt-core. Newt install will fetch this locally:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt install
+apache-mynewt-core
+<span style="color: #000000">$</span>
+</pre></div>
+
+
+<p><em>NOTE:</em> <code>apache-mynewt-core</code> may take a while to download, to see progress, use
+the <code>-v</code> (verbose) option to install. </p>
+<p>Once <code>newt install</code> has successfully finished, the contents of <code>apache-mynewt-core</code>
+will have been downloaded into your local directory. You can view them by issuing the
+following commands in the base directory of the new project:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span><span style="color: #A90D91">cd </span>repos/apache-mynewt-core
+<span style="color: #000000">$ </span>tree -L2
+.
+<snip>
+├── fs
+│ ├── fs
+│ └── nffs
+├── hw
+│ ├── bsp
+│ ├── hal
+│ └── mcu
+├── libs
+│ ├── baselibc
+│ ├── bootutil
+│ ├── cmsis-core
+│ ├── console
+│ ├── elua
+│ ├── flash_test
+│ ├── imgmgr
+│ ├── json
+│ ├── mbedtls
+│ ├── newtmgr
+│ ├── os
+│ ├── shell
+│ ├── testreport
+│ ├── testutil
+│ └── util
+├── net
+│ └── nimble
+<snip>
</pre></div>
-<p>Once found, you can install the nffs package (Newtron Flash File System) with <em>newt</em>:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt pkg install fs/nffs
-Downloading larva from https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/master... ok!
-Installing fs/nffs
-Installing fs/fs
-Installation was a success!
+<p>As you can see, the core of the Apache Mynewt operating system has been brought
+into your local directory! </p>
+<p>New projects created with Newt, come with by default an example application
+(<code>apps/blinky</code>) and an example target (<code>my_blinky_sim</code>) which allows you to
+build that application for the simulated platform. </p>
+<p>With your new project, all you need to build and run your new application is to
+issue the following commands: </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt build my_blinky_sim
+Compiling base64.c
+Compiling cbmem.c
+Compiling datetime.c
+Compiling tpq.c
+Archiving util.a
+Compiling main.c
+Archiving blinky.a
+Compiling flash_map.c
+Compiling hal_flash.c
+Archiving hal.a
+Compiling cons_fmt.c
+Compiling cons_tty.c
+<snip>
+Linking blinky.elf
+App successfully built: /Users/sterling/dev/tmp/my_app/bin/my_blinky_sim/apps/blinky/blinky.elf
+<span style="color: #000000">$ </span>newt run my_blinky_sim
+<span style="color: #000000">(</span>runs target my_blinky_sim on the simulator<span style="color: #000000">)</span>
</pre></div>
-<p>At this point you have your first Mynewt application. And it's that simple!</p>
-<p>Mynewt contains all the packages and reusable software components you need to develop a device using a 32-bit
-Microcontroller. And by providing a robust package management and build system, to help you build building blocks, Mynewt allows you to scale from 5KB of code size to MBs of compiled code size.</p>
-<p>Next, try doing your first project using <em>newt.</em> In the next section, <a href="http://mynewt.apache.org/os/get_started/project1/">Get Started</a>, we guide you how get a LED on a target board blink. </p>
-<p>So get on with it!</p>
+<p>At this point you have your first Mynewt application!</p>
+<p>Apache Mynewt has a lot more functionality than just running simulated applications. It provides all
+the features you'll need to cross-compile your application, run it on real hardware and develop a
+full featured application.</p>
+<p>If you're interested in learning more, a good next step is to choose a project to
+<a href="http://mynewt.apache.org/os/get_started/project1/">Get Started</a> with, and begin to familiarize
+yourself with operating within the newt environment. These projects will get your toolchain installed,
+and get you blinking an LED with the Apache Mynewt OS.</p>
+<p>After you've tried a few getting started projects, there are plenty of tutorials that will help
+expose you to much of the functionality provided by the Apache Mynewt Core Operating System. There is
+also full reference documentation for all of the Core Apache Mynewt APIs.</p>
+<p>Happy Hacking!</p>
<div class="row">
<footer>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/get_started/native_tools/index.html
----------------------------------------------------------------------
diff --git a/os/get_started/native_tools/index.html b/os/get_started/native_tools/index.html
index 9f9c047..69e11f5 100644
--- a/os/get_started/native_tools/index.html
+++ b/os/get_started/native_tools/index.html
@@ -238,16 +238,6 @@
-
-
-
- <li>
- <a href="../project1/">Blinky, The First Hardware in Simulation</a>
- </li>
-
-
-
-
</ul>
</li>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/get_started/project1/index.html
----------------------------------------------------------------------
diff --git a/os/get_started/project1/index.html b/os/get_started/project1/index.html
deleted file mode 100644
index bcb49f5..0000000
--- a/os/get_started/project1/index.html
+++ /dev/null
@@ -1,587 +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.apache.org/os/get_started/project1/">
- <link rel="shortcut icon" href="../../../img/favicon.ico">
-
- <title>Blinky, The First Hardware in Simulation - Apache Mynewt</title>
-
- <link href="../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
- <link href="../../../css/font-awesome-4.0.3.css" rel="stylesheet">
- <link rel="stylesheet" href="../../../css/highlight.css">
- <link href="../../../css/base.css" rel="stylesheet">
- <link href="../../../css/custom.css" rel="stylesheet">
- <link href='https://fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100' rel='stylesheet' type='text/css'>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
- <link href="../../../extra.css" rel="stylesheet">
-
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
- <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
- <![endif]-->
-
-
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-
- ga('create', 'UA-72162311-1', 'mynewt.incubator.apache.org');
- ga('send', 'pageview');
- </script>
-
- </head>
-
-
- <body class="Blinky, The First Hardware in Simulation">
-
-
- <div id="navbar" class="navbar navbar-default navbar-fixed-top" role="navigation">
- <div class="logo-container">
- <img src="/img/logo.svg">
- </div>
- <div class="container-fluid">
- <!-- Collapsed navigation -->
- <div class="navbar-header">
- <!-- Expander button -->
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
-
- </div>
-
- <!-- Expanded navigation -->
- <div class="navbar-collapse collapse">
- <!-- Main navigation -->
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="/">Home</a>
- </li>
- <li>
- <a href="/about/">About</a>
- </li>
- <li class="dropdown">
- <a href="/documentation/" class="dropdown-toggle" data-toggle="dropdown">Docs <b class="caret"></b></a>
- <ul class="dropdown-menu">
-
-
-
-
-
-
- <li >
- <a href="../../../documentation/">
- Overview
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="active">
- <a href="../introduction/">
- Mynewt OS Manual
- </a>
- </li>
-
-
-
- <li >
- <a href="../../../newt/newt_intro/">
- Newt Tool Manual
- </a>
- </li>
-
-
-
- <li >
- <a href="../../../newtmgr/overview/">
- Newt Manager Manual
- </a>
- </li>
-
-
-
- <li >
- <a href="../../../faq/answers/">
- Appendix
- </a>
- </li>
-
-
- </ul>
- </li>
- <li>
- <a href="/download/">Download</a>
- </li>
- <li>
- <a href="/community/">Community</a>
- </li>
- <li>
- <a href="/events/">Events</a>
- </li>
- </ul>
-
- <!-- Search, Navigation and Repo links -->
- <ul class="nav navbar-nav navbar-right">
-
- </ul>
- </div>
- </div>
-</div>
-
-
-
- <div class="container-fluid">
-
- <div class="row sm-extra-padding">
- <div id="docSidebar" class="col-md-3 bg-grey sidebar-container"><div class="bs-sidebar hidden-print" role="complementary">
- <div class="sidebar-top">
- <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" alt="MyNewt" title="MyNewt">
- <div class="small" role="search">
- <form id ="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
- <div class="form-group">
- <input type="text" name="q" placeholder="Search documentation" />
- <button class="search-button" type="submit"><i class="fa fa-search"></i></button>
- </div>
- </form>
- </div>
- </div>
- <ul class="nav bs-sidenav">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li><a href="
- ../introduction/
-">Mynewt OS Manual</a>
-
-
- <ul class="current-toc">
-
-
-
-
- <li>
- <a href="../introduction/">Introduction</a>
- </li>
-
-
-
-
-
-
-
-
- <li><a href="
- ../native_tools/
-">Get Started</a>
-
-
- <ul class="current-toc">
-
-
-
-
- <li>
- <a href="../native_tools/">Installing Native Tools</a>
- </li>
-
-
-
-
-
-
-
- <li>
- <a href="../project_create/">Creating Your First Project</a>
- </li>
-
-
-
-
-
-
-
- <li>
- <a href="../cross_tools/">Installing Cross Tools for ARM</a>
- </li>
-
-
-
-
-
-
-
- <li class="active">
- Blinky, The First Hardware in Simulation
- </li>
-
-
-
-
- </ul>
-
- </li>
-
-
-
-
-
-
-
- <li ><a href="../vocabulary/">Concepts</a></li>
-
-
- </li>
-
-
-
-
-
-
-
- <li><a href="
- ../../tutorials/olimex/
-">Tutorials</a>
-
-
- </li>
-
-
-
-
-
-
-
- <li><a href="
-
-
- ../../core_os/mynewt_os/
-
-">OS User Guide</a>
-
-
- </li>
-
-
-
-
-
-
-
- <li><a href="
-
-
- ../../../network/ble/ble_intro/
-
-">Networking User Guide</a>
-
-
- </li>
-
-
-
- </ul>
-
- </li>
-
-
-
-
-
-
-
- <li><a href="
- ../../../newt/newt_intro/
-">Newt Tool Manual</a>
-
-
- </li>
-
-
-
-
-
-
-
- <li><a href="
- ../../../newtmgr/overview/
-">Newt Manager Manual</a>
-
-
- </li>
-
-
-
-
-
-
-
- <li><a href="
- ../../../faq/answers/
-">Appendix</a>
-
-
- </li>
-
-
-
- </ul>
-</div></div>
-
- <div class="show-sidebar-container">
- <button class="show-sidebar">Docs Menu</button>
- </div>
-
- <div class="col-md-offset-3 col-md-9 documentation-viewer" role="main">
- <div class="row doc-header">
- <div class="col-sm-6">
-
-<ul class="nav nav-pills">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class="active" role="presentation"><a href="../introduction/">Mynewt OS</a></li>
-
-
-
- <li role="presentation"><a href="../../../newt/newt_intro/">Newt Tool</a></li>
-
-
-
- <li role="presentation"><a href="../../../newtmgr/overview/">Newt Mgr</a></li>
-
-
-
-
-</ul>
- </div>
- <div class="col-sm-6">
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
- <li><a href="/documentation/">Docs</a></li>
-
-
-
- <li>» <a href="../introduction/">Mynewt OS Manual</a></li>
-
-
-
- <li>» <a href="../native_tools/">Get Started</a></li>
-
-
-
- <li>» Blinky, The First Hardware in Simulation</li>
-
-
-
- </ul>
-</div>
- </div>
- </div>
-
- <h2 id="blinky-your-hello-world">Blinky, Your Hello World!<a class="headerlink" href="#blinky-your-hello-world" title="Permanent link">¶</a></h2>
-<h3 id="objective">Objective<a class="headerlink" href="#objective" title="Permanent link">¶</a></h3>
-<p>Learn how to use packages from a default application repository of Mynewt to build your first <em>Hello World</em> application (Blinky) in the safe haven of a simulation. </p>
-<p>This tutorial will guide to achieve the following: </p>
-<ol>
-<li>Set up the environment on your computer to use Mynewt OS and newt tool. </li>
-<li>Download packages for building and testing the project <a href="#build-test-code-on-simulator">on a simulated target</a>.</li>
-</ol>
-<p><strong> Time Requirement</strong>: Allow yourself an hour for this project if you are relatively new to embedded systems and want to understand each step.</p>
-<h3 id="what-you-need">What you need<a class="headerlink" href="#what-you-need" title="Permanent link">¶</a></h3>
-<ol>
-<li>Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)</li>
-<li>An account on Github repository and <em>git</em> installed on your computer.</li>
-<li>It assumed you already installed native tools described <a href="../native_tools/">here</a></li>
-</ol>
-<p>Also, we assume that you're familiar with UNIX shells.</p>
-<p>Let's gets started!</p>
-<h3 id="install-native-and-cross-tools">Install Native and Cross Tools<a class="headerlink" href="#install-native-and-cross-tools" title="Permanent link">¶</a></h3>
-<p>See <a href="../native_tools/">Installing Native Tools</a>
- and <a href="../cross_tools/">Installing Cross Tools</a> for ARM to install
-the tools needed by newt.</p>
-<h3 id="install-newt-tool">Install newt tool<a class="headerlink" href="#install-newt-tool" title="Permanent link">¶</a></h3>
-<p>There are two ways to install the <em>newt</em> tool on your computer. The easy way (and the recommeded way for this project) is to download the respective <em>newt</em> binaries from the links below:
-<em> Mac OS
-</em> Linux</p>
-<p>Include the <em>newt</em> in your $PATH.</p>
-<p>Or if you're an adventurer then you can set up the environment on your computer, install the Go language, and build the <em>newt</em> tool from source as explained in the tutorials in the Newt Tool Manual. See <a href="../../newt/newt_mac.md">Install newt from source on Mac</a> and <a href="../../newt/newt_linux.md">Install newt from source on Linux</a>.</p>
-<h3 id="build-test-code-on-simulator">Build test code on simulator<a class="headerlink" href="#build-test-code-on-simulator" title="Permanent link">¶</a></h3>
-<p>1. Clone the larva repository from the Apache git repository into a local directory named <code>larva</code>.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ cd ~/dev
- $ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva
- $ ls
-
- go larva
- $ ls larva
- DISCLAIMER NOTICE app.yml compiler hw net project sys
- LICENSE README.md autotargets fs libs pkg-list.yml scripts
-</pre></div>
-
-
-<p>2. Create a target using the newt tool. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ cd larva
- $ newt target create sim_test
- Creating target sim_test
- Target sim_test sucessfully created!
- $ newt target show
- sim_test
- name: sim_test
- arch: sim
-</pre></div>
-
-
-<p>3. Now continue to populate and build out the sim target. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ 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
- bsp=hw/bsp/native
- compiler=sim
- compiler_def=debug
- name=sim_test
- project=test
-</pre></div>
-
-
-<p>4. Configure <em>newt</em> to use the gnu build tools native to OS X or Linux. In order for sim to work properly, it needs the 32-bit gcc (gcc-5). Replace <em>~/dev/larva/compiler/sim/compiler.yml</em> with the <em>compiler/sim/osx-compiler.yml</em> or <em>linux-compiler.yml</em> file, depending on the system. On a Windows machine, follow the instruction for the Linux machine as you are running commands in a Linux VM.</p>
-<p>For a Mac OS X environment:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ cp compiler/sim/osx-compiler.yml compiler/sim/compiler.yml
-</pre></div>
-
-
-<p>For a Linux machine:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ cp compiler/sim/linux-compiler.yml compiler/sim/compiler.yml
-</pre></div>
-
-
-<p>5. Next, build the packages for the sim project using the <em>newt</em> tool. You should see lots of console output while <em>newt</em> is resolving dependencies and compiling the source code. After a minute, it should complete with
-the <code>Successfully run!</code> text.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ newt target build sim_test
- Building target sim_test (project = test)
- ...
- ...
- Successfully run!
-</pre></div>
-
-
-<p>For extra details, specify the VERBOSE option.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $<span style="color: #000000">newt</span> -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!
-</pre></div>
-
-
-<p>6. Run the test suite executable inside this project and enjoy your first successful test!</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ 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] cbmem_test_suite/cbmem_test_case_3
-</pre></div>
-
-
-<h3 id="conclusion">Conclusion<a class="headerlink" href="#conclusion" title="Permanent link">¶</a></h3>
-<p>In summation, you achieved and learned a fair amount in this hands-on tutorial, all in the simulation environment. </p>
-<p>Now you can turn to more fun tutorials where you can get your hands dirty with actual hardware. Be bold and try the Blinky <a href="../../tutorials/olimex/">tutorials on Olimex board</a>.</p>
-<p>If you see anything missing or want to send us feeback, please do so by signing up for appropriate mailing lists on our <a href="../../../community/">Community Page</a></p>
-<p>Keep on hacking and blinking!</p>
-
- <div class="row">
- <footer>
- <div class="row">
- <div class="col-md-12">
-
- <p class="copyright">Copyright © 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.<br>The Apache Software Foundation Apache Incubator</p>
-
- </div>
- </div>
- <div class="copyright-logos">
- <div class="row">
- <div class="col-xs-6 text-right">
- <img src="/img/apache-feather.png" alt="Apache" title="Apache">
- </div>
- <div class="col-xs-6 text-left">
- <img src="/img/apache-logo.png" alt="Apache Incubator" title="Apache Incubator">
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <small class="footnote">
- MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
- </small>
- </div>
- </div>
-</footer>
- </div>
- </div>
- </div>
-
-
- </div>
-
- <script src="../../../js/jquery-1.10.2.min.js"></script>
- <script src="../../../js/bootstrap-3.0.3.min.js"></script>
- <script src="../../../js/highlight.pack.js"></script>
- <script src="../../../js/base.js"></script>
- <script src="../../../js/custom.js"></script>
-
- </body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/get_started/project_create/index.html
----------------------------------------------------------------------
diff --git a/os/get_started/project_create/index.html b/os/get_started/project_create/index.html
index 8b8a9aa..de2d4f5 100644
--- a/os/get_started/project_create/index.html
+++ b/os/get_started/project_create/index.html
@@ -238,16 +238,6 @@
-
-
-
- <li>
- <a href="../project1/">Blinky, The First Hardware in Simulation</a>
- </li>
-
-
-
-
</ul>
</li>
@@ -429,25 +419,16 @@
<li>Ensure you have installed <a href="../../../newt/newt_intro">newt</a> and that the
newt command is in your system path.</li>
<li>You must have Internet connectivity to fetch remote Mynewt components</li>
-<li>You must <a href="../project1/">install the compiler tools</a> to
+<li>You must <a href="project1.md">install the compiler tools</a> to
support native compiling to build the project this tutorial creates. </li>
</ul>
<h2 id="newt-new">Newt New<a class="headerlink" href="#newt-new" title="Permanent link">¶</a></h2>
<p>Chose a project name. For this tutorial we will call this project <code>myproj</code>.
Enter the <code>newt new myproj</code> command. Your put</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt new myproj
-
Downloading project skeleton from apache/incubator-mynewt-blinky...
-Downloading repository incubator-mynewt-blinky <span style="color: #000000">(</span>branch: develop<span style="color: #000000">)</span> at https://github.com/apache/incubator-mynewt-blinky.git
-Cloning into <span style="color: #C41A16">'/var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/newt-repo290518149'</span>...
-remote: Counting objects: 727, <span style="color: #A90D91">done</span>.
-remote: Compressing objects: 100% <span style="color: #000000">(</span>29/29<span style="color: #000000">)</span>, <span style="color: #A90D91">done</span>.
-remote: Total <span style="color: #1C01CE">727</span> <span style="color: #000000">(</span>delta 7<span style="color: #000000">)</span>, reused <span style="color: #1C01CE">0</span> <span style="color: #000000">(</span>delta 0<span style="color: #000000">)</span>, pack-reused 696
-Receiving objects: 100% <span style="color: #000000">(</span>727/727<span style="color: #000000">)</span>, 201.64 KiB | <span style="color: #1C01CE">0</span> bytes/s, <span style="color: #A90D91">done</span>.
-Resolving deltas: 100% <span style="color: #000000">(</span>329/329<span style="color: #000000">)</span>, <span style="color: #A90D91">done</span>.
-Checking connectivity... <span style="color: #A90D91">done</span>.
Installing skeleton in myproj...
-Project myproj successfully created
+Project myproj successfully created.
</pre></div>
@@ -493,18 +474,18 @@ the packages.</p>
<h2 id="newt-install">Newt Install<a class="headerlink" href="#newt-install" title="Permanent link">¶</a></h2>
<p>change into the <code>myproj</code> directory. Then ask newt to install all the
project package dependencies using <code>newt install</code></p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt install
-
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt install -v
+apache-mynewt-core
Downloading repository description <span style="color: #A90D91">for</span> apache-mynewt-core... success!
-Downloading repository incubator-mynewt-core <span style="color: #000000">(</span>branch: develop<span style="color: #000000">)</span> at https://github.com/apache/incubator-mynewt-core.git
-Cloning into <span style="color: #C41A16">'/var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/newt-repo379645046'</span>...
-remote: Counting objects: 17684, <span style="color: #A90D91">done</span>.
-remote: Compressing objects: 100% <span style="color: #000000">(</span>377/377<span style="color: #000000">)</span>, <span style="color: #A90D91">done</span>.
-remote: Total <span style="color: #1C01CE">17684</span> <span style="color: #000000">(</span>delta 190<span style="color: #000000">)</span>, reused <span style="color: #1C01CE">0</span> <span style="color: #000000">(</span>delta 0<span style="color: #000000">)</span>, pack-reused 17284
-Receiving objects: 100% <span style="color: #000000">(</span>17684/17684<span style="color: #000000">)</span>, 6.11 MiB | 2.19 MiB/s, <span style="color: #A90D91">done</span>.
-Resolving deltas: 100% <span style="color: #000000">(</span>10395/10395<span style="color: #000000">)</span>, <span style="color: #A90D91">done</span>.
+Downloading repository incubator-mynewt-core <span style="color: #000000">(</span>branch: master; commit: mynewt_0_8_0_b2_tag<span style="color: #000000">)</span> at https://github.com/apache/incubator-mynewt-core.git
+Cloning into <span style="color: #C41A16">'/var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348'</span>...
+remote: Counting objects: 17935, <span style="color: #A90D91">done</span>.
+remote: Compressing objects: 100% <span style="color: #000000">(</span>234/234<span style="color: #000000">)</span>, <span style="color: #A90D91">done</span>.
+remote: Total <span style="color: #1C01CE">17935</span> <span style="color: #000000">(</span>delta 101<span style="color: #000000">)</span>, reused <span style="color: #1C01CE">0</span> <span style="color: #000000">(</span>delta 0<span style="color: #000000">)</span>, pack-reused 17686
+Receiving objects: 100% <span style="color: #000000">(</span>17935/17935<span style="color: #000000">)</span>, 6.18 MiB | 315.00 KiB/s, <span style="color: #A90D91">done</span>.
+Resolving deltas: 100% <span style="color: #000000">(</span>10541/10541<span style="color: #000000">)</span>, <span style="color: #A90D91">done</span>.
Checking connectivity... <span style="color: #A90D91">done</span>.
-Repos successfully installed
+apache-mynewt-core successfully installed version 0.7.9-none
<span style="color: #000000">$ </span>
</pre></div>
@@ -535,13 +516,6 @@ under the specific repository you have included in the base project. </p>
<p>Within each of these directories are the packages required to build your
project for the various targets.</p>
-<h2 id="do-compiler-stuff-for-linux">Do compiler stuff for Linux<a class="headerlink" href="#do-compiler-stuff-for-linux" title="Permanent link">¶</a></h2>
-<p>A current behavior on Linux requires that we copy a single file within this
-project. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">cp repos/apache-mynewt-core/compiler/sim/linux-compiler.yml repos/apache-mynewt-core/compiler/sim/compiler.yml
-</pre></div>
-
-
<h2 id="testing-the-project">Testing the Project<a class="headerlink" href="#testing-the-project" title="Permanent link">¶</a></h2>
<p>To validate, you can also run all the units test through simulation.</p>
<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">newt test all
@@ -557,7 +531,7 @@ All tests passed
<h2 id="building-the-project">Building the Project<a class="headerlink" href="#building-the-project" title="Permanent link">¶</a></h2>
<p>To build the project you can use <code>newt build</code> using the target </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt build targets/my_blinky_sim
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt build my_blinky_sim
App successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf
</pre></div>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/get_started/vocabulary/index.html
----------------------------------------------------------------------
diff --git a/os/get_started/vocabulary/index.html b/os/get_started/vocabulary/index.html
index 752a35a..6c58ba9 100644
--- a/os/get_started/vocabulary/index.html
+++ b/os/get_started/vocabulary/index.html
@@ -383,164 +383,153 @@
</div>
<h2 id="concepts">Concepts<a class="headerlink" href="#concepts" title="Permanent link">¶</a></h2>
-<h3 id="application-repository-or-app">Application repository or app<a class="headerlink" href="#application-repository-or-app" title="Permanent link">¶</a></h3>
-<p>The application repository (app) is the base directory of your embedded software. It is a workspace containing a logical collection of the source code for one or more of your <a href="#project">projects</a>. An app can contain multiple projects, and reflects multiple end products. </p>
-<p>As the base repository of your source code, the app has a master branch and several other branches off it. The <code>master</code> is typically what developers commit to. Just before your code is ready for a release, a code freeze should prevent all commits to the <code>master</code> branch. However, a temporary <code>develop</code> branch is opened up for contributors to continue committing their code. When the release is tagged off the <code>master</code>, the <code>develop</code> branch is merged into <code>master</code>. And after the <code>develop</code> merge to the <code>master</code>, developers may resume commiting changes to <code>master</code>, and the <code>develop</code> branch is subsequently deleted.</p>
-<p>Alternatively, you may choose to create your own branch, specific to an individual developer, and work there.</p>
-<p>You can have several <a href="#project">projects</a> in your app repository, since an application can be used in several projects. Each project in your app will, in turn, consist of several <a href="#package-or-pkg">packages</a>. A project could be a package itself as well. In addition to packages, your app repository will contain additional items such as <a href="#target">target</a> or build definitions, <a href="#package-list-or-pkg-list">package list</a> description files, scripts etc.</p>
-<p>For example, a walk through the main app at <a href="https://github.com/apache/incubator-mynewt-larva">https://github.com/apache/incubator-mynewt-larva</a> shows the structure of the repository. The app.yml file in the larva directory indicates that it is an app. A pkg will have the pkg.yml file in it as shown below. By this nomenclature, each board support package for a particular chip is a pkg; for instance, the API for the hardware abstraction layer is a pkg, and so on. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">larva
- |- app.yml
- |- compiler
- |- arm-none-eabi-m0
- |- arm-none-eabi-m4
- |- sim
- |- hw (hardware)
- |- bsp (board support package)
- |- nrf52pdk (Nordic nRF52 series chip)
- |- pkg.yml
- |- ...
- |- olimex_stm32-e407_devboard (used in Project Blinky)
- |- pkg.yml
- |- ...
- |- nrf51dk
- |- pkg.yml
- |- ...
- |- yet another board
- |- pkg.yml
- |- ...
- |- hal (hardware abstraction layer APIs)
- |- pkg.yml
- |- include
- |- hal_cputime.h
- |- hal_flash.h
- |- hal_gpio.h
- |- ... (header files for other peripherals)
- |- src
- |- flash_map.c
- |- ... (other files)
- |- mcu (microcontroller)
- |- stm (STMicro family)
- |- stm32f3xx (STM32f3 series, 32-bit ARM Cortex-M4 core)
- |- pkg.yml
- |- src
- |- hal_gpio.c (specific to the STM32f3 mcu)
- |- hal_cputime.c
- |- ... (code for other peripherals)
- |- nordic (Nordic Semiconductor family)
- |- nrf52xxx (nRF52 Series SoC, Cortex-M4F core)
- |- pkg.yml
- |- src
- |- hal_gpio.c (specific to the nRF52 mcu )
- |- hal_cputime.c
- |- ... (code for other peripherals)
- |- yet another family of mcu
- |- ...
- |- libs
- |- bootutil (hw architecture independent boot loader library)
- |- pkg.yml
- |- src
- |- loader.c
- |- ... (related source code files)
- |- nffs (hw architecture independent Newtron Flash File System)
- |- pkg.yml
- |- src
- |- nffs.c
- |- ... (related source code files)
- |- another library
- |- pkg.yml
- |- src
- |- ... (related source code files)
- |- project
- |- scripts
- |- net/nimble (BLE stack)
- |- ... (additional modules or stacks)
-</pre></div>
-
-
-<p>The <em>newt</em> tool offers the <code>app</code> sub command to create and manage apps. In general, commands represent actions, and flags act as modifiers for specfied actions. A <em>newt</em> command can have subcommands and it can optionally run an action. A full description of the <code>app</code> command can be found in the <a href="../../../newt/command_list/newt_app/">Newt Tool Manual</a>.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> newt app [flags]
- newt app [child-commands]
-</pre></div>
-
-
-<p>A complete list of all the app subcommands can be found in the <em>newt</em> tool reference in <a href="http://mynewt.apache.org/newt/command_list/newt_app/">Newt Tool</a>.</p>
+<p>This page is meant to introduce you to some of the concepts inherent to
+the Apache Mynewt Operating System, and <em>Newt</em> the tool that stitches a
+project built on Apache Mynewt together.</p>
<h3 id="project">Project<a class="headerlink" href="#project" title="Permanent link">¶</a></h3>
-<p>Projects represent individual build configurations of your embedded system and (individually or collectively) comprise your application. The project files dictate the generated binary. </p>
-<p>A project is laid out as a directory inside an app and contains required packages for an application. For example, the <code>blinky</code> pkg sits in <code>project/blinky</code> directory of the <code>larva</code> app. This pkg is used in the blinky project (an application) outlined in <a href="../project1/">Get Started</a>.</p>
-<p>Associated with each project are properties. These properties are defined in the<code><project-name>.yml</code> file in the project directory. For example, the <code>project/blinky</code> directory has the <code>blinky.yml</code> file indicating some or all of the properties disscused below. Only the name of a project is required for the project to exist; however, additional properties may be specified for the pkgs within it to produce an executable. </p>
+<p>The project is the base directory of your embedded software tree. It is a
+workspace that contains a logical collection of source code, for one or
+more of your applications. A project consists of the following items:</p>
<ul>
-<li>Project name</li>
-<li>Base path of the project (app/project/project-name by default)</li>
-<li>Pkgs belonging to the project</li>
-<li><a href="#capabilities">Capabilities</a> that are required for the project or target </li>
-<li><a href="#identity">Identity</a> to classify the type of project or target</li>
-<li>Compiler flags to call out any specific compiler requirements</li>
+<li>Project Definition: defines project level dependencies, and parameters
+ (located in <code>project.yml</code>)</li>
+<li>Packages</li>
</ul>
-<p>Also, a project itself could be a pkg if it is a distributable package for a specific application. That is, the pkg can be resued in other apps as a bundle of libraries.</p>
-<p>To work with pkgs, the <em>newt</em> tool offers management commands that you can use with your project. For example, if your project is a pkg, you can use the following command to install a project from an app.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> newt pkg install [flags] <project pkg name>
+<p><a href="#package">Packages</a> are described in detail in the section below. </p>
+<p>Here is an example project definition file from the default Apache Mynewt
+project: </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>more project.yml
+<snip>
+project.name: <span style="color: #C41A16">"my_project"</span>
+
+project.repositories:
+ - apache-mynewt-core
+
+<span style="color: #177500"># Use github's distribution mechanism for core ASF libraries.</span>
+<span style="color: #177500"># This provides mirroring automatically for us.</span>
+<span style="color: #177500">#</span>
+repository.apache-mynewt-core:
+ <span style="color: #A90D91">type</span>: github
+ vers: 0-latest
+ user: apache
+ repo: incubator-mynewt-core
+<span style="color: #000000">$ </span>
</pre></div>
-<p>Other commands associated with pkg are:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> newt pkg list
- newt pkg checkdeps
- newt pkg search <pkg-name>
- newt pkg show [<pkg-list> ] <pkg-name>
- newt pkg install [<pkg-list> ] <pkg-name>
- newt pkg remove [<pkg-list> ] <pkg-name>
+<p>A couple of things to note in the project definition:</p>
+<ul>
+<li>
+<p><code>project.repositories</code>: Defines the remote repositories that this project
+relies upon.</p>
+</li>
+<li>
+<p><code>repository.apache-mynewt-core</code>: Defines the repository information for
+the <code>apache-mynewt-core</code> repository.</p>
+</li>
+</ul>
+<p>Repositories are versioned collections of packages. </p>
+<p>Projects can rely on remote repositories for functionality, and the newt tool
+will resolve those remote repositories, and download the correct version into
+your local source tree. Newly fetched repositories are put in the <code>repos</code>
+directory of your project, and can be referenced throughout the system by using
+the <code>@</code> specifier. </p>
+<p>By default, the <code>@apache-mynewt-core</code> repository is included in every
+project. Apache Mynewt Core contains all the base functionality of the Apache
+Mynewt Operating System, including the Real Time Kernel, Bluetooth Networking
+Stack, Flash File System, Console, Shell and Bootloader.</p>
+<p><em>NOTE:</em> Any project can be converted into a repository by providing it with a
+<code>repository.yml</code> file and putting it up onto Github. More information
+about repositories can be found in the Newt documentation.</p>
+<h3 id="package">Package<a class="headerlink" href="#package" title="Permanent link">¶</a></h3>
+<p>A package is a collection items that form a fundamental unit in the Mynewt
+Operating System. Packages can be:</p>
+<ul>
+<li>Applications</li>
+<li>Libraries</li>
+<li>Compiler definitions</li>
+<li>Targets</li>
+</ul>
+<p>A package is identified by having a <code>pkg.yml</code> file in it's base
+directory. Here is a sample <code>pkg.yml</code> file for the blinky applicaton:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>more pkg.yml
+<snip>
+pkg.name: apps/blinky
+pkg.type: app
+pkg.description: Basic example application which blinks an LED.
+pkg.author: <span style="color: #C41A16">"Apache Mynewt <dev@mynewt.incubator.apache.org>"</span>
+pkg.homepage: <span style="color: #C41A16">"http://mynewt.apache.org/"</span>
+pkg.keywords:
+
+pkg.deps:
+ - <span style="color: #C41A16">"@apache-mynewt-core/libs/os"</span>
+ - <span style="color: #C41A16">"@apache-mynewt-core/hw/hal"</span>
+ - <span style="color: #C41A16">"@apache-mynewt-core/libs/console/full"</span>
</pre></div>
-<h3 id="package-or-pkg">Package or pkg<a class="headerlink" href="#package-or-pkg" title="Permanent link">¶</a></h3>
-<p>A package (pkg) is a distributable bundle of libraries. Just as an egg in nature has various parts, each serving a certain purpose, a Mynewt app consists of software modules that have different functions. However, unlike the egg in nature these modules can exist by itself and may be distributed; therefore, they too are essentially eggs. Once this analogy is grasped it is easy to see how a pkg may consist of other pkgs.</p>
-<p>The two main directories in a pkg are <code>/include</code> and <code>/src</code>.</p>
-<p>The <em>newt</em> tool offers several pkg commands as shown above. For example, you can list all the pkgs</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> newt pkg list
-</pre></div>
-
+<p>Packages have a few features worth noting:</p>
+<ul>
+<li>Dependencies: Packages can rely upon other packages, and when they do
+ they will inherit their functionality (header files, library definitions, etc.)</li>
+<li>APIs: Packages can export named APIs, and they can require that certain
+ APIs be present, in order to compile.</li>
+<li>Features: Packages can operate differently depending on what named features are
+ present in the system. Packages can also export features to the rest of the
+ Mynewt system.</li>
+</ul>
+<p>Everything that newt knows about within a project's directory is a package. This
+makes it very clean and easy to write re-usable components, which can describe their
+Dependencies and APIs to the rest of the system.</p>
+<h3 id="target">Target<a class="headerlink" href="#target" title="Permanent link">¶</a></h3>
+<p>A target in Apache Mynewt is very similar to a target in <em>make</em>. It is the collection
+of parameters that must be passed to Newt in order to generate a reproducable build. A
+target represents the top of the build tree, and any packages or parameters specified at
+the target level, cascade down to all dependencies.</p>
+<p>Targets are also packages, and are stored in the <code>targets/</code> directory at the base
+of your project. Most targets consist of: </p>
+<ul>
+<li><code>app</code>: The application to build.</li>
+<li><code>bsp</code>: The board support package to combine with that application</li>
+<li><code>build_profile</code>: Either <code>debug</code> or <code>optimized</code>. </li>
+</ul>
+<p>Targets can also have additional items specified, including: </p>
+<ul>
+<li><code>cflags</code>: Any additional compiler flags you might want to specify to the build.</li>
+<li><code>features</code>: Any system level features you want to enable.</li>
+</ul>
+<p>In order to create and manipulate targets, the <em>newt</em> tool offers a set of helper commands,
+you can find more information about these by issuing:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">$ </span>newt target
-<p>It lists all the pkgs in the current app where each pkg has details, such as version, path, and dependencies. A sample output for a pkg is given below:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> Package: libs/os, version 0.1.0
- path: /Users/aditihilbert/dev/test_project/libs/os
- deps: libs/testutil@none#stable
-</pre></div>
+Usage:
+ newt target <span style="color: #000000">[</span>flags<span style="color: #000000">]</span>
+ newt target <span style="color: #000000">[</span><span style="color: #A90D91">command</span><span style="color: #000000">]</span>
+Available Commands:
+ show View target configuration variables
+ <span style="color: #A90D91">set </span>Set target configuration variable
+ create Create a target
+ delete Delete target
+ copy Copy target
+ vars Show variable names
-<p>For a comprehensive list of all pkg commands, consult the <em>newt</em> tool reference in <a href="../../../newt/newt_intro/">Newt Tool</a>.</p>
-<h3 id="package-list-or-pkg-list">Package list or pkg-list<a class="headerlink" href="#package-list-or-pkg-list" title="Permanent link">¶</a></h3>
-<p>A pkg-list is a snapshot of all pkgs in a remote app at any point in time. On any given github branch, an app with a pkg-list of pkgs will contain a <code>pkg-list.yml</code> file that specifies the version number, dependencies, and hash value for each constituent pkg as well as the name of the entire pkg-list and the github url for it. [Note: Currently ]</p>
-<p>You may download multiple pkg-lists into your local app as long as the names of the pkg-lists are different. This allows you to mix and match various features and functionality coming from different pkg-lists of pkgs. You can see all the pkg-lists in the <code>.app/pkg-lists</code> directory in your app.</p>
-<p>As with pkgs, the <em>newt</em> tool offers pkg-list management commands within the <code>newt app</code> command. For example, the following command creates a new pkg-list using all the pkgs in the current directory. It requires that a pkg-list name be specified and the url for the location of that pkg-list in the remote repository. These two inputs go into the <code>pkg-list.yml</code> file in an app.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> newt app generate-pkg-list <pkg-list-name> <pkg-list-url>
-</pre></div>
+Flags:
+ -h, --help<span style="color: #000000">=</span><span style="color: #A90D91">false</span>: <span style="color: #A90D91">help for</span> target
+Global Flags:
+ -l, --loglevel<span style="color: #000000">=</span><span style="color: #C41A16">"WARN"</span>: Log level, defaults to WARN.
+ -o, --outfile<span style="color: #000000">=</span><span style="color: #C41A16">""</span>: Filename to tee log output to
+ -q, --quiet<span style="color: #000000">=</span><span style="color: #A90D91">false</span>: Be quiet; only display error output.
+ -s, --silent<span style="color: #000000">=</span><span style="color: #A90D91">false</span>: Be silent; don<span style="color: #000000">'</span>t output anything.
+ -v, --verbose<span style="color: #000000">=</span><span style="color: #A90D91">false</span>: Enable verbose output when executing commands.
-<p><strong>Note</strong>: A pkg-list for a project stipulates all pkgs that belong together that must be installed as project's source code.</p>
-<h3 id="target">Target<a class="headerlink" href="#target" title="Permanent link">¶</a></h3>
-<p>A target is the hardware build or its software equivalent (e.g. test, simulator) set for a project. Targets instruct the <em>newt</em> tool how to build the source code within a given app. Once a new target is created, its architecture and other details can be set manually. An example of a defined target named "blink_f3disc" is given below.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> blink_f3disc
- compiler_def: debug
- compiler: arm-none-eabi-m4
- name: blink_f3disc
- arch: cortex_m4
- project: blinky
- bsp: hw/bsp/stm32f3discovery
-</pre></div>
+Additional <span style="color: #A90D91">help </span>topics:
-<p>To that end, <em>newt</em> tool offers commands to create, set and manipulate targets. For example, the create command below creates an empty target named <code>my_target1</code> and the set command sets one attribute of its definition, namely the architecture.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> newt target create my_target1
- newt target set my_target1 arch=cortex_m4
+Use <span style="color: #C41A16">"newt help [command]"</span> <span style="color: #A90D91">for</span> more information about a command.
+<span style="color: #000000">$ </span>
</pre></div>
-
-
-<h3 id="capability">Capability<a class="headerlink" href="#capability" title="Permanent link">¶</a></h3>
-<p>Capability, as the name suggests, is functionality that is exposed by a pkg. A capability is tracked by its name and version. In some cases, a pkg may require capabilities exposed by another pkg, thus establishing a dependency, which is tracked through the pkg.yml files. </p>
-<p>With <em>newt</em> tool you can verify a map of pkgs' capabilities, use it to check dependencies, and ensure all the necessary pkgs in a project belong to its target.</p>
-<h3 id="identity">Identity<a class="headerlink" href="#identity" title="Permanent link">¶</a></h3>
-<p>Identity is a property of a target or project in the <em>newt</em> world. A target may inherit its identify from a project or vice versa. It may be used to determine what pkgs to include or how a pkg code should behave in a build or which linkerscripts to use. For example, the identity of a lock device is different from the identity of a wearable monitor. Even if they were built on the same hardware target, different features and behaviors are required. Because of this distinction, a distinct sets of pkgs in the projects and/or the same pkg will behave differently, depending on its identity.</p>
<div class="row">
<footer>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/os/tutorials/arduino_zero/index.html
----------------------------------------------------------------------
diff --git a/os/tutorials/arduino_zero/index.html b/os/tutorials/arduino_zero/index.html
index fdcb4a9..bd33224 100644
--- a/os/tutorials/arduino_zero/index.html
+++ b/os/tutorials/arduino_zero/index.html
@@ -473,7 +473,7 @@ compatible with this tutorial</li>
<h2 id="steps">Steps<a class="headerlink" href="#steps" title="Permanent link">¶</a></h2>
<p>Follow these simple steps and your board will be blinking in no time!</p>
<h3 id="install-mynewt-and-newt">Install Mynewt and Newt<a class="headerlink" href="#install-mynewt-and-newt" title="Permanent link">¶</a></h3>
-<p>If you have not already done so, install Newt as shown in the <a href="../../../newt/tutorials/newt_mac/">Newt install tutorial</a> and cloned the Mynewt OS repository as shown in the <a href="../../get_started/project1/">Get Started tutorial for Blinky</a></p>
+<p>If you have not already done so, install Newt as shown in the <a href="../../../newt/tutorials/newt_mac/">Newt install tutorial</a> and cloned the Mynewt OS repository as shown in the <a href="../get_started/project1.md">Get Started tutorial for Blinky</a></p>
<h3 id="fetch-external-packages-for-atmel-samd21">Fetch External Packages for Atmel SAMD21<a class="headerlink" href="#fetch-external-packages-for-atmel-samd21" title="Permanent link">¶</a></h3>
<p>Mynewt uses source code provided directly from the chip manufacturer for
low level operations. This code is licensed only for Atmel parts, and
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/sitemap.xml
----------------------------------------------------------------------
diff --git a/sitemap.xml b/sitemap.xml
index 3e9d3fa..6db8bff 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -4,7 +4,7 @@
<url>
<loc>http://mynewt.apache.org/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -12,7 +12,7 @@
<url>
<loc>http://mynewt.apache.org/about/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -20,7 +20,7 @@
<url>
<loc>http://mynewt.apache.org/documentation/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -28,7 +28,7 @@
<url>
<loc>http://mynewt.apache.org/download/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -36,7 +36,7 @@
<url>
<loc>http://mynewt.apache.org/community/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -44,7 +44,7 @@
<url>
<loc>http://mynewt.apache.org/events/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -53,7 +53,7 @@
<url>
<loc>http://mynewt.apache.org/os/get_started/introduction/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -93,7 +93,7 @@
<url>
<loc>http://mynewt.apache.org/newt/newt_intro/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -115,7 +115,7 @@
<url>
<loc>http://mynewt.apache.org/newtmgr/overview/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
@@ -137,7 +137,7 @@
<url>
<loc>http://mynewt.apache.org/faq/answers/</loc>
- <lastmod>2016-03-14</lastmod>
+ <lastmod>2016-03-15</lastmod>
<changefreq>daily</changefreq>
</url>
[2/3] incubator-mynewt-site git commit: updated newt getting started
docs
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7d62ab1b/mkdocs/search_index.json
----------------------------------------------------------------------
diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json
index 69cc028..e689819 100644
--- a/mkdocs/search_index.json
+++ b/mkdocs/search_index.json
@@ -72,7 +72,7 @@
},
{
"location": "/os/get_started/introduction/",
- "text": "Introduction\n\n\nWelcome to Apache Mynewt\n\n\nApache Mynewt is an operating system that makes it easy to develop\napplications for microcontroller environments where power and cost \nare driving factors. Examples of these devices are connected locks, \nlights, and wearables.\n\n\nMicrocontroller environments have a number of characteristics that \nmakes the operating system requirements for them unique: \n\n\n\n\n\n\nLow memory footprint: memory on these systems range from \n8-16KB (on the low end) to 16MB (on the high end).\n\n\n\n\n\n\nReduced code size: code often runs out of flash, and total available code size ranges from 64-128KB to 16-32MB.\n\n\n\n\n\n\nLow processing speed: processor speeds vary from 10-12MHz to 160-200MHz. \n\n\n\n\n\n\nLow power operation: devices operate in mostly sleeping mode, in order to conserve\nbattery power and maximize power usage.\n\n\n\n\n\n\nAs more and more devices get connected, these interconnected devies perform comp
lex tasks. To\nperform these tasks, you need low-level operational functionality built into the operating system.\nTypically, connected devices built with these microcontrollers perform a myriad of low-level tasks: \n\n\n\n\n\n\nNetworking Stacks: Bluetooth Low Energy and Thread\n\n\n\n\n\n\nPeripherals: PWM to drive motors, ADCs to measure sensor data, and RTCs\nto keep time.\n\n\n\n\n\n\nScheduled Processing: actions must happen on a calendared or periodic basis.\n\n\n\n\n\n\nApache Mynewt accomplishes all the above easily, by providing a complete\noperating system for constrained devices, including:\n\n\n\n\n\n\nA fully open-source Bluetooth Low Energy stack with both Host and \nController implementations. \n\n\n\n\n\n\nA pre-emptive, multi-tasking Real Time operating system kernel\n\n\n\n\n\n\nA Hardware Abstraction Layer (HAL) that abstracts the MCU's \nperipheral functions, allowing developers to easily write cross-platform\ncode.\n\n\n\n\n\n\nNewt\n\n\nIn order to provide all
this functionality, and operate in an \nextremely low resource environment, Mynewt provides a very fine-grained source \npackage management and build system tool, called \nnewt\n. \n\n\nYou can install and build \nnewt\n for \nLinux\n or \nMac\n. \n\n\nBuild your first Mynewt App with Newt\n\n\nBefore you start your first Mynewt application, you must first create a new Mynewt\napplication with the \nnewt\n tool: \n\n\n$ \nnewt new my_app\nDownloading application skeleton from https://git-wip-us.apache.org/repos/asf/incubator-mynewt-tadpole.git... ok!\nApplication my_app successfully created in /Users/mynewt/dev/my_app\n\n$ \n\n\n\n\n\n\nThis new application contains the core of the operating system and the hardware abstraction layer, which all fits into less than 5KB of compiled code size.\n\n\nOnce the application is created, you can then install the packages you need, as Mynewt will automatically download them, along with their dependencies into your application.\n\n\nFor example
, let's install a file system into the \"my_app\" application.\n\n\nFirst, we'll search for file system packages: \n\n\n$\n \nnewt\n \npkg\n \nsearch\n \nfs\n\n\nPackage\n \nlist\n \nlarva\n \nhas\n \npackage\n \nfs/nffs\n@0.8.0\n\n\nPackage\n \nlist\n \nlarva\n \nhas\n \npackage\n \nfs/fs\n@0.0.0\n\n\nPackage\n \nlist\n \nlarva\n \nhas\n \npackage\n \nproject/ffs2native\n@0.0.0\n\n\n\n\n\n\nOnce found, you can install the nffs package (Newtron Flash File System) with \nnewt\n:\n\n\n$ \nnewt pkg install fs/nffs\nDownloading larva from https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/master... ok!\nInstalling fs/nffs\nInstalling fs/fs\nInstallation was a success!\n\n\n\n\n\nAt this point you have your first Mynewt application. And it's that simple!\n\n\nMynewt contains all the packages and reusable software components you need to develop a device using a 32-bit \nMicrocontroller. And by providing a robust package management and build system, to help you build building b
locks, Mynewt allows you to scale from 5KB of code size to MBs of compiled code size.\n\n\nNext, try doing your first project using \nnewt.\n In the next section, \nGet Started\n, we guide you how get a LED on a target board blink. \n\n\nSo get on with it!",
+ "text": "Introduction\n\n\nWelcome to Apache Mynewt\n\n\nApache Mynewt is an operating system that makes it easy to develop\napplications for microcontroller environments where power and cost \nare driving factors. Examples of these devices are connected locks, \nlights, and wearables.\n\n\nMicrocontroller environments have a number of characteristics that \nmakes the operating system requirements for them unique: \n\n\n\n\n\n\nLow memory footprint: memory on these systems range from \n8-16KB (on the low end) to 16MB (on the high end).\n\n\n\n\n\n\nReduced code size: code often runs out of flash, and total available code size ranges from 64-128KB to 16-32MB.\n\n\n\n\n\n\nLow processing speed: processor speeds vary from 10-12MHz to 160-200MHz. \n\n\n\n\n\n\nLow power operation: devices operate in mostly sleeping mode, in order to conserve\nbattery power and maximize power usage.\n\n\n\n\n\n\nAs more and more devices get connected, these interconnected devices perform com
plex tasks. To\nperform these tasks, you need low-level operational functionality built into the operating system.\nTypically, connected devices built with these microcontrollers perform a myriad of functions: \n\n\n\n\n\n\nNetworking Stacks: Bluetooth Low Energy and Thread\n\n\n\n\n\n\nPeripherals: PWM to drive motors, ADCs to measure sensor data, and RTCs\nto keep time.\n\n\n\n\n\n\nScheduled Processing: actions must happen on a calendared or periodic basis.\n\n\n\n\n\n\nApache Mynewt accomplishes all the above easily, by providing a complete\noperating system for constrained devices, including:\n\n\n\n\n\n\nA fully open-source Bluetooth Low Energy stack with both Host and \nController implementations. \n\n\n\n\n\n\nA pre-emptive, multi-tasking Real Time operating system kernel\n\n\n\n\n\n\nA Hardware Abstraction Layer (HAL) that abstracts the MCU's \nperipheral functions, allowing developers to easily write cross-platform\ncode.\n\n\n\n\n\n\nNewt\n\n\nIn order to provide all this
functionality, and operate in an \nextremely low resource environment, Mynewt provides a very fine-grained source \npackage management and build system tool, called \nnewt\n. \n\n\nYou can install and build \nnewt\n for \nLinux\n or \nMac\n. \n\n\nBuild your first Mynewt App with Newt\n\n\nBefore you start your first Mynewt application, you must first create a new Mynewt\nproject with the \nnewt\n tool: \n\n\n$ \nnewt new my_project\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in my_app...\nProject my_app successfully created.\n\n\n\n\n\nNewt populates this new project with a base skeleton of a new Apache Mynewt \nproject. It has the following structure:\n\n\n$ \ncd \nmy_project\n\n$ \ntree -L 3\n.\n\u251c\u2500\u2500 DISCLAIMER\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 NOTICE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2
502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u251c\u2500\u2500 project.yml\n\u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml\n\n\n6\n directories, \n10\n files\n\n$ \n\n\n\n\n\n\nOnce you've switched into your new project's directory, the next step is to fetch\nany dependencies this project has. By default, all Newt projects rely on a single\nremote repository, apache-mynewt-core. Newt install will fetch this locally:\n\n\n$ \nnewt install\napache-mynewt-core\n\n$\n\n\n\n\n\n\nNOTE:\n \napache-mynewt-core\n may take a while to download, to see progress, use\nthe \n-v\n (verbose) option to install. \n\n\nOnce \nnewt install\n has successfully finished, the contents of \napache-mynewt-core\n\nwill have been downloaded into your local directory. You can view
them by issuing the \nfollowing commands in the base directory of the new project:\n\n\n$ \ncd \nrepos/apache-mynewt-core\n\n$ \ntree -L2\n.\n\nsnip\n\n\u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 nffs\n\u251c\u2500\u2500 hw\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 bsp\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 hal\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 mcu\n\u251c\u2500\u2500 libs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 baselibc\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 bootutil\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 cmsis-core\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 console\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 elua\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 flash_test\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 imgmgr\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 json\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 mbedtls\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 newtmgr\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 os\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 shell\n
\u2502\u00a0\u00a0 \u251c\u2500\u2500 testreport\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 testutil\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 util\n\u251c\u2500\u2500 net\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 nimble\n\nsnip\n\n\n\n\n\n\nAs you can see, the core of the Apache Mynewt operating system has been brought \ninto your local directory! \n\n\nNew projects created with Newt, come with by default an example application \n(\napps/blinky\n) and an example target (\nmy_blinky_sim\n) which allows you to \nbuild that application for the simulated platform. \n\n\nWith your new project, all you need to build and run your new application is to \nissue the following commands: \n\n\n$ \nnewt build my_blinky_sim \nCompiling base64.c\nCompiling cbmem.c\nCompiling datetime.c\nCompiling tpq.c\nArchiving util.a\nCompiling main.c\nArchiving blinky.a\nCompiling flash_map.c\nCompiling hal_flash.c\nArchiving hal.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\n\nsnip\n\nLinking blinky.elf\nApp success
fully built: /Users/sterling/dev/tmp/my_app/bin/my_blinky_sim/apps/blinky/blinky.elf\n\n$ \nnewt run my_blinky_sim\n\n(\nruns target my_blinky_sim on the simulator\n)\n\n\n\n\n\n\nAt this point you have your first Mynewt application!\n\n\nApache Mynewt has a lot more functionality than just running simulated applications. It provides all \nthe features you'll need to cross-compile your application, run it on real hardware and develop a \nfull featured application.\n\n\nIf you're interested in learning more, a good next step is to choose a project to \n\nGet Started\n with, and begin to familiarize \nyourself with operating within the newt environment. These projects will get your toolchain installed, \nand get you blinking an LED with the Apache Mynewt OS.\n\n\nAfter you've tried a few getting started projects, there are plenty of tutorials that will help \nexpose you to much of the functionality provided by the Apache Mynewt Core Operating System. There is \nalso full reference
documentation for all of the Core Apache Mynewt APIs.\n\n\nHappy Hacking!",
"title": "Introduction"
},
{
@@ -82,7 +82,7 @@
},
{
"location": "/os/get_started/introduction/#welcome-to-apache-mynewt",
- "text": "Apache Mynewt is an operating system that makes it easy to develop\napplications for microcontroller environments where power and cost \nare driving factors. Examples of these devices are connected locks, \nlights, and wearables. Microcontroller environments have a number of characteristics that \nmakes the operating system requirements for them unique: Low memory footprint: memory on these systems range from \n8-16KB (on the low end) to 16MB (on the high end). Reduced code size: code often runs out of flash, and total available code size ranges from 64-128KB to 16-32MB. Low processing speed: processor speeds vary from 10-12MHz to 160-200MHz. Low power operation: devices operate in mostly sleeping mode, in order to conserve\nbattery power and maximize power usage. As more and more devices get connected, these interconnected devies perform complex tasks. To\nperform these tasks, you need low-level operational functionality built into the operat
ing system.\nTypically, connected devices built with these microcontrollers perform a myriad of low-level tasks: Networking Stacks: Bluetooth Low Energy and Thread Peripherals: PWM to drive motors, ADCs to measure sensor data, and RTCs\nto keep time. Scheduled Processing: actions must happen on a calendared or periodic basis. Apache Mynewt accomplishes all the above easily, by providing a complete\noperating system for constrained devices, including: A fully open-source Bluetooth Low Energy stack with both Host and \nController implementations. A pre-emptive, multi-tasking Real Time operating system kernel A Hardware Abstraction Layer (HAL) that abstracts the MCU's \nperipheral functions, allowing developers to easily write cross-platform\ncode.",
+ "text": "Apache Mynewt is an operating system that makes it easy to develop\napplications for microcontroller environments where power and cost \nare driving factors. Examples of these devices are connected locks, \nlights, and wearables. Microcontroller environments have a number of characteristics that \nmakes the operating system requirements for them unique: Low memory footprint: memory on these systems range from \n8-16KB (on the low end) to 16MB (on the high end). Reduced code size: code often runs out of flash, and total available code size ranges from 64-128KB to 16-32MB. Low processing speed: processor speeds vary from 10-12MHz to 160-200MHz. Low power operation: devices operate in mostly sleeping mode, in order to conserve\nbattery power and maximize power usage. As more and more devices get connected, these interconnected devices perform complex tasks. To\nperform these tasks, you need low-level operational functionality built into the opera
ting system.\nTypically, connected devices built with these microcontrollers perform a myriad of functions: Networking Stacks: Bluetooth Low Energy and Thread Peripherals: PWM to drive motors, ADCs to measure sensor data, and RTCs\nto keep time. Scheduled Processing: actions must happen on a calendared or periodic basis. Apache Mynewt accomplishes all the above easily, by providing a complete\noperating system for constrained devices, including: A fully open-source Bluetooth Low Energy stack with both Host and \nController implementations. A pre-emptive, multi-tasking Real Time operating system kernel A Hardware Abstraction Layer (HAL) that abstracts the MCU's \nperipheral functions, allowing developers to easily write cross-platform\ncode.",
"title": "Welcome to Apache Mynewt"
},
{
@@ -92,7 +92,7 @@
},
{
"location": "/os/get_started/introduction/#build-your-first-mynewt-app-with-newt",
- "text": "Before you start your first Mynewt application, you must first create a new Mynewt\napplication with the newt tool: $ newt new my_app\nDownloading application skeleton from https://git-wip-us.apache.org/repos/asf/incubator-mynewt-tadpole.git... ok!\nApplication my_app successfully created in /Users/mynewt/dev/my_app $ This new application contains the core of the operating system and the hardware abstraction layer, which all fits into less than 5KB of compiled code size. Once the application is created, you can then install the packages you need, as Mynewt will automatically download them, along with their dependencies into your application. For example, let's install a file system into the \"my_app\" application. First, we'll search for file system packages: $ newt pkg search fs Package list larva has package fs/nffs @0.8.0 Package list larva has package fs/fs @0.0.0 Package list larva has package project/ff
s2native @0.0.0 Once found, you can install the nffs package (Newtron Flash File System) with newt : $ newt pkg install fs/nffs\nDownloading larva from https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/master... ok!\nInstalling fs/nffs\nInstalling fs/fs\nInstallation was a success! At this point you have your first Mynewt application. And it's that simple! Mynewt contains all the packages and reusable software components you need to develop a device using a 32-bit \nMicrocontroller. And by providing a robust package management and build system, to help you build building blocks, Mynewt allows you to scale from 5KB of code size to MBs of compiled code size. Next, try doing your first project using newt. In the next section, Get Started , we guide you how get a LED on a target board blink. So get on with it!",
+ "text": "Before you start your first Mynewt application, you must first create a new Mynewt\nproject with the newt tool: $ newt new my_project\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in my_app...\nProject my_app successfully created. Newt populates this new project with a base skeleton of a new Apache Mynewt \nproject. It has the following structure: $ cd my_project $ tree -L 3\n.\n\u251c\u2500\u2500 DISCLAIMER\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 NOTICE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u251c\u2500\u2500 project.yml\n\u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u25
00\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml 6 directories, 10 files $ Once you've switched into your new project's directory, the next step is to fetch\nany dependencies this project has. By default, all Newt projects rely on a single\nremote repository, apache-mynewt-core. Newt install will fetch this locally: $ newt install\napache-mynewt-core $ NOTE: apache-mynewt-core may take a while to download, to see progress, use\nthe -v (verbose) option to install. Once newt install has successfully finished, the contents of apache-mynewt-core \nwill have been downloaded into your local directory. You can view them by issuing the \nfollowing commands in the base directory of the new project: $ cd repos/apache-mynewt-core $ tree -L2\n. snip \n\u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 nffs\n\u251c\u2500\u2500 hw\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 bsp\n\u2502\u00a0\u00a0 \u251c\u2500\u2500
hal\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 mcu\n\u251c\u2500\u2500 libs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 baselibc\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 bootutil\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 cmsis-core\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 console\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 elua\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 flash_test\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 imgmgr\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 json\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 mbedtls\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 newtmgr\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 os\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 shell\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 testreport\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 testutil\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 util\n\u251c\u2500\u2500 net\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 nimble snip As you can see, the core of the Apache Mynewt operating system has been brought \ninto your local directory! New projects created with Newt, come
with by default an example application \n( apps/blinky ) and an example target ( my_blinky_sim ) which allows you to \nbuild that application for the simulated platform. With your new project, all you need to build and run your new application is to \nissue the following commands: $ newt build my_blinky_sim \nCompiling base64.c\nCompiling cbmem.c\nCompiling datetime.c\nCompiling tpq.c\nArchiving util.a\nCompiling main.c\nArchiving blinky.a\nCompiling flash_map.c\nCompiling hal_flash.c\nArchiving hal.a\nCompiling cons_fmt.c\nCompiling cons_tty.c snip \nLinking blinky.elf\nApp successfully built: /Users/sterling/dev/tmp/my_app/bin/my_blinky_sim/apps/blinky/blinky.elf $ newt run my_blinky_sim ( runs target my_blinky_sim on the simulator ) At this point you have your first Mynewt application! Apache Mynewt has a lot more functionality than just running simulated applications. It provides all \nthe features you'll need to cross-compile your application, run it on real hardwar
e and develop a \nfull featured application. If you're interested in learning more, a good next step is to choose a project to Get Started with, and begin to familiarize \nyourself with operating within the newt environment. These projects will get your toolchain installed, \nand get you blinking an LED with the Apache Mynewt OS. After you've tried a few getting started projects, there are plenty of tutorials that will help \nexpose you to much of the functionality provided by the Apache Mynewt Core Operating System. There is \nalso full reference documentation for all of the Core Apache Mynewt APIs. Happy Hacking!",
"title": "Build your first Mynewt App with Newt"
},
{
@@ -142,7 +142,7 @@
},
{
"location": "/os/get_started/project_create/",
- "text": "Creating a Mynewt Project\n\n\nThis page shows how to create a Mynewt Project using \nnewt\n\n\nPre-Requisites\n\n\n\n\nEnsure you have installed \nnewt\n and that the \nnewt command is in your system path.\n\n\nYou must have Internet connectivity to fetch remote Mynewt components\n\n\nYou must \ninstall the compiler tools\n to \nsupport native compiling to build the project this tutorial creates. \n\n\n\n\nNewt New\n\n\nChose a project name. For this tutorial we will call this project \nmyproj\n.\nEnter the \nnewt new myproj\n command. Your put\n\n\n$ \nnewt new myproj\n\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nDownloading repository incubator-mynewt-blinky \n(\nbranch: develop\n)\n at https://github.com/apache/incubator-mynewt-blinky.git\nCloning into \n/var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/newt-repo290518149\n...\nremote: Counting objects: 727, \ndone\n.\nremote: Compressing objects: 100% \n(\n29/29\n)\n, \ndone\n.\nre
mote: Total \n727\n \n(\ndelta 7\n)\n, reused \n0\n \n(\ndelta 0\n)\n, pack-reused 696\nReceiving objects: 100% \n(\n727/727\n)\n, 201.64 KiB | \n0\n bytes/s, \ndone\n.\nResolving deltas: 100% \n(\n329/329\n)\n, \ndone\n.\nChecking connectivity... \ndone\n.\nInstalling skeleton in myproj...\nProject myproj successfully created\n\n\n\n\n\nThe \nnewt\n tool has created a project directory structure like the one below:\n\n\n\u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n
\u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml\n\n\n\n\n\nnewt\n has installed the base files for a project comprising the following.\n\n\n\n\nfile \nproject.yml\n contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components.\n\n\nthe file \napps/blinky/pkg.yml\n contains the description of your application\nand its package dependencies.\n\n\nA target directory containing \nmy_blinky_sim\n, a target descriptor used to\nbuild a version of myproj. Use \nnewt target show\n to see available build \ntargets.\n\n\nA non-build-able target called \nunittest\n. This is used\ninternally by \nnewt\n and is not a formal build target.\n\n\n\n\nNOTE: the actual code and
package files are not installed \n(except the template for \nmain.c\n. See the next step for installing \nthe packages.\n\n\nNewt Install\n\n\nchange into the \nmyproj\n directory. Then ask newt to install all the \nproject package dependencies using \nnewt install\n\n\n$ \nnewt install\n\nDownloading repository description \nfor\n apache-mynewt-core... success!\nDownloading repository incubator-mynewt-core \n(\nbranch: develop\n)\n at https://github.com/apache/incubator-mynewt-core.git\nCloning into \n/var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/newt-repo379645046\n...\nremote: Counting objects: 17684, \ndone\n.\nremote: Compressing objects: 100% \n(\n377/377\n)\n, \ndone\n.\nremote: Total \n17684\n \n(\ndelta 190\n)\n, reused \n0\n \n(\ndelta 0\n)\n, pack-reused 17284\nReceiving objects: 100% \n(\n17684/17684\n)\n, 6.11 MiB | 2.19 MiB/s, \ndone\n.\nResolving deltas: 100% \n(\n10395/10395\n)\n, \ndone\n.\nChecking connectivity... \ndone\n.\nRepos successfully installed\n\n$ \
n\n\n\n\n\n\nNow you will have installed packages required to build your project. Note in \nthe package you now have dependent packages stored in the \nrepos\n directory\nunder the specific repository you have included in the base project. \n\n\n.\n\u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n\u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest\n\n\n\n\n\n
Within each of these directories are the packages required to build your\nproject for the various targets.\n\n\nDo compiler stuff for Linux\n\n\nA current behavior on Linux requires that we copy a single file within this\nproject. \n\n\ncp repos/apache-mynewt-core/compiler/sim/linux-compiler.yml repos/apache-mynewt-core/compiler/sim/compiler.yml \n\n\n\n\n\nTesting the Project\n\n\nTo validate, you can also run all the units test through simulation.\n\n\nnewt test all\n...lots of compiling and testing...\n...about 2 minutes later ...\nArchiving bootutil.a\nLinking test_bootutil\nExecuting test: /myproj/bin/unittest/libs/bootutil/test_bootutil\nPassed tests: [net/nimble/host fs/nffs libs/os hw/hal libs/mbedtls libs/util sys/config libs/bootutil]\nAll tests passed\n\n\n\n\n\nBuilding the Project\n\n\nTo build the project you can use \nnewt build\n using the target \n\n\n$ \nnewt build targets/my_blinky_sim\nApp successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf\n\n\n\n\n\n
You can run the simulated version of your project and see the simulated LED\nblink\n\n\n./bin/my_blinky_sim/apps/blinky/blinky.elf\nhal_gpio set pin 1 to 0\n\n\n\n\n\nJust do \nctrl-c\n to exit.\n\n\nComplete\n\n\nCongratulations, you have created your first project. This project contains \nthe core OS, a simple application to blink an LED and all of the dependencies\nrequired.",
+ "text": "Creating a Mynewt Project\n\n\nThis page shows how to create a Mynewt Project using \nnewt\n\n\nPre-Requisites\n\n\n\n\nEnsure you have installed \nnewt\n and that the \nnewt command is in your system path.\n\n\nYou must have Internet connectivity to fetch remote Mynewt components\n\n\nYou must \ninstall the compiler tools\n to \nsupport native compiling to build the project this tutorial creates. \n\n\n\n\nNewt New\n\n\nChose a project name. For this tutorial we will call this project \nmyproj\n.\nEnter the \nnewt new myproj\n command. Your put\n\n\n$ \nnewt new myproj\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in myproj...\nProject myproj successfully created.\n\n\n\n\n\nThe \nnewt\n tool has created a project directory structure like the one below:\n\n\n\u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n
\u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml\n\n\n\n\n\nnewt\n has installed the base files for a project comprising the following.\n\n\n\n\nfile \nproject.yml\n contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components.\n\n\nthe file \napps/blinky/pk
g.yml\n contains the description of your application\nand its package dependencies.\n\n\nA target directory containing \nmy_blinky_sim\n, a target descriptor used to\nbuild a version of myproj. Use \nnewt target show\n to see available build \ntargets.\n\n\nA non-build-able target called \nunittest\n. This is used\ninternally by \nnewt\n and is not a formal build target.\n\n\n\n\nNOTE: the actual code and package files are not installed \n(except the template for \nmain.c\n. See the next step for installing \nthe packages.\n\n\nNewt Install\n\n\nchange into the \nmyproj\n directory. Then ask newt to install all the \nproject package dependencies using \nnewt install\n\n\n$ \nnewt install -v \napache-mynewt-core\nDownloading repository description \nfor\n apache-mynewt-core... success!\nDownloading repository incubator-mynewt-core \n(\nbranch: master; commit: mynewt_0_8_0_b2_tag\n)\n at https://github.com/apache/incubator-mynewt-core.git\nCloning into \n/var/folders/7l/7b3w9m4n2m
g3sqmgw2q1b9p80000gn/T/newt-repo969988348\n...\nremote: Counting objects: 17935, \ndone\n.\nremote: Compressing objects: 100% \n(\n234/234\n)\n, \ndone\n.\nremote: Total \n17935\n \n(\ndelta 101\n)\n, reused \n0\n \n(\ndelta 0\n)\n, pack-reused 17686\nReceiving objects: 100% \n(\n17935/17935\n)\n, 6.18 MiB | 315.00 KiB/s, \ndone\n.\nResolving deltas: 100% \n(\n10541/10541\n)\n, \ndone\n.\nChecking connectivity... \ndone\n.\napache-mynewt-core successfully installed version 0.7.9-none\n\n$ \n\n\n\n\n\n\nNow you will have installed packages required to build your project. Note in \nthe package you now have dependent packages stored in the \nrepos\n directory\nunder the specific repository you have included in the base project. \n\n\n.\n\u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n\u
2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n\u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest\n\n\n\n\n\nWithin each of these directories are the packages required to build your\nproject for the various targets.\n\n\nTesting the Project\n\n\nTo validate, you can also run all the units test through simulation.\n\n\nnewt test all\n...lots of compiling and testing...\n...about 2 minutes later ...\nArchiving bootutil.a\nLinking test_bootutil\nExecuting test: /myproj/bin/unittest/libs/bootutil/test_bootutil\nPassed tests: [net/nimble/host fs/nffs libs/os hw/hal libs/mbedtls libs/util sys/config libs/bootu
til]\nAll tests passed\n\n\n\n\n\nBuilding the Project\n\n\nTo build the project you can use \nnewt build\n using the target \n\n\n$ \nnewt build my_blinky_sim\nApp successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf\n\n\n\n\n\nYou can run the simulated version of your project and see the simulated LED\nblink\n\n\n./bin/my_blinky_sim/apps/blinky/blinky.elf\nhal_gpio set pin 1 to 0\n\n\n\n\n\nJust do \nctrl-c\n to exit.\n\n\nComplete\n\n\nCongratulations, you have created your first project. This project contains \nthe core OS, a simple application to blink an LED and all of the dependencies\nrequired.",
"title": "Creating Your First Project"
},
{
@@ -157,27 +157,22 @@
},
{
"location": "/os/get_started/project_create/#newt-new",
- "text": "Chose a project name. For this tutorial we will call this project myproj .\nEnter the newt new myproj command. Your put $ newt new myproj\n\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nDownloading repository incubator-mynewt-blinky ( branch: develop ) at https://github.com/apache/incubator-mynewt-blinky.git\nCloning into /var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/newt-repo290518149 ...\nremote: Counting objects: 727, done .\nremote: Compressing objects: 100% ( 29/29 ) , done .\nremote: Total 727 ( delta 7 ) , reused 0 ( delta 0 ) , pack-reused 696\nReceiving objects: 100% ( 727/727 ) , 201.64 KiB | 0 bytes/s, done .\nResolving deltas: 100% ( 329/329 ) , done .\nChecking connectivity... done .\nInstalling skeleton in myproj...\nProject myproj successfully created The newt tool has created a project directory structure like the one below: \u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u
251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml newt has installed the base files for a project comprising the following. file project.yml contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more reposit
ories\nto include other mynewt components. the file apps/blinky/pkg.yml contains the description of your application\nand its package dependencies. A target directory containing my_blinky_sim , a target descriptor used to\nbuild a version of myproj. Use newt target show to see available build \ntargets. A non-build-able target called unittest . This is used\ninternally by newt and is not a formal build target. NOTE: the actual code and package files are not installed \n(except the template for main.c . See the next step for installing \nthe packages.",
+ "text": "Chose a project name. For this tutorial we will call this project myproj .\nEnter the newt new myproj command. Your put $ newt new myproj\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in myproj...\nProject myproj successfully created. The newt tool has created a project directory structure like the one below: \u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500
target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml newt has installed the base files for a project comprising the following. file project.yml contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components. the file apps/blinky/pkg.yml contains the description of your application\nand its package dependencies. A target directory containing my_blinky_sim , a target descriptor used to\nbuild a version of myproj. Use newt target show to see available build \ntargets. A non-build-able target called unittest . This is used\ninternally by newt and is not a formal build target. NOTE: the actual code and package files are not installed \n(except the template for main.c . See the next step f
or installing \nthe packages.",
"title": "Newt New"
},
{
"location": "/os/get_started/project_create/#newt-install",
- "text": "change into the myproj directory. Then ask newt to install all the \nproject package dependencies using newt install $ newt install\n\nDownloading repository description for apache-mynewt-core... success!\nDownloading repository incubator-mynewt-core ( branch: develop ) at https://github.com/apache/incubator-mynewt-core.git\nCloning into /var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/newt-repo379645046 ...\nremote: Counting objects: 17684, done .\nremote: Compressing objects: 100% ( 377/377 ) , done .\nremote: Total 17684 ( delta 190 ) , reused 0 ( delta 0 ) , pack-reused 17284\nReceiving objects: 100% ( 17684/17684 ) , 6.11 MiB | 2.19 MiB/s, done .\nResolving deltas: 100% ( 10395/10395 ) , done .\nChecking connectivity... done .\nRepos successfully installed $ Now you will have installed packages required to build your project. Note in \nthe package you now have dependent packages stored in the repos directory\nunder the specific
repository you have included in the base project. .\n\u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n\u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest Within each of these directories are the packages required to build your\nproject for the various targets.",
+ "text": "change into the myproj directory. Then ask newt to install all the \nproject package dependencies using newt install $ newt install -v \napache-mynewt-core\nDownloading repository description for apache-mynewt-core... success!\nDownloading repository incubator-mynewt-core ( branch: master; commit: mynewt_0_8_0_b2_tag ) at https://github.com/apache/incubator-mynewt-core.git\nCloning into /var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348 ...\nremote: Counting objects: 17935, done .\nremote: Compressing objects: 100% ( 234/234 ) , done .\nremote: Total 17935 ( delta 101 ) , reused 0 ( delta 0 ) , pack-reused 17686\nReceiving objects: 100% ( 17935/17935 ) , 6.18 MiB | 315.00 KiB/s, done .\nResolving deltas: 100% ( 10541/10541 ) , done .\nChecking connectivity... done .\napache-mynewt-core successfully installed version 0.7.9-none $ Now you will have installed packages required to build your project. Note in \nthe package
you now have dependent packages stored in the repos directory\nunder the specific repository you have included in the base project. .\n\u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n\u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest Within each of these directories are the packages required to build your\nproject for the various targets.",
"title": "Newt Install"
},
{
- "location": "/os/get_started/project_create/#do-compiler-stuff-for-linux",
- "text": "A current behavior on Linux requires that we copy a single file within this\nproject. cp repos/apache-mynewt-core/compiler/sim/linux-compiler.yml repos/apache-mynewt-core/compiler/sim/compiler.yml",
- "title": "Do compiler stuff for Linux"
- },
- {
"location": "/os/get_started/project_create/#testing-the-project",
"text": "To validate, you can also run all the units test through simulation. newt test all\n...lots of compiling and testing...\n...about 2 minutes later ...\nArchiving bootutil.a\nLinking test_bootutil\nExecuting test: /myproj/bin/unittest/libs/bootutil/test_bootutil\nPassed tests: [net/nimble/host fs/nffs libs/os hw/hal libs/mbedtls libs/util sys/config libs/bootutil]\nAll tests passed",
"title": "Testing the Project"
},
{
"location": "/os/get_started/project_create/#building-the-project",
- "text": "To build the project you can use newt build using the target $ newt build targets/my_blinky_sim\nApp successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf You can run the simulated version of your project and see the simulated LED\nblink ./bin/my_blinky_sim/apps/blinky/blinky.elf\nhal_gpio set pin 1 to 0 Just do ctrl-c to exit.",
+ "text": "To build the project you can use newt build using the target $ newt build my_blinky_sim\nApp successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf You can run the simulated version of your project and see the simulated LED\nblink ./bin/my_blinky_sim/apps/blinky/blinky.elf\nhal_gpio set pin 1 to 0 Just do ctrl-c to exit.",
"title": "Building the Project"
},
{
@@ -226,91 +221,31 @@
"title": "Install OpenOCD"
},
{
- "location": "/os/get_started/project1/",
- "text": "Blinky, Your Hello World!\n\n\nObjective\n\n\nLearn how to use packages from a default application repository of Mynewt to build your first \nHello World\n application (Blinky) in the safe haven of a simulation. \n\n\nThis tutorial will guide to achieve the following: \n\n\n\n\nSet up the environment on your computer to use Mynewt OS and newt tool. \n\n\nDownload packages for building and testing the project \non a simulated target\n.\n\n\n\n\n Time Requirement\n: Allow yourself an hour for this project if you are relatively new to embedded systems and want to understand each step.\n\n\nWhat you need\n\n\n\n\nPersonal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)\n\n\nAn account on Github repository and \ngit\n installed on your computer.\n\n\nIt assumed you already installed native tools described \nhere\n\n\n\n\nAlso, we assume that you're familiar with UNIX shells.\n\n\nLet's gets started!\n\n\nInstall N
ative and Cross Tools\n\n\nSee \nInstalling Native Tools\n\n and \nInstalling Cross Tools\n for ARM to install\nthe tools needed by newt.\n\n\nInstall newt tool\n\n\nThere are two ways to install the \nnewt\n tool on your computer. The easy way (and the recommeded way for this project) is to download the respective \nnewt\n binaries from the links below:\n\n Mac OS \n\n Linux\n\n\nInclude the \nnewt\n in your $PATH.\n\n\nOr if you're an adventurer then you can set up the environment on your computer, install the Go language, and build the \nnewt\n tool from source as explained in the tutorials in the Newt Tool Manual. See \nInstall newt from source on Mac\n and \nInstall newt from source on Linux\n.\n\n\nBuild test code on simulator\n\n\n1. Clone the larva repository from the Apache git repository into a local directory named \nlarva\n.\n\n\n $ cd ~/dev \n $ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva\n $ ls\n\n go
larva\n $ ls larva\n DISCLAIMER NOTICE app.yml compiler hw net project sys\n LICENSE README.md autotargets fs libs pkg-list.yml scripts\n\n\n\n\n\n2. Create a target using the newt tool. \n\n\n $ cd larva\n $ newt target create sim_test\n Creating target sim_test\n Target sim_test sucessfully created!\n $ newt target show\n sim_test\n name: sim_test\n arch: sim\n\n\n\n\n\n3. Now continue to populate and build out the sim target. \n\n\n $ newt target set sim_test project=test\n Target sim_test successfully set project to test\n $ newt target set sim_test compiler_def=debug\n Target sim_test successfully set compiler_def to debug\n $ newt target set sim_test bsp=hw/bsp/native\n Target sim_test successfully set bsp to hw/bsp/native\n $ newt target set sim_test compiler=sim\n Target sim_test successfully set c
ompiler to sim\n $ newt target show sim_test\n sim_test\n arch=sim\n bsp=hw/bsp/native\n compiler=sim\n compiler_def=debug\n name=sim_test\n project=test\n\n\n\n\n\n4. Configure \nnewt\n to use the gnu build tools native to OS X or Linux. In order for sim to work properly, it needs the 32-bit gcc (gcc-5). Replace \n~/dev/larva/compiler/sim/compiler.yml\n with the \ncompiler/sim/osx-compiler.yml\n or \nlinux-compiler.yml\n file, depending on the system. On a Windows machine, follow the instruction for the Linux machine as you are running commands in a Linux VM.\n\n\nFor a Mac OS X environment:\n\n\n $ cp compiler/sim/osx-compiler.yml compiler/sim/compiler.yml \n\n\n\n\n\nFor a Linux machine:\n\n\n $ cp compiler/sim/linux-compiler.yml compiler/sim/compiler.yml\n\n\n\n\n\n5. Next, build the packages for the sim project using the \nnewt\n tool. You should see lots of console output while \nnewt
\n is resolving dependencies and compiling the source code. After a minute, it should complete with \nthe \nSuccessfully run!\n text.\n\n\n $ newt target build sim_test\n Building target sim_test (project = test)\n ...\n ...\n Successfully run!\n\n\n\n\n\nFor extra details, specify the VERBOSE option.\n\n\n $\nnewt\n -l VERBOSE target build sim_test\n 2015/09/29 09:46:12 [INFO] Building project test\n 2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//bootutil...\n 2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//cmsis-core...\n 2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//ffs..\n ...\n Successfully run!\n\n\n\n\n\n6. Run the test suite executable inside this project and enjoy your first successful test!\n\n\n $ project/test/bin/sim_test/test.elf\n [pass] os_mempool_test_suite/os_mempool_test_ca
se\n [pass] os_mutex_test_suite/os_mutex_test_basic\n [pass] os_mutex_test_suite/os_mutex_test_case_1\n ...\n ...\n [pass] cbmem_test_suite/cbmem_test_case_3\n\n\n\n\n\nConclusion\n\n\nIn summation, you achieved and learned a fair amount in this hands-on tutorial, all in the simulation environment. \n\n\nNow you can turn to more fun tutorials where you can get your hands dirty with actual hardware. Be bold and try the Blinky \ntutorials on Olimex board\n.\n\n\nIf you see anything missing or want to send us feeback, please do so by signing up for appropriate mailing lists on our \nCommunity Page\n\n\nKeep on hacking and blinking!",
- "title": "Blinky, The First Hardware in Simulation"
- },
- {
- "location": "/os/get_started/project1/#blinky-your-hello-world",
- "text": "",
- "title": "Blinky, Your Hello World!"
- },
- {
- "location": "/os/get_started/project1/#objective",
- "text": "Learn how to use packages from a default application repository of Mynewt to build your first Hello World application (Blinky) in the safe haven of a simulation. This tutorial will guide to achieve the following: Set up the environment on your computer to use Mynewt OS and newt tool. Download packages for building and testing the project on a simulated target . Time Requirement : Allow yourself an hour for this project if you are relatively new to embedded systems and want to understand each step.",
- "title": "Objective"
- },
- {
- "location": "/os/get_started/project1/#what-you-need",
- "text": "Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn) An account on Github repository and git installed on your computer. It assumed you already installed native tools described here Also, we assume that you're familiar with UNIX shells. Let's gets started!",
- "title": "What you need"
- },
- {
- "location": "/os/get_started/project1/#install-native-and-cross-tools",
- "text": "See Installing Native Tools \n and Installing Cross Tools for ARM to install\nthe tools needed by newt.",
- "title": "Install Native and Cross Tools"
- },
- {
- "location": "/os/get_started/project1/#install-newt-tool",
- "text": "There are two ways to install the newt tool on your computer. The easy way (and the recommeded way for this project) is to download the respective newt binaries from the links below: Mac OS Linux Include the newt in your $PATH. Or if you're an adventurer then you can set up the environment on your computer, install the Go language, and build the newt tool from source as explained in the tutorials in the Newt Tool Manual. See Install newt from source on Mac and Install newt from source on Linux .",
- "title": "Install newt tool"
- },
- {
- "location": "/os/get_started/project1/#build-test-code-on-simulator",
- "text": "1. Clone the larva repository from the Apache git repository into a local directory named larva . $ cd ~/dev \n $ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva\n $ ls\n\n go larva\n $ ls larva\n DISCLAIMER NOTICE app.yml compiler hw net project sys\n LICENSE README.md autotargets fs libs pkg-list.yml scripts 2. Create a target using the newt tool. $ cd larva\n $ newt target create sim_test\n Creating target sim_test\n Target sim_test sucessfully created!\n $ newt target show\n sim_test\n name: sim_test\n arch: sim 3. Now continue to populate and build out the sim target. $ newt target set sim_test project=test\n Target sim_test successfully set project to test\n $ newt target set sim_test compiler_def=debug\n Target sim_test successfully
set compiler_def to debug\n $ newt target set sim_test bsp=hw/bsp/native\n Target sim_test successfully set bsp to hw/bsp/native\n $ newt target set sim_test compiler=sim\n Target sim_test successfully set compiler to sim\n $ newt target show sim_test\n sim_test\n arch=sim\n bsp=hw/bsp/native\n compiler=sim\n compiler_def=debug\n name=sim_test\n project=test 4. Configure newt to use the gnu build tools native to OS X or Linux. In order for sim to work properly, it needs the 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. On a Windows machine, follow the instruction for the Linux machine as you are running commands in a Linux VM. For a Mac OS X environment: $ cp compiler/sim/osx-compiler.yml compiler/sim/compiler.yml For a Linux machine: $
cp compiler/sim/linux-compiler.yml compiler/sim/compiler.yml 5. Next, build the packages for the sim project using the newt tool. You should see lots of console output while newt is resolving dependencies and compiling the source code. After a minute, it should complete with \nthe Successfully run! text. $ newt target build sim_test\n Building target sim_test (project = test)\n ...\n ...\n Successfully run! For extra details, specify the VERBOSE option. $ newt -l VERBOSE target build sim_test\n 2015/09/29 09:46:12 [INFO] Building project test\n 2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//bootutil...\n 2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//cmsis-core...\n 2015/09/29 09:46:12 [INFO] Loading Package /Users/aditihilbert/dev/larva/libs//ffs..\n ...\n Successfully run! 6. Run the test suite executable inside this pr
oject and enjoy your first successful test! $ project/test/bin/sim_test/test.elf\n [pass] os_mempool_test_suite/os_mempool_test_case\n [pass] os_mutex_test_suite/os_mutex_test_basic\n [pass] os_mutex_test_suite/os_mutex_test_case_1\n ...\n ...\n [pass] cbmem_test_suite/cbmem_test_case_3",
- "title": "Build test code on simulator"
- },
- {
- "location": "/os/get_started/project1/#conclusion",
- "text": "In summation, you achieved and learned a fair amount in this hands-on tutorial, all in the simulation environment. Now you can turn to more fun tutorials where you can get your hands dirty with actual hardware. Be bold and try the Blinky tutorials on Olimex board . If you see anything missing or want to send us feeback, please do so by signing up for appropriate mailing lists on our Community Page Keep on hacking and blinking!",
- "title": "Conclusion"
- },
- {
"location": "/os/get_started/vocabulary/",
- "text": "Concepts\n\n\nApplication repository or app\n\n\nThe application repository (app) is the base directory of your embedded software. It is a workspace containing a logical collection of the source code for one or more of your \nprojects\n. An app can contain multiple projects, and reflects multiple end products. \n\n\nAs the base repository of your source code, the app has a master branch and several other branches off it. The \nmaster\n is typically what developers commit to. Just before your code is ready for a release, a code freeze should prevent all commits to the \nmaster\n branch. However, a temporary \ndevelop\n branch is opened up for contributors to continue committing their code. When the release is tagged off the \nmaster\n, the \ndevelop\n branch is merged into \nmaster\n. And after the \ndevelop\n merge to the \nmaster\n, developers may resume commiting changes to \nmaster\n, and the \ndevelop\n branch is subsequently deleted.\n\n\nAlternatively, you
may choose to create your own branch, specific to an individual developer, and work there.\n\n\nYou can have several \nprojects\n in your app repository, since an application can be used in several projects. Each project in your app will, in turn, consist of several \npackages\n. A project could be a package itself as well. In addition to packages, your app repository will contain additional items such as \ntarget\n or build definitions, \npackage list\n description files, scripts etc.\n\n\nFor example, a walk through the main app at \nhttps://github.com/apache/incubator-mynewt-larva\n shows the structure of the repository. The app.yml file in the larva directory indicates that it is an app. A pkg will have the pkg.yml file in it as shown below. By this nomenclature, each board support package for a particular chip is a pkg; for instance, the API for the hardware abstraction layer is a pkg, and so on. \n\n\nlarva\n |- app.yml \n |- compiler\n |- arm-none-eabi-m0\n |
- arm-none-eabi-m4\n |- sim\n |- hw (hardware)\n |- bsp (board support package)\n |- nrf52pdk (Nordic nRF52 series chip)\n |- pkg.yml\n |- ...\n |- olimex_stm32-e407_devboard (used in Project Blinky)\n |- pkg.yml\n |- ...\n |- nrf51dk\n |- pkg.yml\n |- ...\n |- yet another board\n |- pkg.yml\n |- ...\n |- hal (hardware abstraction layer APIs)\n |- pkg.yml\n |- include\n |- hal_cputime.h\n |- hal_flash.h\n |- hal_gpio.h\n |- ... (header files for other peripherals)\n |- src\n |- flash_map.c\n |- ... (other files)\n |- mcu (microcontroll
er)\n |- stm (STMicro family)\n |- stm32f3xx (STM32f3 series, 32-bit ARM Cortex-M4 core)\n |- pkg.yml\n |- src\n |- hal_gpio.c (specific to the STM32f3 mcu)\n |- hal_cputime.c\n |- ... (code for other peripherals)\n |- nordic (Nordic Semiconductor family)\n |- nrf52xxx (nRF52 Series SoC, Cortex-M4F core)\n |- pkg.yml\n |- src\n |- hal_gpio.c (specific to the nRF52 mcu )\n |- hal_cputime.c\n |- ... (code for other peripherals)\n |- yet another family of mcu\n |- ...\n |- libs\n |- bootutil (hw architecture independent boot loader library)\n |- pkg.yml\n |- src\n |- loader.c\n
|- ... (related source code files)\n |- nffs (hw architecture independent Newtron Flash File System)\n |- pkg.yml\n |- src\n |- nffs.c\n |- ... (related source code files)\n |- another library \n |- pkg.yml\n |- src\n |- ... (related source code files)\n |- project\n |- scripts\n |- net/nimble (BLE stack)\n |- ... (additional modules or stacks)\n\n\n\n\n\nThe \nnewt\n tool offers the \napp\n sub command to create and manage apps. In general, commands represent actions, and flags act as modifiers for specfied actions. A \nnewt\n command can have subcommands and it can optionally run an action. A full description of the \napp\n command can be found in the \nNewt Tool Manual\n.\n\n\n newt app [flags]\n newt app [child-commands] \n\n\n\n\n\nA complete list of all the app subcommands can be found in the \nnewt\n tool reference in \
nNewt Tool\n.\n\n\nProject\n\n\nProjects represent individual build configurations of your embedded system and (individually or collectively) comprise your application. The project files dictate the generated binary. \n\n\nA project is laid out as a directory inside an app and contains required packages for an application. For example, the \nblinky\n pkg sits in \nproject/blinky\n directory of the \nlarva\n app. This pkg is used in the blinky project (an application) outlined in \nGet Started\n.\n\n\nAssociated with each project are properties. These properties are defined in the\nproject-name\n.yml\n file in the project directory. For example, the \nproject/blinky\n directory has the \nblinky.yml\n file indicating some or all of the properties disscused below. Only the name of a project is required for the project to exist; however, additional properties may be specified for the pkgs within it to produce an executable. \n\n\n\n\nProject name\n\n\nBase path of the project (app/proje
ct/project-name by default)\n\n\nPkgs belonging to the project\n\n\nCapabilities\n that are required for the project or target \n\n\nIdentity\n to classify the type of project or target\n\n\nCompiler flags to call out any specific compiler requirements\n\n\n\n\nAlso, a project itself could be a pkg if it is a distributable package for a specific application. That is, the pkg can be resued in other apps as a bundle of libraries.\n\n\nTo work with pkgs, the \nnewt\n tool offers management commands that you can use with your project. For example, if your project is a pkg, you can use the following command to install a project from an app.\n\n\n newt pkg install [flags] \nproject pkg name\n\n\n\n\n\n\nOther commands associated with pkg are:\n\n\n newt pkg list\n newt pkg checkdeps\n newt pkg search \npkg-name\n\n newt pkg show [\npkg-list\n ] \npkg-name\n\n newt pkg install [\npkg-list\n ] \npkg-name\n\n newt pkg remove [\npkg-list\n ] \npkg-name\n\n\n\n\n\n\nPackage or pkg\n\n
\nA package (pkg) is a distributable bundle of libraries. Just as an egg in nature has various parts, each serving a certain purpose, a Mynewt app consists of software modules that have different functions. However, unlike the egg in nature these modules can exist by itself and may be distributed; therefore, they too are essentially eggs. Once this analogy is grasped it is easy to see how a pkg may consist of other pkgs.\n\n\nThe two main directories in a pkg are \n/include\n and \n/src\n.\n\n\nThe \nnewt\n tool offers several pkg commands as shown above. For example, you can list all the pkgs\n\n\n newt pkg list \n\n\n\n\n\nIt lists all the pkgs in the current app where each pkg has details, such as version, path, and dependencies. A sample output for a pkg is given below:\n\n\n Package: libs/os, version 0.1.0\n path: /Users/aditihilbert/dev/test_project/libs/os\n deps: libs/testutil@none#stable \n\n\n\n\n\nFor a comprehensive list of all pkg commands, consult the \nnew
t\n tool reference in \nNewt Tool\n.\n\n\nPackage list or pkg-list\n\n\nA pkg-list is a snapshot of all pkgs in a remote app at any point in time. On any given github branch, an app with a pkg-list of pkgs will contain a \npkg-list.yml\n file that specifies the version number, dependencies, and hash value for each constituent pkg as well as the name of the entire pkg-list and the github url for it. [Note: Currently ]\n\n\nYou may download multiple pkg-lists into your local app as long as the names of the pkg-lists are different. This allows you to mix and match various features and functionality coming from different pkg-lists of pkgs. You can see all the pkg-lists in the \n.app/pkg-lists\n directory in your app.\n\n\nAs with pkgs, the \nnewt\n tool offers pkg-list management commands within the \nnewt app\n command. For example, the following command creates a new pkg-list using all the pkgs in the current directory. It requires that a pkg-list name be specified and the url for the
location of that pkg-list in the remote repository. These two inputs go into the \npkg-list.yml\n file in an app.\n\n\n newt app generate-pkg-list \npkg-list-name\n \npkg-list-url\n\n\n\n\n\n\nNote\n: A pkg-list for a project stipulates all pkgs that belong together that must be installed as project's source code.\n\n\nTarget\n\n\nA target is the hardware build or its software equivalent (e.g. test, simulator) set for a project. Targets instruct the \nnewt\n tool how to build the source code within a given app. Once a new target is created, its architecture and other details can be set manually. An example of a defined target named \"blink_f3disc\" is given below.\n\n\n blink_f3disc\n compiler_def: debug\n compiler: arm-none-eabi-m4\n name: blink_f3disc\n arch: cortex_m4\n project: blinky\n bsp: hw/bsp/stm32f3discovery\n\n\n\n\n\nTo that end, \nnewt\n tool offers commands to create, set and manipulate tar
gets. For example, the create command below creates an empty target named \nmy_target1\n and the set command sets one attribute of its definition, namely the architecture.\n\n\n newt target create my_target1\n newt target set my_target1 arch=cortex_m4\n\n\n\n\n\nCapability\n\n\nCapability, as the name suggests, is functionality that is exposed by a pkg. A capability is tracked by its name and version. In some cases, a pkg may require capabilities exposed by another pkg, thus establishing a dependency, which is tracked through the pkg.yml files. \n\n\nWith \nnewt\n tool you can verify a map of pkgs' capabilities, use it to check dependencies, and ensure all the necessary pkgs in a project belong to its target.\n\n\nIdentity\n\n\nIdentity is a property of a target or project in the \nnewt\n world. A target may inherit its identify from a project or vice versa. It may be used to determine what pkgs to include or how a pkg code should behave in a build or which linkerscripts to us
e. For example, the identity of a lock device is different from the identity of a wearable monitor. Even if they were built on the same hardware target, different features and behaviors are required. Because of this distinction, a distinct sets of pkgs in the projects and/or the same pkg will behave differently, depending on its identity.",
+ "text": "Concepts\n\n\nThis page is meant to introduce you to some of the concepts inherent to \nthe Apache Mynewt Operating System, and \nNewt\n the tool that stitches a \nproject built on Apache Mynewt together.\n\n\nProject\n\n\nThe project is the base directory of your embedded software tree. It is a \nworkspace that contains a logical collection of source code, for one or \nmore of your applications. A project consists of the following items:\n\n\n\n\nProject Definition: defines project level dependencies, and parameters\n (located in \nproject.yml\n)\n\n\nPackages\n\n\n\n\nPackages\n are described in detail in the section below. \n\n\nHere is an example project definition file from the default Apache Mynewt \nproject: \n\n\n$ \nmore project.yml \n\nsnip\n\nproject.name: \nmy_project\n\n\nproject.repositories:\n - apache-mynewt-core\n\n\n# Use github\ns distribution mechanism for core ASF libraries.\n\n\n# This provides mirroring automatically for us.\n\n\n
#\n\nrepository.apache-mynewt-core:\n \ntype\n: github\n vers: 0-latest\n user: apache\n repo: incubator-mynewt-core\n\n$ \n\n\n\n\n\n\nA couple of things to note in the project definition:\n\n\n\n\n\n\nproject.repositories\n: Defines the remote repositories that this project\nrelies upon.\n\n\n\n\n\n\nrepository.apache-mynewt-core\n: Defines the repository information for \nthe \napache-mynewt-core\n repository.\n\n\n\n\n\n\nRepositories are versioned collections of packages. \n\n\nProjects can rely on remote repositories for functionality, and the newt tool \nwill resolve those remote repositories, and download the correct version into \nyour local source tree. Newly fetched repositories are put in the \nrepos\n\ndirectory of your project, and can be referenced throughout the system by using\nthe \n@\n specifier. \n\n\nBy default, the \n@apache-mynewt-core\n repository is included in every \nproject. Apache Mynewt Core contains all the base functionality of the Apa
che \nMynewt Operating System, including the Real Time Kernel, Bluetooth Networking \nStack, Flash File System, Console, Shell and Bootloader.\n\n\nNOTE:\n Any project can be converted into a repository by providing it with a \n\nrepository.yml\n file and putting it up onto Github. More information\nabout repositories can be found in the Newt documentation.\n\n\nPackage\n\n\nA package is a collection items that form a fundamental unit in the Mynewt \nOperating System. Packages can be:\n\n\n\n\nApplications\n\n\nLibraries\n\n\nCompiler definitions\n\n\nTargets\n\n\n\n\nA package is identified by having a \npkg.yml\n file in it's base \ndirectory. Here is a sample \npkg.yml\n file for the blinky applicaton:\n\n\n$ \nmore pkg.yml \n\nsnip\n\npkg.name: apps/blinky\npkg.type: app\npkg.description: Basic example application which blinks an LED.\npkg.author: \nApache Mynewt \ndev@mynewt.incubator.apache.org\n\npkg.homepage: \nhttp://mynewt.apache.org/\n\npkg.keywords:\n\npkg.deps:\n
- \n@apache-mynewt-core/libs/os\n\n - \n@apache-mynewt-core/hw/hal\n\n - \n@apache-mynewt-core/libs/console/full\n\n\n\n\n\n\nPackages have a few features worth noting:\n\n\n\n\nDependencies: Packages can rely upon other packages, and when they do\n they will inherit their functionality (header files, library definitions, etc.)\n\n\nAPIs: Packages can export named APIs, and they can require that certain \n APIs be present, in order to compile.\n\n\nFeatures: Packages can operate differently depending on what named features are \n present in the system. Packages can also export features to the rest of the \n Mynewt system.\n\n\n\n\nEverything that newt knows about within a project's directory is a package. This \nmakes it very clean and easy to write re-usable components, which can describe their \nDependencies and APIs to the rest of the system.\n\n\nTarget\n\n\nA target in Apache Mynewt is very similar to a target in \nmake\n. It is the collection\nof parameter
s that must be passed to Newt in order to generate a reproducable build. A \ntarget represents the top of the build tree, and any packages or parameters specified at \nthe target level, cascade down to all dependencies.\n\n\nTargets are also packages, and are stored in the \ntargets/\n directory at the base \nof your project. Most targets consist of: \n\n\n\n\napp\n: The application to build.\n\n\nbsp\n: The board support package to combine with that application\n\n\nbuild_profile\n: Either \ndebug\n or \noptimized\n. \n\n\n\n\nTargets can also have additional items specified, including: \n\n\n\n\ncflags\n: Any additional compiler flags you might want to specify to the build.\n\n\nfeatures\n: Any system level features you want to enable.\n\n\n\n\nIn order to create and manipulate targets, the \nnewt\n tool offers a set of helper commands,\nyou can find more information about these by issuing:\n\n\n$ \nnewt target\n\nUsage: \n newt target \n[\nflags\n]\n\n newt target \n[\ncomman
d\n]\n\n\nAvailable Commands: \n show View target configuration variables\n \nset \nSet target configuration variable\n create Create a target\n delete Delete target\n copy Copy target\n vars Show variable names\n\nFlags:\n -h, --help\n=\nfalse\n: \nhelp for\n target\n\nGlobal Flags:\n -l, --loglevel\n=\nWARN\n: Log level, defaults to WARN.\n -o, --outfile\n=\n: Filename to tee log output to\n -q, --quiet\n=\nfalse\n: Be quiet; only display error output.\n -s, --silent\n=\nfalse\n: Be silent; don\nt output anything.\n -v, --verbose\n=\nfalse\n: Enable verbose output when executing commands.\n\nAdditional \nhelp \ntopics:\n\n\nUse \nnewt help [command]\n \nfor\n more information about a command.\n\n$",
"title": "toc"
},
{
"location": "/os/get_started/vocabulary/#concepts",
- "text": "",
+ "text": "This page is meant to introduce you to some of the concepts inherent to \nthe Apache Mynewt Operating System, and Newt the tool that stitches a \nproject built on Apache Mynewt together.",
"title": "Concepts"
},
{
- "location": "/os/get_started/vocabulary/#application-repository-or-app",
- "text": "The application repository (app) is the base directory of your embedded software. It is a workspace containing a logical collection of the source code for one or more of your projects . An app can contain multiple projects, and reflects multiple end products. As the base repository of your source code, the app has a master branch and several other branches off it. The master is typically what developers commit to. Just before your code is ready for a release, a code freeze should prevent all commits to the master branch. However, a temporary develop branch is opened up for contributors to continue committing their code. When the release is tagged off the master , the develop branch is merged into master . And after the develop merge to the master , developers may resume commiting changes to master , and the develop branch is subsequently deleted. Alternatively, you may choose to create your own branch, specific to an individual developer, and
work there. You can have several projects in your app repository, since an application can be used in several projects. Each project in your app will, in turn, consist of several packages . A project could be a package itself as well. In addition to packages, your app repository will contain additional items such as target or build definitions, package list description files, scripts etc. For example, a walk through the main app at https://github.com/apache/incubator-mynewt-larva shows the structure of the repository. The app.yml file in the larva directory indicates that it is an app. A pkg will have the pkg.yml file in it as shown below. By this nomenclature, each board support package for a particular chip is a pkg; for instance, the API for the hardware abstraction layer is a pkg, and so on. larva\n |- app.yml \n |- compiler\n |- arm-none-eabi-m0\n |- arm-none-eabi-m4\n |- sim\n |- hw (hardware)\n |- bsp (board support package)\n
|- nrf52pdk (Nordic nRF52 series chip)\n |- pkg.yml\n |- ...\n |- olimex_stm32-e407_devboard (used in Project Blinky)\n |- pkg.yml\n |- ...\n |- nrf51dk\n |- pkg.yml\n |- ...\n |- yet another board\n |- pkg.yml\n |- ...\n |- hal (hardware abstraction layer APIs)\n |- pkg.yml\n |- include\n |- hal_cputime.h\n |- hal_flash.h\n |- hal_gpio.h\n |- ... (header files for other peripherals)\n |- src\n |- flash_map.c\n |- ... (other files)\n |- mcu (microcontroller)\n |- stm (STMicro family)\n |- stm32f3xx (STM32f3 series, 32-bi
t ARM Cortex-M4 core)\n |- pkg.yml\n |- src\n |- hal_gpio.c (specific to the STM32f3 mcu)\n |- hal_cputime.c\n |- ... (code for other peripherals)\n |- nordic (Nordic Semiconductor family)\n |- nrf52xxx (nRF52 Series SoC, Cortex-M4F core)\n |- pkg.yml\n |- src\n |- hal_gpio.c (specific to the nRF52 mcu )\n |- hal_cputime.c\n |- ... (code for other peripherals)\n |- yet another family of mcu\n |- ...\n |- libs\n |- bootutil (hw architecture independent boot loader library)\n |- pkg.yml\n |- src\n |- loader.c\n |- ... (related source code files)\n |- nffs (hw architecture independent Ne
wtron Flash File System)\n |- pkg.yml\n |- src\n |- nffs.c\n |- ... (related source code files)\n |- another library \n |- pkg.yml\n |- src\n |- ... (related source code files)\n |- project\n |- scripts\n |- net/nimble (BLE stack)\n |- ... (additional modules or stacks) The newt tool offers the app sub command to create and manage apps. In general, commands represent actions, and flags act as modifiers for specfied actions. A newt command can have subcommands and it can optionally run an action. A full description of the app command can be found in the Newt Tool Manual . newt app [flags]\n newt app [child-commands] A complete list of all the app subcommands can be found in the newt tool reference in Newt Tool .",
- "title": "Application repository or app"
- },
- {
"location": "/os/get_started/vocabulary/#project",
- "text": "Projects represent individual build configurations of your embedded system and (individually or collectively) comprise your application. The project files dictate the generated binary. A project is laid out as a directory inside an app and contains required packages for an application. For example, the blinky pkg sits in project/blinky directory of the larva app. This pkg is used in the blinky project (an application) outlined in Get Started . Associated with each project are properties. These properties are defined in the project-name .yml file in the project directory. For example, the project/blinky directory has the blinky.yml file indicating some or all of the properties disscused below. Only the name of a project is required for the project to exist; however, additional properties may be specified for the pkgs within it to produce an executable. Project name Base path of the project (app/project/project-name by default) Pkgs belonging t
o the project Capabilities that are required for the project or target Identity to classify the type of project or target Compiler flags to call out any specific compiler requirements Also, a project itself could be a pkg if it is a distributable package for a specific application. That is, the pkg can be resued in other apps as a bundle of libraries. To work with pkgs, the newt tool offers management commands that you can use with your project. For example, if your project is a pkg, you can use the following command to install a project from an app. newt pkg install [flags] project pkg name Other commands associated with pkg are: newt pkg list\n newt pkg checkdeps\n newt pkg search pkg-name \n newt pkg show [ pkg-list ] pkg-name \n newt pkg install [ pkg-list ] pkg-name \n newt pkg remove [ pkg-list ] pkg-name",
+ "text": "The project is the base directory of your embedded software tree. It is a \nworkspace that contains a logical collection of source code, for one or \nmore of your applications. A project consists of the following items: Project Definition: defines project level dependencies, and parameters\n (located in project.yml ) Packages Packages are described in detail in the section below. Here is an example project definition file from the default Apache Mynewt \nproject: $ more project.yml snip \nproject.name: my_project \n\nproject.repositories:\n - apache-mynewt-core # Use github s distribution mechanism for core ASF libraries. # This provides mirroring automatically for us. # \nrepository.apache-mynewt-core:\n type : github\n vers: 0-latest\n user: apache\n repo: incubator-mynewt-core $ A couple of things to note in the project definition: project.repositories : Defines the remote repositories that this project\nrelies upon
. repository.apache-mynewt-core : Defines the repository information for \nthe apache-mynewt-core repository. Repositories are versioned collections of packages. Projects can rely on remote repositories for functionality, and the newt tool \nwill resolve those remote repositories, and download the correct version into \nyour local source tree. Newly fetched repositories are put in the repos \ndirectory of your project, and can be referenced throughout the system by using\nthe @ specifier. By default, the @apache-mynewt-core repository is included in every \nproject. Apache Mynewt Core contains all the base functionality of the Apache \nMynewt Operating System, including the Real Time Kernel, Bluetooth Networking \nStack, Flash File System, Console, Shell and Bootloader. NOTE: Any project can be converted into a repository by providing it with a repository.yml file and putting it up onto Github. More information\nabout repositories can be found in the Newt d
ocumentation.",
"title": "Project"
},
{
- "location": "/os/get_started/vocabulary/#package-or-pkg",
- "text": "A package (pkg) is a distributable bundle of libraries. Just as an egg in nature has various parts, each serving a certain purpose, a Mynewt app consists of software modules that have different functions. However, unlike the egg in nature these modules can exist by itself and may be distributed; therefore, they too are essentially eggs. Once this analogy is grasped it is easy to see how a pkg may consist of other pkgs. The two main directories in a pkg are /include and /src . The newt tool offers several pkg commands as shown above. For example, you can list all the pkgs newt pkg list It lists all the pkgs in the current app where each pkg has details, such as version, path, and dependencies. A sample output for a pkg is given below: Package: libs/os, version 0.1.0\n path: /Users/aditihilbert/dev/test_project/libs/os\n deps: libs/testutil@none#stable For a comprehensive list of all pkg commands, consult the newt tool reference in Ne
wt Tool .",
- "title": "Package or pkg"
- },
- {
- "location": "/os/get_started/vocabulary/#package-list-or-pkg-list",
- "text": "A pkg-list is a snapshot of all pkgs in a remote app at any point in time. On any given github branch, an app with a pkg-list of pkgs will contain a pkg-list.yml file that specifies the version number, dependencies, and hash value for each constituent pkg as well as the name of the entire pkg-list and the github url for it. [Note: Currently ] You may download multiple pkg-lists into your local app as long as the names of the pkg-lists are different. This allows you to mix and match various features and functionality coming from different pkg-lists of pkgs. You can see all the pkg-lists in the .app/pkg-lists directory in your app. As with pkgs, the newt tool offers pkg-list management commands within the newt app command. For example, the following command creates a new pkg-list using all the pkgs in the current directory. It requires that a pkg-list name be specified and the url for the location of that pkg-list in the remote repository. These two inpu
ts go into the pkg-list.yml file in an app. newt app generate-pkg-list pkg-list-name pkg-list-url Note : A pkg-list for a project stipulates all pkgs that belong together that must be installed as project's source code.",
- "title": "Package list or pkg-list"
+ "location": "/os/get_started/vocabulary/#package",
+ "text": "A package is a collection items that form a fundamental unit in the Mynewt \nOperating System. Packages can be: Applications Libraries Compiler definitions Targets A package is identified by having a pkg.yml file in it's base \ndirectory. Here is a sample pkg.yml file for the blinky applicaton: $ more pkg.yml snip \npkg.name: apps/blinky\npkg.type: app\npkg.description: Basic example application which blinks an LED.\npkg.author: Apache Mynewt dev@mynewt.incubator.apache.org \npkg.homepage: http://mynewt.apache.org/ \npkg.keywords:\n\npkg.deps:\n - @apache-mynewt-core/libs/os \n - @apache-mynewt-core/hw/hal \n - @apache-mynewt-core/libs/console/full Packages have a few features worth noting: Dependencies: Packages can rely upon other packages, and when they do\n they will inherit their functionality (header files, library definitions, etc.) APIs: Packages can export named APIs, and they can require that certain \n APIs be
present, in order to compile. Features: Packages can operate differently depending on what named features are \n present in the system. Packages can also export features to the rest of the \n Mynewt system. Everything that newt knows about within a project's directory is a package. This \nmakes it very clean and easy to write re-usable components, which can describe their \nDependencies and APIs to the rest of the system.",
+ "title": "Package"
},
{
"location": "/os/get_started/vocabulary/#target",
- "text": "A target is the hardware build or its software equivalent (e.g. test, simulator) set for a project. Targets instruct the newt tool how to build the source code within a given app. Once a new target is created, its architecture and other details can be set manually. An example of a defined target named \"blink_f3disc\" is given below. blink_f3disc\n compiler_def: debug\n compiler: arm-none-eabi-m4\n name: blink_f3disc\n arch: cortex_m4\n project: blinky\n bsp: hw/bsp/stm32f3discovery To that end, newt tool offers commands to create, set and manipulate targets. For example, the create command below creates an empty target named my_target1 and the set command sets one attribute of its definition, namely the architecture. newt target create my_target1\n newt target set my_target1 arch=cortex_m4",
+ "text": "A target in Apache Mynewt is very similar to a target in make . It is the collection\nof parameters that must be passed to Newt in order to generate a reproducable build. A \ntarget represents the top of the build tree, and any packages or parameters specified at \nthe target level, cascade down to all dependencies. Targets are also packages, and are stored in the targets/ directory at the base \nof your project. Most targets consist of: app : The application to build. bsp : The board support package to combine with that applicat
<TRUNCATED>
[3/3] incubator-mynewt-site git commit: updated newt getting started
docs
Posted by ad...@apache.org.
updated newt getting started docs
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/7d62ab1b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/7d62ab1b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/7d62ab1b
Branch: refs/heads/asf-site
Commit: 7d62ab1bc9a08ee04b9125842f852cc2778d9e39
Parents: 73c6400
Author: aditihilbert <ad...@runtime.io>
Authored: Tue Mar 15 17:02:43 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Tue Mar 15 17:02:56 2016 -0700
----------------------------------------------------------------------
mkdocs/search_index.json | 93 +---
os/get_started/cross_tools/index.html | 10 -
os/get_started/introduction/index.html | 139 ++++--
os/get_started/native_tools/index.html | 10 -
os/get_started/project1/index.html | 587 --------------------------
os/get_started/project_create/index.html | 52 +--
os/get_started/vocabulary/index.html | 271 ++++++------
os/tutorials/arduino_zero/index.html | 2 +-
sitemap.xml | 20 +-
9 files changed, 282 insertions(+), 902 deletions(-)
----------------------------------------------------------------------