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/07/14 00:58:45 UTC

[1/5] incubator-mynewt-site git commit: Included details

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/develop 7a69d2b60 -> 36994875a


Included details


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

Branch: refs/heads/develop
Commit: c36e0506a9abb15d971411e460b4baa954cf87d4
Parents: 5cbd258
Author: David G. Simmons <sa...@mac.com>
Authored: Wed Jul 13 11:54:43 2016 -0400
Committer: David G. Simmons <sa...@mac.com>
Committed: Wed Jul 13 11:54:43 2016 -0400

----------------------------------------------------------------------
 docs/os/tutorials/tutorials.md | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/c36e0506/docs/os/tutorials/tutorials.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/tutorials.md b/docs/os/tutorials/tutorials.md
index 3cd4e7a..8122960 100644
--- a/docs/os/tutorials/tutorials.md
+++ b/docs/os/tutorials/tutorials.md
@@ -8,6 +8,14 @@ The full list of tutorials can be seen in the navigation bar on the left. New on
 
 * You have installed Docker container of Newt tool and toolchains or you have installed them natively on your machine
 * You have created a new 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](../get_started/project_create).
+* You have at least one of the supported development boards: 
+    * [STM32F3 discovery kit from ST Micro](STM32F303.md)
+    * [Arduino Zero hardware](arduino_zero.md)
+    * [Olimex/STM32F407ZGT6 Cortex-M4 hardware](olimex.md)
+    * [nRF52 Development Kit from Nordic Semiconductor](nRF52.md)
+    
+The Nordic nrf52 developer kit supports Bluetooth Low Energy. We are always looking to add new hardware to the list, so if you want to develop the required Board Support Package (bsp) and/or Hardware Abstraction Layer (HAL) for a new board, you can look [here](../../core_os/porting/port_os/) to get started.
+    
 
 ###Tutorial categories:
 


[4/5] incubator-mynewt-site git commit: Merge branch 'master' of https://github.com/davidgs/incubator-mynewt-site into develop

Posted by ad...@apache.org.
Merge branch 'master' of https://github.com/davidgs/incubator-mynewt-site into develop

This closes #107


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

Branch: refs/heads/develop
Commit: cce720e4fd1c80cfa96273defc58cd3be7872911
Parents: 7a69d2b 775debf
Author: aditihilbert <ad...@runtime.io>
Authored: Wed Jul 13 10:51:45 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Wed Jul 13 10:51:45 2016 -0700

----------------------------------------------------------------------
 docs/os/tutorials/add_newtmgr.md | 191 ++++++++++++++++++++++++++++++++++
 docs/os/tutorials/tutorials.md   |   8 ++
 2 files changed, 199 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/cce720e4/docs/os/tutorials/tutorials.md
----------------------------------------------------------------------
diff --cc docs/os/tutorials/tutorials.md
index 3aaaeb2,8122960..50897fe
--- a/docs/os/tutorials/tutorials.md
+++ b/docs/os/tutorials/tutorials.md
@@@ -10,9 -8,15 +10,17 @@@ The full list of tutorials can be seen 
  
  * You have installed Docker container of Newt tool and toolchains or you have installed them natively on your machine
  * You have created a new 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](../get_started/project_create).
+ * You have at least one of the supported development boards: 
+     * [STM32F3 discovery kit from ST Micro](STM32F303.md)
+     * [Arduino Zero hardware](arduino_zero.md)
+     * [Olimex/STM32F407ZGT6 Cortex-M4 hardware](olimex.md)
+     * [nRF52 Development Kit from Nordic Semiconductor](nRF52.md)
+     
+ The Nordic nrf52 developer kit supports Bluetooth Low Energy. We are always looking to add new hardware to the list, so if you want to develop the required Board Support Package (bsp) and/or Hardware Abstraction Layer (HAL) for a new board, you can look [here](../../core_os/porting/port_os/) to get started.
+     
  
 +<br>
 +
  ###Tutorial categories:
  
  The tutorials fall into a few broad categories. Some examples in each category are listed below.


[2/5] incubator-mynewt-site git commit: A short tutorial on how to enable newtmgr

Posted by ad...@apache.org.
A short tutorial on how to enable newtmgr

Adds newtmgr functionality to tiny_ble


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

Branch: refs/heads/develop
Commit: de12087504e3e19ecff48c7b57398286c91459d9
Parents: c36e050
Author: David G. Simmons <sa...@mac.com>
Authored: Wed Jul 13 12:40:42 2016 -0400
Committer: David G. Simmons <sa...@mac.com>
Committed: Wed Jul 13 12:40:42 2016 -0400

----------------------------------------------------------------------
 docs/os/tutorials/add_newtmgr.md | 183 ++++++++++++++++++++++++++++++++++
 1 file changed, 183 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/de120875/docs/os/tutorials/add_newtmgr.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/add_newtmgr.md b/docs/os/tutorials/add_newtmgr.md
new file mode 100644
index 0000000..8b3471e
--- /dev/null
+++ b/docs/os/tutorials/add_newtmgr.md
@@ -0,0 +1,183 @@
+##Enabling the Newt Manager (newtmgr) in a project
+
+<br>
+
+This tutorial explains how to add the newtmgr task to a project so that you can interact with your project over newtmgr
+
+<br>
+
+### Pre-Requisites
+
+* Ensure you have installed [newt](../../newt/install/newt_mac.md) and that the 
+newt command is in your system path. 
+* Ensure that you have installed the newtmgr tool [newtmgr](../../newtmgr/installing.md)
+* You must have Internet connectivity to fetch remote Mynewt components.
+* You must [install the compiler tools](../get_started/native_tools.md) to 
+support native compiling to build the project this tutorial creates.  
+* You must install the [Segger JLINK package]( https://www.segger.com/jlink-software.html) to load your project on the board.
+* Cable to establish a serial USB connection between the board and the laptop
+
+<br>
+
+### Use an existing project
+
+Since all we're doing is adding newtmgr capability to a project, we assume that you have worked through at least some of the other tutorials, and have an existing project.
+For this example, we'll be modifying the [ble_tiny](bletiny_project.md) project to enable newtmgr connectivity. We'll be calling our app myble as in that project as well. 
+Feel free to use whatever project you'd like though.
+
+<br>
+
+###Modify the source
+
+First, you'll need to include the newtmgr header file:
+
+```
+
+#include <newtmgr/newtmgr.h>
+```
+
+
+Next, you'll need to declare a task for the newtmgr:
+
+```
+
+#define NEWTMGR_TASK_PRIO (4)
+#define NEWTMGR_TASK_STACK_SIZE (OS_STACK_ALIGN(896))
+os_stack_t newtmgr_stack[NEWTMGR_TASK_STACK_SIZE];
+```
+
+Next you'll scroll down (way down) to the ```main()``` function and find the lines:
+
+```
+rc = console_init(shell_console_rx_cb);
+assert(rc == 0);
+```
+
+After those lines, add:
+
+```
+nmgr_task_init(NEWTMGR_TASK_PRIO, newtmgr_stack, NEWTMGR_TASK_STACK_SIZE);
+```
+
+### Build targets
+
+Then build the two targets.
+
+```
+$ newt build nrf52_boot
+<snip>
+App successfully built: ./bin/nrf52_boot/apps/boot/boot.elf
+$ newt build myble
+Compiling hci_common.c
+Compiling util.c
+Archiving nimble.a
+Compiling os.c
+<snip>
+```
+
+<br>
+
+### Create the app image
+
+Generate a signed application image for the `myble` target. The version number is arbitrary.
+
+```
+$ newt create-image myble 1.0.0
+App image succesfully generated: ./bin/makerbeacon/apps/bletiny/bletiny.img
+Build manifest: ./bin/makerbeacon/apps/bletiny/manifest.json
+```
+
+<br>
+
+### Load the image
+
+Make sure the USB connector is in place and the power LED on the board is lit. Use the Power ON/OFF switch to reset the board after loading the image.
+
+```
+$ newt load nrf52_boot
+$ newt load myble
+```
+
+<br>
+
+### Set up newtmgr connection
+
+Newtmgr reqwiures a connection profile in order to connect to your board. If you haven't yet, follow the [instructions](../../newtmgr/overview.md) for setting up your connection profile.
+
+<br>
+
+###Connecting with your app
+
+Once you have a connection profile set up, you can connect to your device with ```newtmgr -c myconn <command>``` to run commands agains your app. 
+    
+To test and make sure that newtmgr is working, try the echo command:
+
+```
+# newtmgr -c myconn echo hello
+{"r": "hello"}
+```
+
+Newtmgr wraped the response in valid JSON notation. Now let's look at some BLE stats using newtmgr:
+
+```
+newtmgr -c myconn stat ble_att
+Return Code = 0
+Stats Name: ble_att
+  prep_write_req_tx: 0
+  indicate_req_tx: 0
+  write_rsp_tx: 0
+  find_info_req_tx: 0
+  read_rsp_rx: 0
+  read_group_type_rsp_tx: 0
+  indicate_req_rx: 0
+  find_type_value_rsp_tx: 0
+  read_mult_rsp_tx: 0
+  exec_write_req_rx: 0
+  exec_write_rsp_tx: 0
+  error_rsp_tx: 0
+  find_type_value_rsp_rx: 0
+  read_type_req_tx: 0
+  read_type_rsp_rx: 0
+  read_rsp_tx: 0
+  read_blob_req_tx: 0
+  mtu_req_tx: 0
+  read_req_tx: 0
+  read_blob_rsp_tx: 0
+  read_mult_req_rx: 0
+  write_req_tx: 0
+  prep_write_rsp_tx: 0
+  indicate_rsp_rx: 0
+  write_cmd_rx: 0
+  exec_write_rsp_rx: 0
+  find_info_req_rx: 0
+  mtu_rsp_rx: 0
+  prep_write_req_rx: 0
+  notify_req_rx: 0
+  read_group_type_rsp_rx: 0
+  prep_write_rsp_rx: 0
+  indicate_rsp_tx: 0
+  find_info_rsp_tx: 0
+  read_blob_req_rx: 0
+  read_group_type_req_rx: 0
+  write_cmd_tx: 0
+  mtu_req_rx: 0
+  read_mult_rsp_rx: 0
+  write_rsp_rx: 0
+  write_req_rx: 0
+  read_type_rsp_tx: 0
+  read_mult_req_tx: 0
+  error_rsp_rx: 0
+  find_info_rsp_rx: 0
+  find_type_value_req_tx: 0
+  read_req_rx: 0
+  read_type_req_rx: 0
+  notify_req_tx: 0
+  mtu_rsp_tx: 0
+  find_type_value_req_rx: 0
+  read_blob_rsp_rx: 0
+  read_group_type_req_tx: 0
+  exec_write_req_tx: 0
+```
+
+Your application is now able to communicate via newtmgr!
+


[3/5] incubator-mynewt-site git commit: Forgot the pkg.yml mod

Posted by ad...@apache.org.
Forgot the pkg.yml mod


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

Branch: refs/heads/develop
Commit: 775debf28958320e248b57317d8578228841d1a5
Parents: de12087
Author: David G. Simmons <sa...@mac.com>
Authored: Wed Jul 13 12:47:21 2016 -0400
Committer: David G. Simmons <sa...@mac.com>
Committed: Wed Jul 13 12:47:21 2016 -0400

----------------------------------------------------------------------
 docs/os/tutorials/add_newtmgr.md | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/775debf2/docs/os/tutorials/add_newtmgr.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/add_newtmgr.md b/docs/os/tutorials/add_newtmgr.md
index 8b3471e..e483a3a 100644
--- a/docs/os/tutorials/add_newtmgr.md
+++ b/docs/os/tutorials/add_newtmgr.md
@@ -25,6 +25,14 @@ Since all we're doing is adding newtmgr capability to a project, we assume that
 For this example, we'll be modifying the [ble_tiny](bletiny_project.md) project to enable newtmgr connectivity. We'll be calling our app myble as in that project as well. 
 Feel free to use whatever project you'd like though.
 
+The first thing you'll need to add is a new dependency for your app. In the repo for the bletiny app you'll need to add the following line to the pkg.yml file:
+
+```
+ - libs/newtmgr
+ ```
+ 
+so that the application will know to pull in the newtmgr code.
+
 <br>
 
 ###Modify the source


[5/5] incubator-mynewt-site git commit: organized newtmgr tutorials to differentiate between pull request #107 and existing Slinky tutorials

Posted by ad...@apache.org.
organized newtmgr tutorials to differentiate between pull request #107 and existing Slinky tutorials


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

Branch: refs/heads/develop
Commit: 36994875ad38a8d7b3b2697279fd7a594ede2f47
Parents: cce720e
Author: aditihilbert <ad...@runtime.io>
Authored: Wed Jul 13 17:55:32 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Wed Jul 13 17:55:32 2016 -0700

----------------------------------------------------------------------
 docs/os/tutorials/add_newtmgr.md           |  8 ++++----
 docs/os/tutorials/project-slinky.md        |  8 ++++++--
 docs/os/tutorials/project-target-slinky.md | 10 +++++++---
 mkdocs.yml                                 |  6 ++++--
 4 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/36994875/docs/os/tutorials/add_newtmgr.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/add_newtmgr.md b/docs/os/tutorials/add_newtmgr.md
index e483a3a..24f7483 100644
--- a/docs/os/tutorials/add_newtmgr.md
+++ b/docs/os/tutorials/add_newtmgr.md
@@ -1,8 +1,8 @@
-##Enabling the Newt Manager (newtmgr) in a project
+##Enabling Newt Manager (newtmgr) in a project
 
 <br>
 
-This tutorial explains how to add the newtmgr task to a project so that you can interact with your project over newtmgr
+This tutorial explains how to add the newtmgr task to a project so that you can interact with your project over newtmgr.
 
 <br>
 
@@ -29,9 +29,9 @@ The first thing you'll need to add is a new dependency for your app. In the repo
 
 ```
  - libs/newtmgr
- ```
+```
  
-so that the application will know to pull in the newtmgr code.
+Now the application will know to pull in the newtmgr code.
 
 <br>
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/36994875/docs/os/tutorials/project-slinky.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/project-slinky.md b/docs/os/tutorials/project-slinky.md
index 2949437..5537001 100644
--- a/docs/os/tutorials/project-slinky.md
+++ b/docs/os/tutorials/project-slinky.md
@@ -1,9 +1,13 @@
 ## Project Sim Slinky  
 
 
-### Objective
+<br>
+
+The goal of the project is to use a sample app called "Slinky" included in the Mynewt repository to enable remote communications with a device running the Mynewt OS. The protocol for remote communications is called newt manager (newtmgr). In this tutorial we will create a target for a simulated device and define it with the sample app "Slinky". 
 
-The goal of the project is to enable and demonstrate remote communications with the Mynewt OS via newt manager (newtmgr). We will do this through building a project with Mynewt called Slinky that runs via the native platform. 
+If you have an existing project using a target that does not use the Slinky app and you wish to add newtmgt functonality to it, check out the tutorial titled [Enable newtmgr in any app](add_newtmgr.md). 
+
+<br>
 
 ### What you need
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/36994875/docs/os/tutorials/project-target-slinky.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/project-target-slinky.md b/docs/os/tutorials/project-target-slinky.md
index 8f71650..ca2d66a 100644
--- a/docs/os/tutorials/project-target-slinky.md
+++ b/docs/os/tutorials/project-target-slinky.md
@@ -1,9 +1,13 @@
-## Project Slinky 
+## Project Slinky using STM32 board
 
 
-### Objective
+<br>
+
+The goal of the project is to enable and demonstrate remote communications with the Mynewt OS via newt manager (newtmgr) by leveraging a sample app "Slinky" included under the /apps directory in the repository. In this project we will define a target for the STM32-E407 board and assign the app "Slinky" to it.
 
-The goal of the project is to enable and demonstrate remote communications with the Mynewt OS via newt manager (newtmgr). We will do this through a project with Mynewt called Slinky that runs on the STM32-E407 board.
+If you have an existing project using a target that does not use the Slinky app and you wish to add newtmgt functonality to it, check out the tutorial titled [Enable newtmgr in any app](add_newtmgr.md). 
+
+<br>
 
 ### What you need
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/36994875/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index a89d6e4..70ce3f2 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -42,8 +42,10 @@ pages:
         - 'Write a Test Suite for a Package': 'os/tutorials/unit_test.md'
         - 'Air-quality Sensor project': 'os/tutorials/air_quality_sensor.md'
         - 'Add task to manage multiple events': 'os/tutorials/event_queue.md'
-        - 'Enable remote comms on sim device': 'os/tutorials/project-slinky.md'
-        - 'Enable remote comms on STM32 board': 'os/tutorials/project-target-slinky.md'
+        - 'Project Slinky for remote comms': 
+            - 'Slinky on sim device': 'os/tutorials/project-slinky.md'
+            - 'Slinky on STM32 board': 'os/tutorials/project-target-slinky.md'
+        - 'Enable newtmgr in any app': 'os/tutorials/add_newtmgr.md' 
         - 'BLE app to check stats via console': 'os/tutorials/bletiny_project.md'
         - 'BLE peripheral project':
             - toc: 'os/tutorials/bleprph/bleprph-intro.md'