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/17 21:55:44 UTC

[2/2] incubator-mynewt-site git commit: This closes #58. nRF52 tutorial updated with new newt commands. Link in Arduino Zero to first project fixed. Link to Sim blinky fixed

This closes #58. nRF52 tutorial updated with new newt commands. Link in Arduino Zero to first project fixed. Link to Sim blinky fixed


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/46aa2856
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/46aa2856
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/46aa2856

Branch: refs/heads/master
Commit: 46aa2856b41c28e5ccec2b55e917ef717fcded59
Parents: 11afe77
Author: aditihilbert <ad...@runtime.io>
Authored: Thu Mar 17 13:55:38 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Thu Mar 17 13:55:38 2016 -0700

----------------------------------------------------------------------
 docs/os/get_started/project1.md       | 172 -----------------------------
 docs/os/get_started/project_create.md |  53 ++++++---
 docs/os/tutorials/arduino_zero.md     |  14 +--
 docs/os/tutorials/nRF52.md            |  14 +--
 4 files changed, 49 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/46aa2856/docs/os/get_started/project1.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/project1.md b/docs/os/get_started/project1.md
deleted file mode 100644
index ee77f81..0000000
--- a/docs/os/get_started/project1.md
+++ /dev/null
@@ -1,172 +0,0 @@
-## Blinky, Your Hello World!
-
-### Objective
-
-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: 
-
-1. Set up the environment on your computer to use Mynewt OS and newt tool. 
-2. Download packages for building and testing the project [on a simulated target](#build-test-code-on-simulator).
-
-** Time Requirement**: Allow yourself an hour for this project if you are relatively new to embedded systems and want to understand each step.
-
-
-### What you need
-
-1. Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)
-2. An account on Github repository and *git* installed on your computer.
-3. It assumed you already installed native tools described [here](native_tools.md)
-
-Also, we assume that you're familiar with UNIX shells.
-
-Let's gets started!
-
-### Install Native and Cross Tools
-
-
-See [Installing Native Tools](../get_started/native_tools.md)
- and [Installing Cross Tools](../get_started/cross_tools.md) for ARM to install
-the tools needed by newt.
-
-
-### Install newt tool
-
-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](../../newt/newt_mac.md) and [Install newt from source on Linux](../../newt/newt_linux.md).
-
-### Build test code on simulator 
-
-
-1\. Create a new project with newt 
-
-```no-highlight
-$ newt new my_project
-Downloading project skeleton from apache/incubator-mynewt-blinky...
-Installing skeleton in my_project...
-Project my_project successfully created.
-$ 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
-
-6 directories, 10 files
-$ 
-``` 
-  
-2\. Install remote dependencies for the new project 
-
-```no-highlight
-$ newt install -v 
-apache-mynewt-core
-Downloading repository description for apache-mynewt-core... success!
-Downloading repository incubator-mynewt-core (branch: master; commit: mynewt_0_8_0_b2_tag) at https://github.com/apache/incubator-mynewt-core.git
-Cloning into '/var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348'...
-remote: Counting objects: 17935, done.
-remote: Compressing objects: 100% (234/234), done.
-remote: Total 17935 (delta 101), reused 0 (delta 0), pack-reused 17686
-Receiving objects: 100% (17935/17935), 6.18 MiB | 315.00 KiB/s, done.
-Resolving deltas: 100% (10541/10541), done.
-Checking connectivity... done.
-apache-mynewt-core successfully installed version 0.7.9-none
-```
-
-3\. 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 
-the `Successfully run!` text.
-
-```no-highlight
-$ newt build my_blinky_sim 
-Compiling main.c
-Archiving blinky.a
-Compiling flash_map.c
-Compiling hal_flash.c
-Archiving hal.a
-Compiling hal_cputime.c
-Compiling hal_flash.c
-Compiling hal_gpio.c
-Compiling hal_system.c
-Compiling hal_uart.c
-Archiving native.a
-Compiling base64.c
-<snip>
-```
-For extra details, specify the ```-v``` (verbose) option.
-
-4\.  Run the blinky target, and enjoy your first successful Apache Mynewt project:
-
-```no-highlight
-$ newt run my_blinky_sim 
-<snip>
-Compiling cons_fmt.c
-Compiling cons_tty.c
-Archiving full.a
-Compiling hal_bsp.c
-Compiling os_bsp.c
-Compiling sbrk.c
-Archiving native.a
-Compiling os.c
-Compiling os_callout.c
-Compiling os_eventq.c
-Compiling os_heap.c
-Compiling os_mbuf.c
-Compiling os_mempool.c
-Compiling os_mutex.c
-Compiling os_sanity.c
-Compiling os_sched.c
-Compiling os_sem.c
-Compiling os_task.c
-Compiling os_time.c
-Compiling os_arch_sim.c
-Compiling os_fault.c
-Assembling os_arch_stack_frame.s
-Archiving os.a
-Linking blinky.elf
-No download script for BSP hw/bsp/native
-Debugging /Users/sterling/dev/site/my_project/bin/my_blinky_sim/apps/blinky/blinky.elf
-GNU gdb (GDB) 7.10.1
-Copyright (C) 2015 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
-and "show warranty" for details.
-This GDB was configured as "x86_64-apple-darwin15.2.0".
-Type "show configuration" for configuration details.
-For bug reporting instructions, please see:
-<http://www.gnu.org/software/gdb/bugs/>.
-Find the GDB manual and other documentation resources online at:
-<http://www.gnu.org/software/gdb/documentation/>.
-For help, type "help".
-Type "apropos word" to search for commands related to "word"...
-Reading symbols from /Users/sterling/dev/site/my_project/bin/my_blinky_sim/apps/blinky/blinky.elf...Reading symbols from /Users/sterling/dev/site/my_project/bin/my_blinky_sim/apps/blinky/blinky.elf.dSYM/Contents/Resources/DWARF/blinky.elf...done.
-done.
-(gdb) r
-```
-
-### Conclusion
-
-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](../tutorials/olimex.md).
-
-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](../../community.md)
-
-Keep on hacking and blinking!

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/46aa2856/docs/os/get_started/project_create.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/project_create.md b/docs/os/get_started/project_create.md
index 26ef364..510dcb6 100644
--- a/docs/os/get_started/project_create.md
+++ b/docs/os/get_started/project_create.md
@@ -1,29 +1,34 @@
-# Creating a Mynewt Project
+## Create Your First Mynewt Project
 
-This page shows how to create a Mynewt Project using `newt`
+This page shows how to create a Mynewt Project using the `newt` command-line tool.
 
-# Pre-Requisites
+### Pre-Requisites
 
-* Ensure you have installed [newt](../../newt/newt_intro) and that the 
-newt command is in your system path.
+* Ensure you have installed [newt](../../newt/tutorials/newt_mac.md) and that the 
+newt command is in your system path. 
 * You must have Internet connectivity to fetch remote Mynewt components
 * You must [install the compiler tools](project1.md) to 
 support native compiling to build the project this tutorial creates.  
 
-## Newt New
+<br>
 
-Chose a project name. For this tutorial we will call this project `myproj`.
-Enter the `newt new myproj` command. Your put
-```no-highlight
+### Newt New
+
+Choose a project name. For this tutorial we will call this project `myproj`.
+Enter the `newt new myproj` command. 
+
+```
     $ newt new myproj
     Downloading project skeleton from apache/incubator-mynewt-blinky...
     Installing skeleton in myproj...
     Project myproj successfully created.
 ```
 
+<br>
+
 The `newt` tool has created a project directory structure like the one below:
 
-```no-highlight
+```
     ─── myproj
         ├── DISCLAIMER
         ├── LICENSE
@@ -44,6 +49,9 @@ The `newt` tool has created a project directory structure like the one below:
                 └── target.yml
 ```
 
+<br>
+
+
 `newt` has installed the base files for a project comprising the following.
 
 1. file `project.yml` contains the repository list that the project uses to fetch
@@ -58,16 +66,17 @@ targets.
 4. A non-build-able target called `unittest`.  This is used
 internally by `newt` and is not a formal build target.
 
- NOTE: the actual code and package files are not installed 
-(except the template for `main.c`.  See the next step for installing 
-the packages.
+**NOTE:** the actual code and package files are not installed 
+(except the template for `main.c`).  See the next step for installing the packages.
 
-## Newt Install
+<br>
 
-change into the `myproj` directory.  Then ask newt to install all the 
-project package dependencies using `newt install`
+### Newt Install
 
-```no-highlight
+Change into the `myproj` directory.  Then ask newt to install all the 
+project package dependencies using `newt install`.
+
+```
     $ newt install -v 
     apache-mynewt-core
     Downloading repository description for apache-mynewt-core... success!
@@ -111,6 +120,8 @@ under the specific repository you have included in the base project.
 Within each of these directories are the packages required to build your
 project for the various targets.
 
+<br>
+
 ## Testing the Project
 
 To validate, you can also run all the units test through simulation.
@@ -126,6 +137,8 @@ To validate, you can also run all the units test through simulation.
     All tests passed
 ```
 
+<br>
+
 ## Building the Project
 
 To build the project you can use `newt build` using the target 
@@ -135,6 +148,8 @@ To build the project you can use `newt build` using the target
     App successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf
 ```
 
+<br>
+
 You can run the simulated version of your project and see the simulated LED
 blink
 ```no-highlight
@@ -144,8 +159,10 @@ blink
 
 Just do `ctrl-c` to exit.
 
+<br>
+
 ## Complete
 
-Congratulations, you have created your first project.  This project contains 
+Congratulations, you have created your first project!  This project contains 
 the core OS, a simple application to blink an LED and all of the dependencies
 required.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/46aa2856/docs/os/tutorials/arduino_zero.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/arduino_zero.md b/docs/os/tutorials/arduino_zero.md
index e13143c..7d4311b 100644
--- a/docs/os/tutorials/arduino_zero.md
+++ b/docs/os/tutorials/arduino_zero.md
@@ -1,12 +1,12 @@
-# Running Mynewt on Arduino Zero
+## Running Mynewt on Arduino Zero
 
 This tutorial describes how to run Mynewt OS on Arduino Zero.  
 
-## Prerequisites
+### Prerequisites
 
 Before tackling this tutorial, it's best to read about Mynewt in the [Introduction](../get_started/introduction) section of this documentation.
 
-## Equipment
+### Equipment
 
 You will need the following equipment
 
@@ -17,7 +17,7 @@ compatible with this tutorial
 * A USB cable (Type A to micro B) that can connect the computer to the Arduino
 * The Mynewt Release
 
-## Arduino Boards
+### Arduino Boards
 
 This tutorial has been tested on the following two Arduino Zero boards.
 
@@ -25,13 +25,13 @@ This tutorial has been tested on the following two Arduino Zero boards.
 <img src="http://www.arduino.org//images/products/ArduinoZeroPro-flat-org.jpg" alt="Drawing" style="width: 330px;"/>
 
 
-## Steps
+### Steps
 
 Follow these simple steps and your board will be blinking in no time!
 
-### Install Mynewt and Newt
+#### Install Mynewt and Newt
 
-If you have not already done so, install Newt as shown in the [Newt install tutorial](../../newt/tutorials/newt_mac.md) and cloned the Mynewt OS repository as shown in the [Get Started tutorial for Blinky](../get_started/project1.md)
+If you have not already done so, install Newt as shown in the [Newt install tutorial](../../newt/tutorials/newt_mac.md) and cloned the Mynewt OS repository as shown in the [Get Started tutorial for Sim Blinky](../get_started/project_create.md)
 
 ### Fetch External Packages for Atmel SAMD21
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/46aa2856/docs/os/tutorials/nRF52.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/nRF52.md b/docs/os/tutorials/nRF52.md
index 69518d0..1cafdd3 100644
--- a/docs/os/tutorials/nRF52.md
+++ b/docs/os/tutorials/nRF52.md
@@ -12,7 +12,7 @@ nRF52 Series chip from Nordic Semiconductors.
 * It is assumed you have already installed newt tool. 
 * It is assumed you already installed native tools as described [here](../get_started/native_tools.md)
 
-#### install jlinkEXE
+#### Install jlinkEXE
 
 In order to be able to communicate with the SEGGER J-Link debugger on the dev board, you have to download and install the J-Link GDB Server software on to your laptop. You may download the "Software and documentation pack for Mac OS X" from [https://www.segger.com/jlink-software.html](https://www.segger.com/jlink-software.html). 
 
@@ -22,16 +22,16 @@ Create a new project to hold your work.  For a deeper understanding, you can rea
 [Get Started -- Creating Your First Project](../get_started/project_create.md)
 or just follow the commands below.
 
-```no-highlight
+```
     $ mkdir ~/dev
     $ cd ~/dev
     $ newt new myproj
     Downloading project skeleton from apache/incubator-mynewt-blinky...
     Installing skeleton in myproj...
     Project myproj successfully created.
-
+    
     $ cd myproj
-
+    
     $ newt install -v 
     apache-mynewt-core
     Downloading repository description for apache-mynewt-core... success!
@@ -45,7 +45,7 @@ Create a single target for the nrf52.  NOTE: The nrf52 mynewt core does not
 yet have bootloader support, so we will create a single image to download
 to the device.
 
-```no-highlight
+```
 $ newt target create blink_nordic
 $ newt target set blink_nordic app=apps/blinky
 $ newt target set blink_nordic bsp=@apache-mynewt-core/hw/bsp/nrf52pdk
@@ -59,7 +59,7 @@ targets/blink_nordic
 
 #### Build the image 
 
-```no-highlight
+```
 $ newt build blink_nordic
 ...
 Compiling main.c
@@ -76,7 +76,7 @@ Connect the evaluation board via micro-USB to your PC via USB cable.
 
 Download the executable to the target platform.
 
-```no-highlight
+```
 $ newt -v load blink_nordic
 ```