Repository: incubator-mynewt-site Updated Branches: refs/heads/develop 98f48584f -> 470d2f2bd
1) Updated blinky for arduino zero, arduino primo, olimex, nRF52 - Removed features, updated paths, general cleanup to make tutorials more consistent 2) Use updated olimex diagrams that include power input select jumper location so user can configure power source from JTAG/SWD 3) Fix typo in bleprph tutorial. 4) Updated Concepts section to use updated newt target -h output 5) Updated newt install for Mac and linux to use updated newt -h output. 6) Updated newt install for linux to install GO version 1.6 7) Remove duplicate instance of Air Quality Sensor project from document tree 8) Removed embedded LUA from doc tree. 9) Fix newtmgr echo and mpstats output for slinky_sim tutorial. 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/82acf335 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/82acf335 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/82acf335 Branch: refs/heads/develop Commit: 82acf335901ada1339597bfb2843ea05afcc2e78 Parents: 98f4858 Author: cwanda <[email protected]> Authored: Thu Mar 23 17:27:57 2017 -0700 Committer: cwanda <[email protected]> Committed: Sun Mar 26 13:06:12 2017 -0700 ---------------------------------------------------------------------- docs/os/tutorials/arduino_zero.md | 34 +++++++++++++++++----------------- docs/os/tutorials/blinky_primo.md | 34 ++++++++++++++++------------------ docs/os/tutorials/nRF52.md | 26 +++++++++++++------------- docs/os/tutorials/olimex.md | 14 +++++++------- 4 files changed, 53 insertions(+), 55 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/82acf335/docs/os/tutorials/arduino_zero.md ---------------------------------------------------------------------- diff --git a/docs/os/tutorials/arduino_zero.md b/docs/os/tutorials/arduino_zero.md index 356cdfd..a334d87 100644 --- a/docs/os/tutorials/arduino_zero.md +++ b/docs/os/tutorials/arduino_zero.md @@ -10,13 +10,13 @@ Ensure that you have met the following prerequisites before continuing with this * Have an Arduino Zero board. Note: There are many flavors of Arduino. Make sure you are using an Arduino Zero. See below for the versions of Arduino Zero that are compatible with this tutorial. * Have Internet connectivity to fetch remote Mynewt components. +* Have a computer to build a Mynewt application and connect to the board over USB. * Have a Micro-USB cable to connect the board and the computer. -* Have a computer to build a Mynewt application and connect to your board over USB. * Install the Newt tool and toolchains (See [Basic Setup](/os/get_started/get_started.md)). * Create a project space (directory structure) and populated it with the core code repository (apache-mynewt-core) or know how to as explained in [Creating Your First Project](/os/get_started/project_create). * Read the Mynewt OS [Concepts](/os/get_started/vocabulary.md) section. -This tutorial has been tested on the following three Arduino Zero boards - Zero, M0 Pro, and Zero-Pro. +This tutorial uses the Arduino Zero Pro board. The tutorial has been tested on the following three Arduino Zero boards - Zero, M0 Pro, and Zero-Pro. <img src="https://www.arduino.cc/en/uploads/Main/Zero_Usb_Ports.jpg" alt="Drawing" style="width: 390px;"/> <img src="http://www.arduino.org/images/products/Arduino-M0Pro-flat.jpg" alt="Drawing" style="width: 310px;"/> @@ -81,7 +81,7 @@ $ ``` <br> -Install the project dependencies using the `newt install` command (You can specify ```-v``` for verbose output): +Install the project dependencies using the `newt install` command (you can specify ```-v``` for verbose output): ```no-highlight $ newt install apache-mynewt-core @@ -94,10 +94,9 @@ $ **NOTE:** If there has been a new release of a repo used in your project since you last installed it, the `1-latest` version for the repo in the `project.yml` file will refer to the new release and will not match the installed files. In that case you will get an error message saying so and you will need to run `newt upgrade` to overwrite the existing files with the latest codebase. <br> -### Create a Target for the Bootloader -You need to create two targets, one for the bootloader and one for the Blinky application. +You need to create two targets for the Arduino Zero Pro board, one for the bootloader and one for the Blinky application. <br> -Run the following `newt target` commands, from your project directory (ex. ~/dev/myproj), to create a bootloader target for the Arduino Zero Pro board. We name the target `arduino_boot`. +Run the following `newt target` commands, from your project directory, to create a bootloader target. We name the target `arduino_boot`. ```no-highlight $ newt target create arduino_boot @@ -111,7 +110,7 @@ $ newt target set arduino_boot syscfg=BSP_ARDUINO_ZERO_PRO=1 Target targets/arduino_boot successfully set target.syscfg to BSP_ARDUINO_ZERO_PRO=1 $ ``` -**Note:** If you have an Arduino Zero instead of a Arduino Zero Pro board, replace `BSP_ARDUINO_ZERO_PRO` with `BSP_ARDUINO_ZERO` in the last `newt target set` command. +**Note:** If you have an Arduino Zero instead of an Arduino Zero Pro or Arduino M0 Pro board, replace `BSP_ARDUINO_ZERO_PRO` with `BSP_ARDUINO_ZERO` in the last `newt target set` command. These commands perform the following: @@ -129,7 +128,7 @@ These commands perform the following: See the [Concepts](../get_started/vocabulary.md) section for more information on setting options. <br> ###Create a Target for the Blinky Application -Run the following `newt target` commands to create your Blinky application target. We name the application target `arduino_blinky`. +Run the following `newt target` commands to create the Blinky application target. We name the application target `arduino_blinky`. ```no-highlight $ newt target create arduino_blinky @@ -151,7 +150,7 @@ $ ### Build the Bootloader -Run the `newt build arduino_boot` command to build a bootloader for your arduino board: +Run the `newt build arduino_boot` command to build the bootloader: ```no-highlight $ newt build arduino_boot @@ -182,7 +181,7 @@ Target successfully built: targets/arduino_boot ### Build the Blinky Application -Run the `newt build arduino_blinky` command to build your Blinky application image: +Run the `newt build arduino_blinky` command to build the Blinky application image: ```no-highlight $ newt build arduino_blinky @@ -208,7 +207,7 @@ Target successfully built: targets/arduino_blinky Connect your computer to the Arduino Zero (from now on we'll call this the target) with a Micro-USB cable through the Programming Port as shown below. Mynewt will load the image onto the board and debug the target through this port. You should see a -little green LED come on. That means the board has power. +green LED come on that indicates the board has power. No external debugger is required. The Arduino Zero comes with an internal debugger that can be accessed by Mynewt. @@ -222,16 +221,17 @@ The images below show the Arduino Zero Programming Port. ### Load the Bootloader onto the Board -Run the `newt load arduino_boot` command to load the bootloader onto your board: +Run the `newt load arduino_boot` command to load the bootloader onto the board: ```no-highlight $ newt load arduino_boot Loading bootloader $ ``` -The bootloader is loaded onto your board succesfully when the `newt load` command returns to the command prompt with no messages. You can proceed to load and run your Blinky application image (See [Run the Blinky Application](#runimage)). +The bootloader is loaded onto your board succesfully when the `newt load` command returns to the command prompt after the `Loading bootloader` status message. You can proceed to load and run your Blinky application image (See [Run the Blinky Application](#runimage)). + +If the `newt load` command outputs the following error messages, you will need to erase the board. -If the `newt load` command outputs the following error messages, you will need to erase your board. ``` $ newt load arduino_boot -v Loading bootloader @@ -284,9 +284,9 @@ Run the `newt load arduino_boot` command again after erasing the board. After you load the bootloader successfully onto your board, you can load and run the Blinky application. -Run the `newt run arduino_blinky 0.0.0` command to build the arduino_blinky target (if necessary), create an image with verison 0.0.0, load the image onto the board, and start a debugger session. +Run the `newt run arduino_blinky 1.0.0` command to build the arduino_blinky target (if necessary), create an image with verison 1.0.0, load the image onto the board, and start a debugger session. ```no-highlight -$ newt run arduino_blinky 0.0.0 +$ newt run arduino_blinky 1.0.0 App image succesfully generated: ~/dev/myproj/bin/targets/arduino_blinky/app/apps/blinky/blinky.img Loading app image into slot 1 [~/dev/myproj/repos/mynewt_arduino_zero/hw/bsp/arduino_zero/arduino_zero_debug.sh ~/dev/myproj/repos/mynewt_arduino_zero/hw/bsp/arduino_zero ~/dev/myproj/bin/targets/arduino_blinky/app/apps/blinky/blinky] @@ -342,7 +342,7 @@ Continuing. <br> -**NOTE:** The 0.0.0 is the version number to assign to the images. If you are not providing remote upgrade, and are just developing locally, you can provide 0.0.0 for every image version. +**NOTE:** The 1.0.0 is the version number to assign to the image. You may assign an abitrary version number. If you are not providing remote upgrade, and are just developing locally, you can provide 1.0.0 for every image version. If you want the image to run without the debugger connected, simply quit the debugger and restart the board. The image you programmed will come up and run on http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/82acf335/docs/os/tutorials/blinky_primo.md ---------------------------------------------------------------------- diff --git a/docs/os/tutorials/blinky_primo.md b/docs/os/tutorials/blinky_primo.md index 358be33..7bade06 100644 --- a/docs/os/tutorials/blinky_primo.md +++ b/docs/os/tutorials/blinky_primo.md @@ -17,12 +17,12 @@ Ensure that you have met the following prerequisites before continuing with this * Have an Arduino Primo * Have Internet connectivity to fetch remote Mynewt components. +* Have a computer to build a Mynewt application and connect to the` board over USB. * Have a Micro-USB cable to connect the board and the computer. -* Have a computer to build a Mynewt application and connect to your board over USB. * Install the Newt tool and toolchains (See [Basic Setup](/os/get_started/get_started.md)). * Create a project space (directory structure) and populated it with the core code repository (apache-mynewt-core) or know how to as explained in [Creating Your First Project](/os/get_started/project_create). * Read the Mynewt OS [Concepts](/os/get_started/vocabulary.md) section. -* Debugger - choose one of the two options below. Option 1 requires additional hardware but very easy to set up. Option 2 is free software install but not as simple as Option 1. +* Install a debugger - choose one of the two options below. Option 1 requires additional hardware but very easy to set up. Option 2 is free software install but not as simple as Option 1. <br> @@ -33,7 +33,7 @@ Ensure that you have met the following prerequisites before continuing with this ##### Option 2 -* No additional hardware is required but a version of OpenOCD 0.10.0 that is currently in development needs to be installed. A patch for the nRF52 has been applied to the OpenOCD code in development and a tarball has been made available for download [here](downloads/openocd-wnrf52.tgz). Untar it. From the top of the directory tree ("openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4"), build it using the following configuration: + No additional hardware is required but a version of OpenOCD 0.10.0 that is currently in development needs to be installed. A patch for the nRF52 has been applied to the OpenOCD code in development and a tarball has been made available for download [here](downloads/openocd-wnrf52.tgz). Untar it. From the top of the directory tree ("openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4"), build it using the following configuration: ``` $./configure --enable-cmsis-dap --enable-openjtag_ftdi --enable-jlink --enable-stlink @@ -94,14 +94,14 @@ Run the following commands to create a new project: Create two targets for the Arduino Primo board - one for the bootloader and one for the Blinky application. -Run the following `newt target` commands to create a bootloader target. We name the target `primo_boot`: +Run the following `newt target` commands, from your project directory, to create a bootloader target. We name the target `primo_boot`. ```no-highlight $ newt target create primo_boot $ newt target set primo_boot app=@apache-mynewt-core/apps/boot bsp=@apache-mynewt-core/hw/bsp/arduino_primo_nrf52 build_profile=optimized ``` <br> -Run the following `newt target` commands to create a target for your Blinky application. We name the target `primoblinky`: +Run the following `newt target` commands to create a target for the Blinky application. We name the target `primoblinky`. ```no-highlight $ newt target create primoblinky $ newt target set primoblinky app=apps/blinky bsp=@apache-mynewt-core/hw/bsp/arduino_primo_nrf52 build_profile=debug @@ -110,13 +110,12 @@ $ newt target set primoblinky app=apps/blinky bsp=@apache-mynewt-core/hw/bsp/ard If you are using openocd, run the following `newt target set` commands: ```no-highlight -$ newt target set primoblinky syscfg=OPENCD_DEBUG=1 -$ newt target set primo_boot syscfg=OPENCD_DEBUG=1 - +$ newt target set primoblinky syscfg=OPENOCD_DEBUG=1 +$ newt target set primo_boot syscfg=OPENOCD_DEBUG=1 ``` <br> -You can run the `newt target show` command to verify your target settings: +You can run the `newt target show` command to verify the target settings: ```no-highlight $ newt target show @@ -196,17 +195,15 @@ App image succesfully generated: ~/dev/myproj/bin/targets/primoblinky/app/apps/b <br> ### Connect to the Board - -Connect the Segger J-Link debug probe to the JTAG port on the Primo board using the Jlink 9-pin adapter and cable. Note that there are two JTAG ports on the board. Use the one nearest to the reset button as shown in the picture. Also use a micro USB 2.0 cable to connect the Primo board to one of your laptop's USB host ports. +* Connect a micro USB cable to the Arduino Primo board and to your computer's USB port. +* If you are using the Segger J-Link debug probe, connect the debug probe to the JTAG port on the Primo board using the Jlink 9-pin adapter and cable. Note that there are two JTAG ports on the board. Use the one nearest to the reset button as shown in the picture.  - -<br> -**Note:** If you are going the OpenOCD route, you do not need to attach this connector. +**Note:** If you are using the OpenOCD debugger, you do not need to attach this connector. ### Load the Bootloader and the Blinky Application Image -Run the `newt load primo_boot` command to load the bootloader onto your board: +Run the `newt load primo_boot` command to load the bootloader onto the board: ```no-highlight $ newt load primo_boot @@ -214,16 +211,17 @@ Loading bootloader $ ``` <br> -Run the `newt load primoblinky` command to load Blinky application image onto your board. +Run the `newt load primoblinky` command to load the Blinky application image onto the board. + ```no-highlight $ newt load primoblinky Loading app image into slot 1 $ ``` -You should see the LED on your board blink! +You should see the LED on the board blink! -Note: If the LED does not blink, try resetting your board. +Note: If the LED does not blink, try resetting the board. <br> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/82acf335/docs/os/tutorials/nRF52.md ---------------------------------------------------------------------- diff --git a/docs/os/tutorials/nRF52.md b/docs/os/tutorials/nRF52.md index 8ac5f33..4661147 100644 --- a/docs/os/tutorials/nRF52.md +++ b/docs/os/tutorials/nRF52.md @@ -8,11 +8,11 @@ Learn how to use packages from a default application repository of Mynewt to bui Create a project with a simple app that blinks an LED on the nRF52 board from Nordic Semiconductors. Download the application to the target and watch it blink! -Note that there are several versions of the nRF52 in the market. The boards tested with this tutorial are listed under "Hardware needed" below. +Note that there are several versions of the nRF52 in the market. The boards tested with this tutorial are listed under "Prerequisites". <br> -### Prerequistes +### Prerequisites Ensure that you have met the following prerequisites before continuing with this tutorial: @@ -20,12 +20,13 @@ Ensure that you have met the following prerequisites before continuing with this * Dev Kit from Nordic - PCA 10040 * Eval Kit from Rigado - BMD-300-EVAL-ES * Have Internet connectivity to fetch remote Mynewt components. +* Have a computer to build a Mynewt application and connect to the board over USB. * Have a Micro-USB cable to connect the board and the computer. -* Have computer to build a Mynewt application and connect to your board over USB. * Install the Newt tool and toolchains (See [Basic Setup](/os/get_started/get_started.md)). * Create a project space (directory structure) and populated it with the core code repository (apache-mynewt-core) or know how to as explained in [Creating Your First Project](/os/get_started/project_create). * Read the Mynewt OS [Concepts](/os/get_started/vocabulary.md) section. +This tutorial uses the Nordic NRF52DK board. <br> ### Create a Project @@ -52,10 +53,10 @@ Run the following commands to create a new project: Create two targets for the nRF52-DK board - one for the bootloader and one for the Blinky application. -Run the following `newt target` commands, from your project directory (~/dev/myproj), to create a bootloader target. We name the target `nrf52_boot`: +Run the following `newt target` commands, from your project directory, to create a bootloader target. We name the target `nrf52_boot`: <font color="#F2853F"> -Note: For this tutorial, we are using the nRF52-DK board. You must specify the correct bsp for the board you are using. </font> +Note: This tutorial uses the Nordic nRF52-DK board. You must specify the correct bsp for the board you are using. </font> * For the Nordic Dev Kit choose @apache-mynewt-core/hw/bsp/nrf52dk instead (in the highlighted lines) * For the Rigado Eval Kit choose @apache-mynewt-core/hw/bsp/bmd300eval instead (in the highlighted lines) @@ -68,17 +69,16 @@ $ newt target set nrf52_boot build_profile=optimized ``` <br> -Run the following `newt target` commands to create a target for your Blinky application. We name the target `nrf52_blinky`: +Run the following `newt target` commands to create a target for the Blinky application. We name the target `nrf52_blinky`. ```hl_lines="3" $ newt target create nrf52_blinky $ newt target set nrf52_blinky app=apps/blinky $ newt target set nrf52_blinky bsp=@apache-mynewt-core/hw/bsp/nrf52dk $ newt target set nrf52_blinky build_profile=debug - ``` <br> -You can run the `newt target show` command to verify your target settings: +You can run the `newt target show` command to verify the target settings: ```no-highlight $ newt target show @@ -155,12 +155,12 @@ App image succesfully generated: ~/dev/myproj/bin/targets/nrf52_blinky/app/apps/ ### Connect to the Board -* Connect a micro-USB cable from your computer to the micro-USB port on your nRF52-DK board. +* Connect a micro-USB cable from your computer to the micro-USB port on the NRF52DK board. * Turn the power on the board to ON. You should see the green LED light up on the board. ### Load the Bootloader and the Blinky Application Image -Run the `newt load nrf52_boot` command to load the bootloader onto your board: +Run the `newt load nrf52_boot` command to load the bootloader onto the board: ```no-highlight $ newt load nrf52_boot @@ -168,13 +168,13 @@ Loading bootloader $ ``` <br> -Run the `newt load nrf52_blinky` command to load Blinky application image onto your board. +Run the `newt load nrf52_blinky` command to load the Blinky application image onto the board. ```no-highlight -$ newt -v load nrf52_blinky +$ newt load nrf52_blinky Loading app image into slot 1 ``` -You should see the LED1 on your board blink! +You should see the LED1 on the board blink! Note: If the LED does not blink, try resetting your board. http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/82acf335/docs/os/tutorials/olimex.md ---------------------------------------------------------------------- diff --git a/docs/os/tutorials/olimex.md b/docs/os/tutorials/olimex.md index e4d005b..3018234 100644 --- a/docs/os/tutorials/olimex.md +++ b/docs/os/tutorials/olimex.md @@ -13,9 +13,9 @@ Ensure that you have met the following prerequisites before continuing with this * Have a STM32-E407 development board from Olimex. * Have a ARM-USB-TINY-H connector with JTAG interface for debugging ARM microcontrollers (comes with the ribbon cable to hook up to the board) -* Have USB A-B type cable to connect the debugger to your personal computer. * Have Internet connectivity to fetch remote Mynewt components. -* Have a computer to build a Mynewt application and connect to your board over USB. +* Have a computer to build a Mynewt application and connect to the board over USB. +* Have USB A-B type cable to connect the debugger to your computer. * Install the Newt tool and toolchains (See [Basic Setup](/os/get_started/get_started.md)). * Create a project space (directory structure) and populated it with the core code repository (apache-mynewt-core) or know how to as explained in [Creating Your First Project](/os/get_started/project_create). * Read the Mynewt OS [Concepts](/os/get_started/vocabulary.md) section. @@ -50,7 +50,7 @@ Run the following commands to create a new project: Create two targets for the Olimex board - one for the bootloader and one for the Blinky application. -Run the following `newt target` commands to create a bootloader target. We name the target `boot_olimex`: +Run the following `newt target` commands, from your project directory, to create a bootloader target. We name the target `boot_olimex`. ```no-highlight $ newt target create boot_olimex @@ -60,7 +60,7 @@ $ newt target set boot_olimex bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_d ``` <br> -Run the following `newt target` commands to create a target for your Blinky application. We name the target `olimex_blinky`: +Run the following `newt target` commands to create a target for the Blinky application. We name the target `olimex_blinky`. ```no-highlight $ newt target create olimex_blinky @@ -73,7 +73,7 @@ $ newt target set olimex_blinky app=apps/blinky <br> ### Build the Bootloader -Run the `newt build boot_olimex` command to build the boot loader image: +Run the `newt build boot_olimex` command to build the bootloader: ```no-highlight $ newt build boot_olimex @@ -124,7 +124,7 @@ Target successfully built: targets/olimex_blinky <br> ### Sign and Create the Blinky Application Image -Run the `newt create-image olimex_blinky 1.0.0` command to sign and create an image file for your blinky application. You may assign an arbitrary version (e.g. 1.0.0) number. +Run the `newt create-image olimex_blinky 1.0.0` command to sign and create an image file for the blinky application. You may assign an arbitrary version (e.g. 1.0.0) number. ```no-highlight @@ -135,7 +135,7 @@ App image succesfully generated: ~/dev/myproj/bin/targets/olimex_blinky/app/apps ### Connect to the Board -Configure your board to bootload from flash memory and to use the JTAG/SWD for the power source. Refer to the following diagrams to locate the boot jumpers and power input select jumpers on your board. +Configure the board to bootload from flash memory and to use the JTAG/SWD for the power source. Refer to the following diagrams to locate the boot jumpers and power input select jumpers on the board. <br> <p align="center">
