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/04/06 02:33:39 UTC

incubator-mynewt-site git commit: Added details to start and stop instance via VirtualBox UI, added warnings and steps to take when hw board cannot be seen via USB device. Also changed tutorial to ask user to test util/os where unit tests exist

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/master 99f7ed6ff -> f01f9576d


Added details to start and stop instance via VirtualBox UI, added warnings and steps to take when hw board cannot be seen via USB device. Also changed tutorial to ask user  to test util/os where unit tests exist


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

Branch: refs/heads/master
Commit: f01f9576dc7f26779760f0ba03325927d9085be5
Parents: 99f7ed6
Author: aditihilbert <ad...@runtime.io>
Authored: Tue Apr 5 17:33:27 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Tue Apr 5 17:33:27 2016 -0700

----------------------------------------------------------------------
 docs/os/get_started/docker.md         | 54 ++++++++++++++++++++++++------
 docs/os/get_started/get_started.md    |  4 +++
 docs/os/get_started/project_create.md | 17 +++++-----
 docs/os/tutorials/arduino_zero.md     | 12 ++++---
 docs/os/tutorials/tutorials.md        |  2 ++
 5 files changed, 65 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/f01f9576/docs/os/get_started/docker.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/docker.md b/docs/os/get_started/docker.md
index 2146b27..8322160 100644
--- a/docs/os/get_started/docker.md
+++ b/docs/os/get_started/docker.md
@@ -6,14 +6,19 @@ docker container. The container is all that's needed to run your Mynewt based
 application in the simulator.  Enabling USB2 with your docker installation will
 allow you to load your application on a supported device.
 
+<br>
+
 ### Install Docker
 Install docker for your platform. [Mac OS X](https://docs.docker.com/mac/) / [Windows](https://docs.docker.com/windows/) / [Linux](https://docs.docker.com/linux/)
 
 Make sure to double click the Docker Quickstart Terminal application if you're on Mac or Windows.
 
+<br>
+
 ### Use the newt wrapper script
 Use the newt wrapper script to invoke newt.  Create the following file, name it
-`newt`, make it executable, and put it in your path.
+`newt`, make it executable, and put it in your path. This will allow you to run newt as if it was natively installed.  You can now follow the normal tutorials using the newt wrapper script.
+
 
 ```bash
 #!/bin/bash
@@ -21,17 +26,32 @@ Use the newt wrapper script to invoke newt.  Create the following file, name it
 docker run -ti --rm --device=/dev/bus/usb --privileged -v $(pwd):/workspace -w /workspace mynewt/newt:latest /newt "$@"
 ```
 
-This will allow you to run newt as if it was natively installed.  You can now
-follow the normal tutorials using the newt wrapper script.
+<br>
+
+**Note 1:** Remember to point to the correct subdirectory level when invoking `newt`. For example, invoke it using `../newt` in the example below.
+
+```hl_lines="4"
+user@~/dockertest$ ls
+myproj	newt
+user@~/dockertest$ cd myproj
+user@~/dockertest/myproj$ ../newt version
+Apache Newt (incubating) version: 0.8.0-b2
+```
+
+<br>
+
+**Note 2:** You can upgrade your container by running `docker pull mynewt/newt:latest` when updates are made available.
 
-You can upgrade your container by running `docker pull mynewt/newt:latest` when
-updates are made available.
 
-If you plan on loading your application on an actual device, continue on to
-configure USB2 support.
+
+<br>
 
 ### Enable USB2 Support for Mac or Windows
 
+If you plan on loading your application on an actual device, do the steps below.
+
+<br>
+
 #### Install VirtualBox extension pack
 Docker uses a VirtualBox Linux VM to run containers.  A free VirtualBox
 extension pack is required to enable USB2 support.  Download the [VirtualBox
@@ -39,17 +59,29 @@ extension pack is required to enable USB2 support.  Download the [VirtualBox
 Pack](http://download.virtualbox.org/virtualbox/5.0.16/Oracle_VM_VirtualBox_Extension_Pack-5.0.16-105871.vbox-extpack)
 and double click to install
 
+<br>
+
 #### Enable USB2 and select your device
+
 * The "default" VM created by docker-machine must first be stopped before you
-  can enable USB2.  You can run the command `docker-machine stop default` or
-  use the VirtualBox UI to stop the VM.
+  can enable USB2.  You have two options:
+     * Run the command `docker-machine stop default` in the terminal window or
+     * Use the VirtualBox UI. Right click on `default` -> Close -> Power Off
+     
 * Enable USB2 using the VirtualBox UI. Select the "default"
   VM->Settings->Ports->USB2 to enable USB2.   Add your device to the USB Device
   Filters to make the device visible in the docker container.  See the image below.
 
 <img src="../pics/virtualbox_usb.jpg" width="728px" />
 
-* Restart the "default" VM by running `docker-machine start default` or by
-  using the VirtualBox UI.
+* Restart the "default" VM. You have two options:
+    * Run `docker-machine start default` in the terminal window or 
+    * Use the VirtualBox UI. Make sure the "default" machine is highlighted. Click the green "Start" button. Select "Headless Start".
+    
+<br>
+
+**Note 3**: When working with actual hardware, remember that each board has an ID. If you swap boards and do not refresh the USB Device Filter on the VirtualBox UI, the ID might be stale and the Docker instance may not be able to see the board correctly. For example, you may see an error message like `Error: unable to find CMSIS-DAP device` when you try to load or run an image on the board. In that case, you need to click on the USB link in VirtualBox UI, remove the existing USB Device Filter (e.g. "Atmel Corp. EDBG CMSIS-DAP[0101]") by clicking on the "Removes selected USB filter" button, and add a new filter by clicking on the "Adds new USB filter" button.
+
+<br>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/f01f9576/docs/os/get_started/get_started.md
----------------------------------------------------------------------
diff --git a/docs/os/get_started/get_started.md b/docs/os/get_started/get_started.md
index b4f5c8e..caf895f 100644
--- a/docs/os/get_started/get_started.md
+++ b/docs/os/get_started/get_started.md
@@ -2,8 +2,12 @@
 
 If you are curious about Mynewt and want to get a quick feel for the project, you've come to the right place. We have two options for you:
 
+<br>
+
 **Option 1** is the quick and easy way to get up and running with Mynewt. The Newt tool and build toolchains are all available in a single [All-in-one Docker Container](docker.md) that you can install on your laptop or computer.
 
+<br>
+
 **Option 2** allows you to install the Newt tool, instances of the Mynewt OS (for simulated targets), and toolchains for developing embedded software (e.g. GNU toolchain) natively on your laptop or computer. You may want this if you are already familiar with such environments or are concerned about performance on your machine. Follow the instructions to [install native tools](native_tools.md) and [install cross tools for ARM](cross_tools.md) if you prefer this option.
 
 <br>

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/f01f9576/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 f47b7fd..90ec19c 100644
--- a/docs/os/get_started/project_create.md
+++ b/docs/os/get_started/project_create.md
@@ -137,17 +137,16 @@ into your local directory.
 
 ### Test the project's packages
 
-You have already built your first basic project. You can ask Newt to execute the unit tests in a package. For example, to test the shell package in the `apache-mynewt-core` repo, call newt as shown below.
+You have already built your first basic project. You can ask Newt to execute the unit tests in a package. For example, to test the `libs/os` package in the `apache-mynewt-core` repo, call newt as shown below.
 
 ```
-$ newt test @apache-mynewt-core/libs/shell
-Testing package @apache-mynewt-core/libs/shell
-Compiling os.c
-Compiling os_callout.c
-Compiling os_eventq.c
-Compiling os_heap.c
-Compiling os_mbuf.c
-Compiling os_mempool.c
+$ newt test @apache-mynewt-core/libs/os
+Testing package @apache-mynewt-core/libs/os
+Compiling hal_bsp.c
+Compiling os_bsp.c
+Compiling sbrk.c
+Archiving native.a
+Compiling flash_map.c
 <snip>
 ```
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/f01f9576/docs/os/tutorials/arduino_zero.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/arduino_zero.md b/docs/os/tutorials/arduino_zero.md
index 9bee4fa..e62f019 100644
--- a/docs/os/tutorials/arduino_zero.md
+++ b/docs/os/tutorials/arduino_zero.md
@@ -153,7 +153,9 @@ board.
 
 To create and download your application, you create another target, this one pointing to the application you want to download to the Arduino board.  In this tutorial,  we will use the default application that comes with your project, ```apps/blinky```:
 
-```no-highlight
+**Note**: Remember to set features to `arduino_zero` if your board is Arduino Zero and not a Pro!
+
+```hl_lines="9"
 $ newt target create arduino_blinky 
 Target targets/arduino_blinky successfully created
 $ newt target set arduino_blinky app=apps/blinky 
@@ -185,9 +187,7 @@ Archiving testutil.a
 <snip>
 App successfully built: myproject/bin/arduino_blinky/apps/blinky/blinky.elf
 ```
-
-Congratulations!  You have successfully built your application. Now it's 
-time to load both the bootloader and application onto the target.
+<font color="#FF0000"> Congratulations! </font> You have successfully built your application. Now it's time to load both the bootloader and application onto the target.
 
 <br>
 
@@ -221,6 +221,10 @@ successfully loaded onto the target.
 
 <br>
 
+<font color="#FF0000"> Reminder if you are using Docker: </font> When working with actual hardware, remember that each board has an ID. If you swap boards and do not refresh the USB Device Filter on the VirtualBox UI, the ID might be stale and the Docker instance may not be able to see the board correctly. For example, you may see an error message like `Error: unable to find CMSIS-DAP device` when you try to load or run an image on the board. In that case, you need to click on the USB link in VirtualBox UI, remove the existing USB Device Filter (e.g. "Atmel Corp. EDBG CMSIS-DAP[0101]") by clicking on the "Removes selected USB filter" button, and add a new filter by clicking on the "Adds new USB filter" button.
+
+<br>
+
 ### Run the Image 
 
 Now that the bootloader is downloaded to the target, the next step is to load 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/f01f9576/docs/os/tutorials/tutorials.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/tutorials.md b/docs/os/tutorials/tutorials.md
index c250afd..2ff2509 100644
--- a/docs/os/tutorials/tutorials.md
+++ b/docs/os/tutorials/tutorials.md
@@ -2,6 +2,8 @@
 
 If the introduction to Mynewt has piqued your interest and you want to familiarize yourself with some of its functionality, this series of tutorials is for you. The lessons are aimed at the beginner. 
 
+Here is a sampler of the tutorials available. New ones are being constantly added and can be seen in the navigation bar on the left.
+
 * [Blinky on Arduino Zero hardware](arduino_zero.md)
 * [Blinky on Olimex/STM32F407ZGT6 Cortex-M4 hardware](olimex.md)
 * [Blinky on STM32F3 discovery kit from ST Micro](STM32F303.md)