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/05 05:35:31 UTC

incubator-mynewt-site git commit: nimble tutorial updates by ccollins, pull requests #68 and #70

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/asf-site 7a9ddc1c6 -> d0bc8efe0


nimble tutorial updates by ccollins, pull requests #68 and #70


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

Branch: refs/heads/asf-site
Commit: d0bc8efe09963d8dcc86f6a9a90e20380dfdfaf3
Parents: 7a9ddc1
Author: aditihilbert <ad...@runtime.io>
Authored: Mon Apr 4 20:35:18 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Mon Apr 4 20:35:18 2016 -0700

----------------------------------------------------------------------
 mkdocs/search_index.json                       | 20 ++---
 network/ble/ini_stack/ble_ini_intro/index.html | 12 +--
 network/ble/nimble_setup/index.html            | 96 +++++++++++++++------
 os/get_started/cross_tools/index.html          |  3 +-
 4 files changed, 86 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d0bc8efe/mkdocs/search_index.json
----------------------------------------------------------------------
diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json
index c1c03a0..f454d08 100644
--- a/mkdocs/search_index.json
+++ b/mkdocs/search_index.json
@@ -227,7 +227,7 @@
         }, 
         {
             "location": "/os/get_started/cross_tools/", 
-            "text": "Installing Cross Tools for ARM\n\n\nThis page shows how to install tools on your laptop/computer to use for direct communication (e.g. for debugging) with some ARM based HW platforms running Apache Mynewt. You will also have to use the Newt tool installed to run natively on your machine. You may choose to do this instead of using the build toolchain and Newt tool available in a Docker container.\n\n\nThis page provides guidance for installing the tools directly on your MAC and Linux machine. See the relevant sections below.\n\n\n\n\nInstall ARM Cross tools in Mac OS X\n\n\nInstall Tool Chain\n\n\nInstall the PX4 Toolchain and check the version installed. ARM maintains a\npre-built GNU toolchain with a GCC source branch targeted at Embedded ARM\nProcessors, namely Cortex-R/Cortex-M processor families. After installing,\nensure that the symbolic link installed by Homebrew points to the correct\nversion of the debugger.\n\n\n$ brew tap PX4/homebrew-px4\n$ brew upda
 te\n$ brew install gcc-arm-none-eabi-49\n$ arm-none-eabi-gcc --version  \narm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]\nCopyright (C) 2014 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n$ ls -al /usr/local/bin/arm-none-eabi-gdb\nlrwxr-xr-x  1 aditihilbert  admin  69 Sep 22 17:16 /usr/local/bin/arm-none-eabi-gdb -\n /usr/local/Cellar/gcc-arm-none-eabi-49/20150609/bin/arm-none-eabi-gdb\n\n\n\n\n\nNote:\n If no version is specified, brew will install the latest version\navailable. Mynewt OS will eventually work with multiple versions available,\nincluding the latest releases. However, at present we have tested only with\nthis version and recommend it for getting started. \n\n\n\n\nInstall OpenOCD\n\n\nOpenOCD (Open On-Chip Debugger) is open-source software that allows you
 r\ncomputer to interface with the JTAG debug connector on a variety of boards.  A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to \nhttp://openocd.org\n.\n\n\nCurrently, only OpenOCD 0.8.0 is supported.\n\n\n$ brew install open-ocd\n$ which openocd\n/usr/local/bin/openocd\n$ ls -l $(which openocd)\nlrwxr-xr-x  1 \nuser\n  admin  36 Sep 17 16:22 /usr/local/bin/openocd -\n ../Cellar/open-ocd/0.8.0/bin/openocd\n\n\n\n\n\n\n\nInstall ARM cross arm tools for Linux\n\n\nInstall Tool Chain\n\n\nOn a Debian-based Linux distribution, gcc 4.9.3 for ARM can be installed with\napt-get as documented below. The steps are explained in depth at\n\nhttps://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded\n.\n\n\n$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi \n$ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded \n$ sudo apt-get update \n$ sudo apt-get install gcc-arm-none-eabi\n$ sudo apt-get install gdb-arm-none-eabi\n\n\n\n
 \n\n\n\nInstall OpenOCD\n\n\nOpenOCD (Open On-Chip Debugger) is open-source software that allows your\ncomputer to interface with the JTAG debug connector on a variety of boards.  A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to \nhttp://openocd.org\n.\n\n\nIf you are running Ubuntu 15.x, then you are in luck and you can simply run: \n\n\n$ sudo apt-get install openocd \n\n\n\n\n\nFor this project, you should download the openocd 0.8.0 package from\n\nhttps://launchpad.net/ubuntu/vivid/+source/openocd\n.\nThe direct link to the amd64 build is\n\nhttp://launchpadlibrarian.net/188260097/openocd_0.8.0-4_amd64.deb\n.", 
+            "text": "Installing Cross Tools for ARM\n\n\nThis page shows how to install tools on your laptop/computer to use for direct communication (e.g. for debugging) with some ARM based HW platforms running Apache Mynewt. You will also have to use the Newt tool installed to run natively on your machine. You may choose to do this instead of using the build toolchain and Newt tool available in a Docker container.\n\n\nThis page provides guidance for installing the tools directly on your MAC and Linux machine. See the relevant sections below.\n\n\n\n\nInstall ARM Cross tools in Mac OS X\n\n\nInstall Tool Chain\n\n\nInstall the PX4 Toolchain and check the version installed. ARM maintains a\npre-built GNU toolchain with a GCC source branch targeted at Embedded ARM\nProcessors, namely Cortex-R/Cortex-M processor families. After installing,\nensure that the symbolic link installed by Homebrew points to the correct\nversion of the debugger.\n\n\n$ brew tap PX4/homebrew-px4\n$ brew upda
 te\n$ brew install gcc-arm-none-eabi-49\n$ arm-none-eabi-gcc --version  \narm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]\nCopyright (C) 2014 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n$ ls -al /usr/local/bin/arm-none-eabi-gdb\nlrwxr-xr-x  1 aditihilbert  admin  69 Sep 22 17:16 /usr/local/bin/arm-none-eabi-gdb -\n /usr/local/Cellar/gcc-arm-none-eabi-49/20150609/bin/arm-none-eabi-gdb\n\n\n\n\n\nNote:\n If no version is specified, brew will install the latest version\navailable. Mynewt OS will eventually work with multiple versions available,\nincluding the latest releases. However, at present we have tested only with\nthis version and recommend it for getting started. \n\n\n\n\nInstall OpenOCD\n\n\nOpenOCD (Open On-Chip Debugger) is open-source software that allows you
 r\ncomputer to interface with the JTAG debug connector on a variety of boards.  A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to \nhttp://openocd.org\n.\n\n\n$ brew install open-ocd\n$ which openocd\n/usr/local/bin/openocd\n$ ls -l $(which openocd)\nlrwxr-xr-x  1 \nuser\n  admin  36 Sep 17 16:22 /usr/local/bin/openocd -\n ../Cellar/open-ocd/0.9.0/bin/openocd\n\n\n\n\n\n\n\nInstall ARM cross arm tools for Linux\n\n\nInstall Tool Chain\n\n\nOn a Debian-based Linux distribution, gcc 4.9.3 for ARM can be installed with\napt-get as documented below. The steps are explained in depth at\n\nhttps://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded\n.\n\n\n$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi \n$ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded \n$ sudo apt-get update \n$ sudo apt-get install gcc-arm-none-eabi\n$ sudo apt-get install gdb-arm-none-eabi\n\n\n\n\n\n\n\nInstall OpenOCD\n\n\nOpenOCD (Open On-Chi
 p Debugger) is open-source software that allows your\ncomputer to interface with the JTAG debug connector on a variety of boards.  A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to \nhttp://openocd.org\n.\n\n\nIf you are running Ubuntu 15.x, then you are in luck and you can simply run: \n\n\n$ sudo apt-get install openocd \n\n\n\n\n\nFor this project, you should download the openocd 0.8.0 package from\n\nhttps://launchpad.net/ubuntu/vivid/+source/openocd\n.\nThe direct link to the amd64 build is\n\nhttp://launchpadlibrarian.net/188260097/openocd_0.8.0-4_amd64.deb\n.", 
             "title": "Install Cross Tools for ARM"
         }, 
         {
@@ -247,7 +247,7 @@
         }, 
         {
             "location": "/os/get_started/cross_tools/#install-openocd", 
-            "text": "OpenOCD (Open On-Chip Debugger) is open-source software that allows your\ncomputer to interface with the JTAG debug connector on a variety of boards.  A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to  http://openocd.org .  Currently, only OpenOCD 0.8.0 is supported.  $ brew install open-ocd\n$ which openocd\n/usr/local/bin/openocd\n$ ls -l $(which openocd)\nlrwxr-xr-x  1  user   admin  36 Sep 17 16:22 /usr/local/bin/openocd -  ../Cellar/open-ocd/0.8.0/bin/openocd", 
+            "text": "OpenOCD (Open On-Chip Debugger) is open-source software that allows your\ncomputer to interface with the JTAG debug connector on a variety of boards.  A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to  http://openocd.org .  $ brew install open-ocd\n$ which openocd\n/usr/local/bin/openocd\n$ ls -l $(which openocd)\nlrwxr-xr-x  1  user   admin  36 Sep 17 16:22 /usr/local/bin/openocd -  ../Cellar/open-ocd/0.9.0/bin/openocd", 
             "title": "Install OpenOCD"
         }, 
         {
@@ -5872,32 +5872,32 @@
         }, 
         {
             "location": "/network/ble/nimble_setup/", 
-            "text": "Set up a NimBLE application\n\n\nThis tutorial explains how to setup an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.\n\n\nThis tutorial assumes that you have already installed the newt tool and are familiar with its concepts.\n\n\nCreate the application directory\n\n\nYou start by creating a project space for your own application work using the Newt tool (\nmy_app1\n in this example) and installing all the additional apps and libraries available by adding the repo \napache-mynewt-core\n. See the tutorial on \nadding a repo\n for more on working with repos.\n\n\n$ newt new my_app1\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in my_app1...\nProject my_app1 successfully created.\n$ tree\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\u25
 00 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\n6 directories, 11 files\n\n$ cd my_app1\n$ newt install\napache-mynewt-core\n$ tree \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\u2502\u00a0\u00a0         \u2514\u2500\u2500 main.c\n\u251c\u2500\u2500 project.state\n\u251c\u2500\u2
 500 project.yml\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 DISCLAIMER\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 LICENSE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 NOTICE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 RELEASE_NOTES.md\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bleprph\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bleprph.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 gatt_svr.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletest\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u250
 0\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletiny\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bletiny_priv.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 cmd.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 parse.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 periph.c\n\nsnip\n\n\n232 directories, 846 files\n\n\n\n\n\n\n\nIt's time to build your own app usi
 ng one or more of the example apps available in the repo \napache-mynewt-core\n. \n\n\n$ ls repos/apache-mynewt-core/apps\nbleprph     bletiny     boot        luatest     test\nbletest     blinky      ffs2native  slinky\n\n\n\n\n\n\n\nAt the very least your app must contain a \nmain.c()\n and a \npkg.yml\n file. So copy the ones from \nbletiny\n. And start enhancing it for your own custom use case!\n\n\n\n\nCreate the target\n\n\nNow you have to create the target that you will use to build your application. We will call this target \"ble_tgt\". Type the \nnewt target create ble_tgt\n command. You should get this:\n\n\n$ newt target create ble_tgt\nTarget targets/ble_tgt successfully created\n\n\n\n\n\nWhat this command just did was to create a directory called \nble_tgt\n in the targets directory of your project. Two files are created in that directory: pkg.yml and target.yml.\n\n\nThe target is not yet complete though! We need to set some target variables for this project. Currentl
 y, the nimble stack has been ported to the Nordic nrf5x chipsets; specifically the nrf51 and nrf52. This application will use the nrf52 but we will also show the setup for the nrf51 in case your project uses that chip.\n\n\nHere is the command you will need to setup your target for the nrf52:\n\n\n$ newt target set ble_tgt app=apps/ble_app          \\\n                          bsp=hw/bsp/nrf52pdk       \\\n                          build_profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to hw/bsp/nrf52pdk\nTarget targets/ble_tgt successfully set target.build_profile to optimized\n\n\n\n\n\nHere is the command you will need to setup your target for the nrf51:\n\n\n$ newt target set ble_tgt app=apps/ble_app          \\\n                          bsp=hw/bsp/nrf51dk        \\\n                          build_profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarge
 t targets/ble_tgt successfully set target.bsp to hw/bsp/nrf51dk\nTarget targets/ble_tgt successfully set target.build_profile to optimized\n\n\n\n\n\n\n\nNimble stack initialization\n\n\nThere are certain stack initialization steps that are required for a BLE application to be up and running. If you are running a canned example (e.g. bletiny), these steps are already done for you. When you are writing your own app, you may want to assign different initial values or initialize additional packages that you may have added to your project or written yourself. \n\n\nDetails of the initialization step requirements are covered in the section on how to \nInitialize Stack\n.\n\n\n\n\nBuilding the application\n\n\nNow that we have created the application and the target we can build it and test it out. The command you need to run is the newt build command with the target we created (ble_tgt). The output will show the files being compiled and linked. You should see this when all is done (except
  for the ... of course):\n\n\nwes@~/dev/larva$ newt build ble_tgt\n...\nArchiving os.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\nArchiving full.a\nLinking ble_app.elf\nApp successfully built: /Users/wes/dev/larva/bin/ble_tgt/apps/ble_app/ble_app.elf\n\n\n\n\n\nConclusion\n\n\nYou now have a fully functional BLE app (never mind the fact that it doesn't\nactually do anything yet!).  With all the necessary infrastructure in place,\nyou can now start turning this into a real applicaiton.  Additional tutorials\nwith focus on adding application-layer functionality to your Nimble application\nwill be coming soon.  In the meantime, you might get some inspiration from\napache-mynewt-core's example Nimble apps.  These apps can be found at the below locations, relative to your project's base directory:\n\n\n\n\nrepos/apache-mynewt-core/apps/bleprph\n\n\nrepos/apache-mynewt-core/apps/bletiny", 
+            "text": "Set up a NimBLE application\n\n\nThis tutorial explains how to set up an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.\n\n\nThis tutorial assumes that you have already installed the newt tool and are familiar with its concepts.\n\n\nCreate the application directory\n\n\nYou start by creating a project space for your own application work using the Newt tool (\nmy_proj1\n in this example) and installing all the additional apps and libraries available by adding the repo \napache-mynewt-core\n. See the tutorial on \nadding a repo\n for more on working with repos.\n\n\n~/dev$ newt new my_proj1\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in my_proj1...\nProject my_proj1 successfully created.\n~/dev$ tree my_proj1\nmy_proj1\n\u251c\u2500\u2500 DISCLAIMER\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 NOTICE\n\u251c\u2500\u2
 500 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\n6 directories, 11 files\n\n~/dev$ cd my_proj1\n~/dev/my_proj1$ newt install\napache-mynewt-core\n~/dev/my_proj1$ tree\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\u2502\u00a0\u00a0         \u2514\u2500
 \u2500 main.c\n\u251c\u2500\u2500 project.state\n\u251c\u2500\u2500 project.yml\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 DISCLAIMER\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 LICENSE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 NOTICE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 RELEASE_NOTES.md\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bleprph\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bleprph.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 gatt_svr.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletest\n\u2502\u
 00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletiny\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bletiny_priv.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 cmd.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 parse.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 periph.c\n\nsnip\n\n\n232 directori
 es, 846 files\n\n\n\n\n\n\n\nIt's time to build your own app using one or more of the example apps available in the repo \napache-mynewt-core\n. \n\n\n~/dev/my_proj1$ ls repos/apache-mynewt-core/apps\nbleprph     bletiny     boot        luatest     test\nbletest     blinky      ffs2native  slinky\n\n\n\n\n\n\n\nAt the very least your app must contain a \nmain()\n function and a \npkg.yml\n file.  Use the following steps to create minimal ...\n\n\n1. Create the app directory structure.\n\n\n~/dev/my_proj1$ mkdir -p apps/ble_app/src\n\n\n\n\n\n\n\n2. Paste the following contents into \napps/ble_app/pkg.yml\n.\n\n\npkg.name: apps/ble_app\npkg.type: app\n\npkg.deps:\n    - \n@apache-mynewt-core/libs/baselibc\n\n    - \n@apache-mynewt-core/libs/console/full\n\n    - \n@apache-mynewt-core/libs/os\n\n    - \n@apache-mynewt-core/net/nimble/controller\n\n    - \n@apache-mynewt-core/net/nimble/host\n\n\n\n\n\n\n\n\n3. Paste the following contents into \napps/ble_app/src/main.c\n.\n\n\n#includ
 e \nassert.h\n\n\n#include \nos/os.h\n\n\n\nint\n\n\nmain\n(\nvoid\n)\n{\n    \n/* Initialize OS */\n\n    \nos_init\n();\n\n    \n/* Start the OS */\n\n    \nos_start\n();\n\n    \n/* os_start should never return. If it does, this should be an error */\n\n    \nassert\n(\n0\n);\n}\n\n\n\n\n\nIn this \nmain()\n all we are doing is initializing the Mynewt OS and starting it.\n\n\n\n\nCreate the target\n\n\nNow you have to create the target that you will use to build your application. We will call this target \"ble_tgt\". Type the \nnewt target create ble_tgt\n command. You should get this:\n\n\n~/dev/my_proj1$ newt target create ble_tgt\nTarget targets/ble_tgt successfully created\n\n\n\n\n\nWhat this command just did was to create a directory called \nble_tgt\n in the targets directory of your project. Two files are created in that directory: pkg.yml and target.yml.\n\n\nThe target is not yet complete though! We need to set some target variables for this project. Currently, the nimb
 le stack has been ported to the Nordic nrf5x chipsets; specifically the nrf51 and nrf52. This application will use the nrf52 but we will also show the setup for the nrf51 in case your project uses that chip.\n\n\nHere is the command you will need to set up your target for the nrf52:\n\n\n~/dev/my_proj1$ newt target set ble_tgt     \\\n    app=apps/ble_app                        \\\n    bsp=@apache-mynewt-core/hw/bsp/nrf52pdk \\\n    build_profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf52pdk\nTarget targets/ble_tgt successfully set target.build_profile to optimized\n\n\n\n\n\nHere is the command you will need to set up your target for the nrf51:\n\n\n~/dev/my_proj1$ newt target set ble_tgt     \\\n    app=apps/ble_app                        \\\n    bsp=@apache-mynewt-core/hw/bsp/nrf51dk  \\\n    build_profile=optimized\nTarget targets/ble_tgt successfully set ta
 rget.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf51dk\nTarget targets/ble_tgt successfully set target.build_profile to optimized\n\n\n\n\n\n\n\nNimble stack initialization\n\n\nThere are certain stack initialization steps that are required for a BLE application to be up and running. If you are running a canned example (e.g. bletiny), these steps are already done for you. When you are writing your own app, you may want to assign different initial values or initialize additional packages that you may have added to your project or written yourself. \n\n\nDetails of the initialization step requirements are covered in \nInitialize Stack\n step.\n\n\n\n\nBuilding the application\n\n\nNow that we have created the application and the target we can build it and test it out. The command you need to run is the \nnewt build\n command with the target we created (\nble_tgt\n). The output will show the files being compiled and linked. Yo
 u should see this when all is done (except for the \n...\n of course):\n\n\n~/dev/my_proj1$ newt build ble_tgt\n...\nArchiving os.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\nArchiving full.a\nLinking ble_app.elf\nApp successfully built: /Users/wes/dev/my_proj1/bin/ble_tgt/apps/ble_app/ble_app.elf\n\n\n\n\n\nConclusion\n\n\nYou now have a fully functional BLE app (never mind the fact that it doesn't\nactually do anything yet!).  With all the necessary infrastructure in place,\nyou can now start turning this into a real applicaiton.  Additional tutorials\nwith focus on adding application-layer functionality to your Nimble application\nwill be coming soon.  In the meantime, you might get some inspiration from\napache-mynewt-core's example Nimble apps.  These apps can be found at the below locations, relative to your project's base directory:\n\n\n\n\nrepos/apache-mynewt-core/apps/bleprph\n\n\nrepos/apache-mynewt-core/apps/bletiny", 
             "title": "Set up application"
         }, 
         {
             "location": "/network/ble/nimble_setup/#set-up-a-nimble-application", 
-            "text": "This tutorial explains how to setup an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.  This tutorial assumes that you have already installed the newt tool and are familiar with its concepts.", 
+            "text": "This tutorial explains how to set up an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.  This tutorial assumes that you have already installed the newt tool and are familiar with its concepts.", 
             "title": "Set up a NimBLE application"
         }, 
         {
             "location": "/network/ble/nimble_setup/#create-the-application-directory", 
-            "text": "You start by creating a project space for your own application work using the Newt tool ( my_app1  in this example) and installing all the additional apps and libraries available by adding the repo  apache-mynewt-core . See the tutorial on  adding a repo  for more on working with repos.  $ newt new my_app1\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in my_app1...\nProject my_app1 successfully created.\n$ tree\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\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 \u
 2514\u2500\u2500 target.yml\n    \u2514\u2500\u2500 unittest\n        \u251c\u2500\u2500 pkg.yml\n        \u2514\u2500\u2500 target.yml\n\n6 directories, 11 files\n\n$ cd my_app1\n$ newt install\napache-mynewt-core\n$ tree \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\u2502\u00a0\u00a0         \u2514\u2500\u2500 main.c\n\u251c\u2500\u2500 project.state\n\u251c\u2500\u2500 project.yml\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 DISCLAIMER\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 LICENSE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 NOTICE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 RELEASE_NOTES.md\n\u2502\u00a0
 \u00a0     \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bleprph\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bleprph.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 gatt_svr.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletest\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletiny\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u250
 2\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bletiny_priv.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 cmd.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 parse.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 periph.c snip \n\n232 directories, 846 files   It's time to build your own app using one or more of the example apps available in the repo  apache-mynewt-core .   $ ls repos/apache-mynewt-core/apps\nbleprph     bletiny     boot        luatest     test\nbletest     blinky      ffs2native  slinky   At the very least your app must contain a  main.c()  and a  pkg.yml  file. So copy the ones from  bletiny . And start enhancing it for your own custom use case!", 
+            "text": "You start by creating a project space for your own application work using the Newt tool ( my_proj1  in this example) and installing all the additional apps and libraries available by adding the repo  apache-mynewt-core . See the tutorial on  adding a repo  for more on working with repos.  ~/dev$ newt new my_proj1\nDownloading project skeleton from apache/incubator-mynewt-blinky...\nInstalling skeleton in my_proj1...\nProject my_proj1 successfully created.\n~/dev$ tree my_proj1\nmy_proj1\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\n6 directories, 11 files\n\n~/dev$ cd my_proj1\n~/dev/my_proj1$ newt install\napache-mynewt-core\n~/dev/my_proj1$ tree\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\u2502\u00a0\u00a0         \u2514\u2500\u2500 main.c\n\u251c\u2500\u2500 project.state\n\u251c\u2500\u2500 project.yml\n\u251c\u2500\u2500 repos\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 DISCLAIMER\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 LICENSE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 NOTICE\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 README.md\n\u2502\u0
 0a0\u00a0     \u251c\u2500\u2500 RELEASE_NOTES.md\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 apps\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bleprph\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bleprph.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 gatt_svr.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletest\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u251c\u2500\u2500 bletiny\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0
 \u00a0 \u251c\u2500\u2500 pkg.yml\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 bletiny_priv.h\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 cmd.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 main.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u251c\u2500\u2500 parse.c\n\u2502\u00a0\u00a0     \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 periph.c snip \n\n232 directories, 846 files   It's time to build your own app using one or more of the example apps available in the repo  apache-mynewt-core .   ~/dev/my_proj1$ ls repos/apache-mynewt-core/apps\nbleprph     bletiny     boot        luatest     test\nbletest     blinky      ffs2native  slinky   At the very least your app must contain a  main()  function and a  pkg.yml  file.  Use the following step
 s to create minimal ...  1. Create the app directory structure.  ~/dev/my_proj1$ mkdir -p apps/ble_app/src   2. Paste the following contents into  apps/ble_app/pkg.yml .  pkg.name: apps/ble_app\npkg.type: app\n\npkg.deps:\n    -  @apache-mynewt-core/libs/baselibc \n    -  @apache-mynewt-core/libs/console/full \n    -  @apache-mynewt-core/libs/os \n    -  @apache-mynewt-core/net/nimble/controller \n    -  @apache-mynewt-core/net/nimble/host    3. Paste the following contents into  apps/ble_app/src/main.c .  #include  assert.h  #include  os/os.h  int  main ( void )\n{\n     /* Initialize OS */ \n     os_init ();\n\n     /* Start the OS */ \n     os_start ();\n\n     /* os_start should never return. If it does, this should be an error */ \n     assert ( 0 );\n}  In this  main()  all we are doing is initializing the Mynewt OS and starting it.", 
             "title": "Create the application directory"
         }, 
         {
             "location": "/network/ble/nimble_setup/#create-the-target", 
-            "text": "Now you have to create the target that you will use to build your application. We will call this target \"ble_tgt\". Type the  newt target create ble_tgt  command. You should get this:  $ newt target create ble_tgt\nTarget targets/ble_tgt successfully created  What this command just did was to create a directory called  ble_tgt  in the targets directory of your project. Two files are created in that directory: pkg.yml and target.yml.  The target is not yet complete though! We need to set some target variables for this project. Currently, the nimble stack has been ported to the Nordic nrf5x chipsets; specifically the nrf51 and nrf52. This application will use the nrf52 but we will also show the setup for the nrf51 in case your project uses that chip.  Here is the command you will need to setup your target for the nrf52:  $ newt target set ble_tgt app=apps/ble_app          \\\n                          bsp=hw/bsp/nrf52pdk       \\\n                          build_
 profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to hw/bsp/nrf52pdk\nTarget targets/ble_tgt successfully set target.build_profile to optimized  Here is the command you will need to setup your target for the nrf51:  $ newt target set ble_tgt app=apps/ble_app          \\\n                          bsp=hw/bsp/nrf51dk        \\\n                          build_profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to hw/bsp/nrf51dk\nTarget targets/ble_tgt successfully set target.build_profile to optimized", 
+            "text": "Now you have to create the target that you will use to build your application. We will call this target \"ble_tgt\". Type the  newt target create ble_tgt  command. You should get this:  ~/dev/my_proj1$ newt target create ble_tgt\nTarget targets/ble_tgt successfully created  What this command just did was to create a directory called  ble_tgt  in the targets directory of your project. Two files are created in that directory: pkg.yml and target.yml.  The target is not yet complete though! We need to set some target variables for this project. Currently, the nimble stack has been ported to the Nordic nrf5x chipsets; specifically the nrf51 and nrf52. This application will use the nrf52 but we will also show the setup for the nrf51 in case your project uses that chip.  Here is the command you will need to set up your target for the nrf52:  ~/dev/my_proj1$ newt target set ble_tgt     \\\n    app=apps/ble_app                        \\\n    bsp=@apache-mynewt-core/hw/bs
 p/nrf52pdk \\\n    build_profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf52pdk\nTarget targets/ble_tgt successfully set target.build_profile to optimized  Here is the command you will need to set up your target for the nrf51:  ~/dev/my_proj1$ newt target set ble_tgt     \\\n    app=apps/ble_app                        \\\n    bsp=@apache-mynewt-core/hw/bsp/nrf51dk  \\\n    build_profile=optimized\nTarget targets/ble_tgt successfully set target.app to apps/ble_app\nTarget targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf51dk\nTarget targets/ble_tgt successfully set target.build_profile to optimized", 
             "title": "Create the target"
         }, 
         {
             "location": "/network/ble/nimble_setup/#nimble-stack-initialization", 
-            "text": "There are certain stack initialization steps that are required for a BLE application to be up and running. If you are running a canned example (e.g. bletiny), these steps are already done for you. When you are writing your own app, you may want to assign different initial values or initialize additional packages that you may have added to your project or written yourself.   Details of the initialization step requirements are covered in the section on how to  Initialize Stack .", 
+            "text": "There are certain stack initialization steps that are required for a BLE application to be up and running. If you are running a canned example (e.g. bletiny), these steps are already done for you. When you are writing your own app, you may want to assign different initial values or initialize additional packages that you may have added to your project or written yourself.   Details of the initialization step requirements are covered in  Initialize Stack  step.", 
             "title": "Nimble stack initialization"
         }, 
         {
             "location": "/network/ble/nimble_setup/#building-the-application", 
-            "text": "Now that we have created the application and the target we can build it and test it out. The command you need to run is the newt build command with the target we created (ble_tgt). The output will show the files being compiled and linked. You should see this when all is done (except for the ... of course):  wes@~/dev/larva$ newt build ble_tgt\n...\nArchiving os.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\nArchiving full.a\nLinking ble_app.elf\nApp successfully built: /Users/wes/dev/larva/bin/ble_tgt/apps/ble_app/ble_app.elf", 
+            "text": "Now that we have created the application and the target we can build it and test it out. The command you need to run is the  newt build  command with the target we created ( ble_tgt ). The output will show the files being compiled and linked. You should see this when all is done (except for the  ...  of course):  ~/dev/my_proj1$ newt build ble_tgt\n...\nArchiving os.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\nArchiving full.a\nLinking ble_app.elf\nApp successfully built: /Users/wes/dev/my_proj1/bin/ble_tgt/apps/ble_app/ble_app.elf", 
             "title": "Building the application"
         }, 
         {
@@ -5907,12 +5907,12 @@
         }, 
         {
             "location": "/network/ble/ini_stack/ble_ini_intro/", 
-            "text": "Nimble stack initialization\n\n\nWe are now going to explain how to setup your application to initialize the nimble stack and to get the basic stack, and its required modules, initialized and up and running. Note that the code shown here is an example of what is required for nimble stack operation; it is not intended to dictate to the developer exactly how to organize/setup your code. For example, the code sample shows modification of main.c in the application /src folder. The developer has the flexibility to organize the code as they see fit so this code does not need to reside in /src/main.c or in the main() function itself. The only possible issue is the order of some of the initializations. Where this order is important it is indicated in the sections covering stack initialization. \n\n\nA note about the code samples: the main() function in each code sample builds upon the previous example. However, code outside of main() shows only what we add for each step
 . The last code sample shows the entire main.c that we created.\n\n\nLet's start with a very basic main() function (shown below). In this main all we are doing is initializing the Mynewt OS and starting it.\n\n\n#include \nos/os.h\n\n\n\nint\n\n\nmain\n(\nvoid\n)\n{\n    \n/* Initialize OS */\n\n    \nos_init\n();\n\n    \n/* Start the OS */\n\n    \nos_start\n();\n\n    \n/* os start should never return. If it does, this should be an error */\n\n    \nassert\n(\n0\n);\n}\n\n\n\n\n\nThe Nimble stack requires a number of packages/modules to be initialized prior to being started. We are going to add these one by one to the application and describe each.", 
+            "text": "Nimble stack initialization\n\n\nWe are now going to explain how to set up your application to initialize the nimble stack and to get the basic stack, and its required modules, initialized and up and running. Note that the code shown here is an example of what is required for nimble stack operation; it is not intended to dictate to the developer exactly how to organize and set up your code. For example, the code sample shows modification of main.c in the application \n/src\n folder. The developer has the flexibility to organize the code as they see fit so this code does not need to reside in \n/src/main.c\n or in the \nmain()\n function itself. The only possible issue is the order of some of the initializations. Where this order is important it is indicated in the sections covering stack initialization.\n\n\nA note about the code samples: the \nmain()\n function in each code sample builds upon the previous example. However, code outside of \nmain()\n shows only 
 what we add for each step. The last code sample shows the entire \nmain.c\n that we created.\n\n\nLet's start with a very basic \nmain()\n function (shown below). This \nmain()\n function is identical to the minimal version used in the \nSet up application\n introductory page.  In this \nmain()\n all we are doing is initializing the Mynewt OS and starting it.\n\n\n#include \nassert.h\n\n\n#include \nos/os.h\n\n\n\nint\n\n\nmain\n(\nvoid\n)\n{\n    \n/* Initialize OS */\n\n    \nos_init\n();\n\n    \n/* Start the OS */\n\n    \nos_start\n();\n\n    \n/* os start should never return. If it does, this should be an error */\n\n    \nassert\n(\n0\n);\n}\n\n\n\n\n\nThe Nimble stack requires a number of packages to be initialized prior to being started. We are going to add these one by one to the application and describe each.", 
             "title": "toc"
         }, 
         {
             "location": "/network/ble/ini_stack/ble_ini_intro/#nimble-stack-initialization", 
-            "text": "We are now going to explain how to setup your application to initialize the nimble stack and to get the basic stack, and its required modules, initialized and up and running. Note that the code shown here is an example of what is required for nimble stack operation; it is not intended to dictate to the developer exactly how to organize/setup your code. For example, the code sample shows modification of main.c in the application /src folder. The developer has the flexibility to organize the code as they see fit so this code does not need to reside in /src/main.c or in the main() function itself. The only possible issue is the order of some of the initializations. Where this order is important it is indicated in the sections covering stack initialization.   A note about the code samples: the main() function in each code sample builds upon the previous example. However, code outside of main() shows only what we add for each step. The last code sample shows the enti
 re main.c that we created.  Let's start with a very basic main() function (shown below). In this main all we are doing is initializing the Mynewt OS and starting it.  #include  os/os.h  int  main ( void )\n{\n     /* Initialize OS */ \n     os_init ();\n\n     /* Start the OS */ \n     os_start ();\n\n     /* os start should never return. If it does, this should be an error */ \n     assert ( 0 );\n}  The Nimble stack requires a number of packages/modules to be initialized prior to being started. We are going to add these one by one to the application and describe each.", 
+            "text": "We are now going to explain how to set up your application to initialize the nimble stack and to get the basic stack, and its required modules, initialized and up and running. Note that the code shown here is an example of what is required for nimble stack operation; it is not intended to dictate to the developer exactly how to organize and set up your code. For example, the code sample shows modification of main.c in the application  /src  folder. The developer has the flexibility to organize the code as they see fit so this code does not need to reside in  /src/main.c  or in the  main()  function itself. The only possible issue is the order of some of the initializations. Where this order is important it is indicated in the sections covering stack initialization.  A note about the code samples: the  main()  function in each code sample builds upon the previous example. However, code outside of  main()  shows only what we add for each step. The last code sample
  shows the entire  main.c  that we created.  Let's start with a very basic  main()  function (shown below). This  main()  function is identical to the minimal version used in the  Set up application  introductory page.  In this  main()  all we are doing is initializing the Mynewt OS and starting it.  #include  assert.h  #include  os/os.h  int  main ( void )\n{\n     /* Initialize OS */ \n     os_init ();\n\n     /* Start the OS */ \n     os_start ();\n\n     /* os start should never return. If it does, this should be an error */ \n     assert ( 0 );\n}  The Nimble stack requires a number of packages to be initialized prior to being started. We are going to add these one by one to the application and describe each.", 
             "title": "Nimble stack initialization"
         }, 
         {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d0bc8efe/network/ble/ini_stack/ble_ini_intro/index.html
----------------------------------------------------------------------
diff --git a/network/ble/ini_stack/ble_ini_intro/index.html b/network/ble/ini_stack/ble_ini_intro/index.html
index bae3260..5d0c175 100644
--- a/network/ble/ini_stack/ble_ini_intro/index.html
+++ b/network/ble/ini_stack/ble_ini_intro/index.html
@@ -487,10 +487,11 @@
                         </div>
                         
                             <h2 id="nimble-stack-initialization">Nimble stack initialization<a class="headerlink" href="#nimble-stack-initialization" title="Permanent link">&para;</a></h2>
-<p>We are now going to explain how to setup your application to initialize the nimble stack and to get the basic stack, and its required modules, initialized and up and running. Note that the code shown here is an example of what is required for nimble stack operation; it is not intended to dictate to the developer exactly how to organize/setup your code. For example, the code sample shows modification of main.c in the application /src folder. The developer has the flexibility to organize the code as they see fit so this code does not need to reside in /src/main.c or in the main() function itself. The only possible issue is the order of some of the initializations. Where this order is important it is indicated in the sections covering stack initialization. </p>
-<p>A note about the code samples: the main() function in each code sample builds upon the previous example. However, code outside of main() shows only what we add for each step. The last code sample shows the entire main.c that we created.</p>
-<p>Let's start with a very basic main() function (shown below). In this main all we are doing is initializing the Mynewt OS and starting it.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #633820">#include &quot;os/os.h&quot;</span>
+<p>We are now going to explain how to set up your application to initialize the nimble stack and to get the basic stack, and its required modules, initialized and up and running. Note that the code shown here is an example of what is required for nimble stack operation; it is not intended to dictate to the developer exactly how to organize and set up your code. For example, the code sample shows modification of main.c in the application <em>/src</em> folder. The developer has the flexibility to organize the code as they see fit so this code does not need to reside in <em>/src/main.c</em> or in the <em>main()</em> function itself. The only possible issue is the order of some of the initializations. Where this order is important it is indicated in the sections covering stack initialization.</p>
+<p>A note about the code samples: the <em>main()</em> function in each code sample builds upon the previous example. However, code outside of <em>main()</em> shows only what we add for each step. The last code sample shows the entire <em>main.c</em> that we created.</p>
+<p>Let's start with a very basic <em>main()</em> function (shown below). This <em>main()</em> function is identical to the minimal version used in the <a href="../../nimble_setup/">Set up application</a> introductory page.  In this <em>main()</em> all we are doing is initializing the Mynewt OS and starting it.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #633820">#include &lt;assert.h&gt;</span>
+<span style="color: #633820">#include &quot;os/os.h&quot;</span>
 
 <span style="color: #A90D91">int</span>
 <span style="color: #000000">main</span>(<span style="color: #A90D91">void</span>)
@@ -507,8 +508,7 @@
 </pre></div>
 
 
-<p>The Nimble stack requires a number of packages/modules to be initialized prior to being started. We are going to add these one by one to the application and describe each.</p>
-<p><br></p>
+<p>The Nimble stack requires a number of packages to be initialized prior to being started. We are going to add these one by one to the application and describe each.</p>
                         
                         <div class="row">
                             

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d0bc8efe/network/ble/nimble_setup/index.html
----------------------------------------------------------------------
diff --git a/network/ble/nimble_setup/index.html b/network/ble/nimble_setup/index.html
index 3a29811..31e0cc6 100644
--- a/network/ble/nimble_setup/index.html
+++ b/network/ble/nimble_setup/index.html
@@ -413,16 +413,16 @@
                         </div>
                         
                             <h2 id="set-up-a-nimble-application">Set up a NimBLE application<a class="headerlink" href="#set-up-a-nimble-application" title="Permanent link">&para;</a></h2>
-<p>This tutorial explains how to setup an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.</p>
+<p>This tutorial explains how to set up an application using the NimBLE stack. The end result will be a framework that you can use to create your own BLE application using the nimble stack.</p>
 <p>This tutorial assumes that you have already installed the newt tool and are familiar with its concepts.</p>
 <h3 id="create-the-application-directory">Create the application directory<a class="headerlink" href="#create-the-application-directory" title="Permanent link">&para;</a></h3>
-<p>You start by creating a project space for your own application work using the Newt tool (<code>my_app1</code> in this example) and installing all the additional apps and libraries available by adding the repo <code>apache-mynewt-core</code>. See the tutorial on <a href="../../../os/tutorials/add_repos/">adding a repo</a> for more on working with repos.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ newt new my_app1
+<p>You start by creating a project space for your own application work using the Newt tool (<code>my_proj1</code> in this example) and installing all the additional apps and libraries available by adding the repo <code>apache-mynewt-core</code>. See the tutorial on <a href="../../../os/tutorials/add_repos/">adding a repo</a> for more on working with repos.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev$ newt new my_proj1
 Downloading project skeleton from apache/incubator-mynewt-blinky...
-Installing skeleton in my_app1...
-Project my_app1 successfully created.
-$ tree
-.
+Installing skeleton in my_proj1...
+Project my_proj1 successfully created.
+~/dev$ tree my_proj1
+my_proj1
 ├── DISCLAIMER
 ├── LICENSE
 ├── NOTICE
@@ -443,10 +443,10 @@ $ tree
 
 6 directories, 11 files
 
-$ cd my_app1
-$ newt install
+~/dev$ cd my_proj1
+~/dev/my_proj1$ newt install
 apache-mynewt-core
-$ tree 
+~/dev/my_proj1$ tree
 .
 ├── DISCLAIMER
 ├── LICENSE
@@ -492,40 +492,82 @@ $ tree
 
 <p><br></p>
 <p>It's time to build your own app using one or more of the example apps available in the repo <code>apache-mynewt-core</code>. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ ls repos/apache-mynewt-core/apps
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ ls repos/apache-mynewt-core/apps
 bleprph     bletiny     boot        luatest     test
 bletest     blinky      ffs2native  slinky
 </pre></div>
 
 
 <p><br></p>
-<p>At the very least your app must contain a <code>main.c()</code> and a <code>pkg.yml</code> file. So copy the ones from <code>bletiny</code>. And start enhancing it for your own custom use case!</p>
+<p>At the very least your app must contain a <code>main()</code> function and a <code>pkg.yml</code> file.  Use the following steps to create minimal ...</p>
+<p><em>1. Create the app directory structure.</em></p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ mkdir -p apps/ble_app/src
+</pre></div>
+
+
+<p><br>
+<em>2. Paste the following contents into <code>apps/ble_app/pkg.yml</code>.</em></p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">pkg.name: apps/ble_app
+pkg.type: app
+
+pkg.deps:
+    - &quot;@apache-mynewt-core/libs/baselibc&quot;
+    - &quot;@apache-mynewt-core/libs/console/full&quot;
+    - &quot;@apache-mynewt-core/libs/os&quot;
+    - &quot;@apache-mynewt-core/net/nimble/controller&quot;
+    - &quot;@apache-mynewt-core/net/nimble/host&quot;
+</pre></div>
+
+
+<p><br>
+<em>3. Paste the following contents into <code>apps/ble_app/src/main.c</code>.</em></p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #633820">#include &lt;assert.h&gt;</span>
+<span style="color: #633820">#include &quot;os/os.h&quot;</span>
+
+<span style="color: #A90D91">int</span>
+<span style="color: #000000">main</span>(<span style="color: #A90D91">void</span>)
+{
+    <span style="color: #177500">/* Initialize OS */</span>
+    <span style="color: #000000">os_init</span>();
+
+    <span style="color: #177500">/* Start the OS */</span>
+    <span style="color: #000000">os_start</span>();
+
+    <span style="color: #177500">/* os_start should never return. If it does, this should be an error */</span>
+    <span style="color: #000000">assert</span>(<span style="color: #1C01CE">0</span>);
+}
+</pre></div>
+
+
+<p>In this <em>main()</em> all we are doing is initializing the Mynewt OS and starting it.</p>
 <p><br></p>
 <h3 id="create-the-target">Create the target<a class="headerlink" href="#create-the-target" title="Permanent link">&para;</a></h3>
 <p>Now you have to create the target that you will use to build your application. We will call this target "ble_tgt". Type the <code>newt target create ble_tgt</code> command. You should get this:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ newt target create ble_tgt
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt target create ble_tgt
 Target targets/ble_tgt successfully created
 </pre></div>
 
 
 <p>What this command just did was to create a directory called <code>ble_tgt</code> in the targets directory of your project. Two files are created in that directory: pkg.yml and target.yml.</p>
 <p>The target is not yet complete though! We need to set some target variables for this project. Currently, the nimble stack has been ported to the Nordic nrf5x chipsets; specifically the nrf51 and nrf52. This application will use the nrf52 but we will also show the setup for the nrf51 in case your project uses that chip.</p>
-<p>Here is the command you will need to setup your target for the nrf52:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ newt target set ble_tgt app=apps/ble_app          \
-                          bsp=hw/bsp/nrf52pdk       \
-                          build_profile=optimized
+<p>Here is the command you will need to set up your target for the nrf52:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt target set ble_tgt     \
+    app=apps/ble_app                        \
+    bsp=@apache-mynewt-core/hw/bsp/nrf52pdk \
+    build_profile=optimized
 Target targets/ble_tgt successfully set target.app to apps/ble_app
-Target targets/ble_tgt successfully set target.bsp to hw/bsp/nrf52pdk
+Target targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf52pdk
 Target targets/ble_tgt successfully set target.build_profile to optimized
 </pre></div>
 
 
-<p>Here is the command you will need to setup your target for the nrf51:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ newt target set ble_tgt app=apps/ble_app          \
-                          bsp=hw/bsp/nrf51dk        \
-                          build_profile=optimized
+<p>Here is the command you will need to set up your target for the nrf51:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt target set ble_tgt     \
+    app=apps/ble_app                        \
+    bsp=@apache-mynewt-core/hw/bsp/nrf51dk  \
+    build_profile=optimized
 Target targets/ble_tgt successfully set target.app to apps/ble_app
-Target targets/ble_tgt successfully set target.bsp to hw/bsp/nrf51dk
+Target targets/ble_tgt successfully set target.bsp to @apache-mynewt-core/hw/bsp/nrf51dk
 Target targets/ble_tgt successfully set target.build_profile to optimized
 </pre></div>
 
@@ -533,18 +575,18 @@ Target targets/ble_tgt successfully set target.build_profile to optimized
 <p><br></p>
 <h3 id="nimble-stack-initialization">Nimble stack initialization<a class="headerlink" href="#nimble-stack-initialization" title="Permanent link">&para;</a></h3>
 <p>There are certain stack initialization steps that are required for a BLE application to be up and running. If you are running a canned example (e.g. bletiny), these steps are already done for you. When you are writing your own app, you may want to assign different initial values or initialize additional packages that you may have added to your project or written yourself. </p>
-<p>Details of the initialization step requirements are covered in the section on how to <a href="../ini_stack/ble_ini_intro/">Initialize Stack</a>.</p>
+<p>Details of the initialization step requirements are covered in <a href="../ini_stack/ble_ini_intro/">Initialize Stack</a> step.</p>
 <p><br></p>
 <h3 id="building-the-application">Building the application<a class="headerlink" href="#building-the-application" title="Permanent link">&para;</a></h3>
-<p>Now that we have created the application and the target we can build it and test it out. The command you need to run is the newt build command with the target we created (ble_tgt). The output will show the files being compiled and linked. You should see this when all is done (except for the ... of course):</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">wes@~/dev/larva$ newt build ble_tgt
+<p>Now that we have created the application and the target we can build it and test it out. The command you need to run is the <code>newt build</code> command with the target we created (<em>ble_tgt</em>). The output will show the files being compiled and linked. You should see this when all is done (except for the <em>...</em> of course):</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">~/dev/my_proj1$ newt build ble_tgt
 ...
 Archiving os.a
 Compiling cons_fmt.c
 Compiling cons_tty.c
 Archiving full.a
 Linking ble_app.elf
-App successfully built: /Users/wes/dev/larva/bin/ble_tgt/apps/ble_app/ble_app.elf
+App successfully built: /Users/wes/dev/my_proj1/bin/ble_tgt/apps/ble_app/ble_app.elf
 </pre></div>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d0bc8efe/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 5e42cd1..fb15f72 100644
--- a/os/get_started/cross_tools/index.html
+++ b/os/get_started/cross_tools/index.html
@@ -446,12 +446,11 @@ this version and recommend it for getting started. </p>
 computer to interface with the JTAG debug connector on a variety of boards.  A
 JTAG connection lets you debug and test embedded target devices. For more on
 OpenOCD go to <a href="http://openocd.org">http://openocd.org</a>.</p>
-<p>Currently, only OpenOCD 0.8.0 is supported.</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ brew install open-ocd
 $ which openocd
 /usr/local/bin/openocd
 $ ls -l $(which openocd)
-lrwxr-xr-x  1 &lt;user&gt;  admin  36 Sep 17 16:22 /usr/local/bin/openocd -&gt; ../Cellar/open-ocd/0.8.0/bin/openocd
+lrwxr-xr-x  1 &lt;user&gt;  admin  36 Sep 17 16:22 /usr/local/bin/openocd -&gt; ../Cellar/open-ocd/0.9.0/bin/openocd
 </pre></div>