This closes #183. This closes #184. Adding instructions to use Visual Studio 
for Mynewt developers


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

Branch: refs/heads/asf-site
Commit: 65dc6d41afd9c1d6e78ef694225297cd179743e5
Parents: 72f0a44
Author: aditihilbert <[email protected]>
Authored: Mon May 22 09:40:25 2017 -0700
Committer: aditihilbert <[email protected]>
Committed: Mon May 22 09:40:25 2017 -0700

----------------------------------------------------------------------
 develop/faq/answers/index.html                  |   8 +
 develop/faq/go_env/index.html                   |  12 +-
 develop/faq/how_to_edit_docs/index.html         |  12 +-
 develop/faq/ide/index.html                      | 546 +++++++++++++++++++
 develop/faq/pics/debug_new_config_small.png     | Bin 0 -> 71855 bytes
 develop/faq/pics/gdb_debug_small.png            | Bin 0 -> 134895 bytes
 develop/faq/pics/gdb_server_small.png           | Bin 0 -> 99128 bytes
 develop/faq/pics/gdb_small.png                  | Bin 0 -> 59655 bytes
 develop/faq/pics/integrated_terminal_small.png  | Bin 0 -> 51077 bytes
 develop/faq/pics/launch_small.png               | Bin 0 -> 92234 bytes
 develop/faq/pics/task_json_small.png            | Bin 0 -> 93487 bytes
 develop/faq/pics/task_runner_small.png          | Bin 0 -> 92407 bytes
 develop/faq/pics/task_select_small.png          | Bin 0 -> 66049 bytes
 develop/faq/pics/task_start_small.png           | Bin 0 -> 99242 bytes
 develop/mkdocs/search_index.json                | 124 ++++-
 develop/newt/install/newt_windows/index.html    |   9 +-
 develop/newtmgr/install_windows/index.html      |   2 +-
 .../os/get_started/project_create/index.html    |   2 +-
 develop/os/tutorials/arduino_zero/index.html    |   1 +
 develop/os/tutorials/blinky_primo/index.html    |  14 +-
 .../os/tutorials/blinky_stm32f4disc/index.html  |   8 +
 develop/os/tutorials/olimex/index.html          |   6 +-
 .../tutorials/project-stm32-slinky/index.html   |   9 +
 develop/os/tutorials/rbnano2/index.html         |  18 +-
 .../os/tutorials/wi-fi_on_arduino/index.html    |   5 +-
 develop/sitemap.xml                             |  32 +-
 faq/pics/debug_new_config_small.png             | Bin 0 -> 71855 bytes
 faq/pics/gdb_debug_small.png                    | Bin 0 -> 134895 bytes
 faq/pics/gdb_server_small.png                   | Bin 0 -> 99128 bytes
 faq/pics/gdb_small.png                          | Bin 0 -> 59655 bytes
 faq/pics/integrated_terminal_small.png          | Bin 0 -> 51077 bytes
 faq/pics/launch_small.png                       | Bin 0 -> 92234 bytes
 faq/pics/task_json_small.png                    | Bin 0 -> 93487 bytes
 faq/pics/task_runner_small.png                  | Bin 0 -> 92407 bytes
 faq/pics/task_select_small.png                  | Bin 0 -> 66049 bytes
 faq/pics/task_start_small.png                   | Bin 0 -> 99242 bytes
 latest/faq/answers/index.html                   |   8 +
 latest/faq/go_env/index.html                    |  12 +-
 latest/faq/how_to_edit_docs/index.html          |  12 +-
 latest/faq/ide/index.html                       | 546 +++++++++++++++++++
 latest/faq/pics/debug_new_config_small.png      | Bin 0 -> 71855 bytes
 latest/faq/pics/gdb_debug_small.png             | Bin 0 -> 134895 bytes
 latest/faq/pics/gdb_server_small.png            | Bin 0 -> 99128 bytes
 latest/faq/pics/gdb_small.png                   | Bin 0 -> 59655 bytes
 latest/faq/pics/integrated_terminal_small.png   | Bin 0 -> 51077 bytes
 latest/faq/pics/launch_small.png                | Bin 0 -> 92234 bytes
 latest/faq/pics/task_json_small.png             | Bin 0 -> 93487 bytes
 latest/faq/pics/task_runner_small.png           | Bin 0 -> 92407 bytes
 latest/faq/pics/task_select_small.png           | Bin 0 -> 66049 bytes
 latest/faq/pics/task_start_small.png            | Bin 0 -> 99242 bytes
 latest/mkdocs/search_index.json                 | 124 ++++-
 latest/newt/install/newt_windows/index.html     |   9 +-
 latest/newtmgr/install_windows/index.html       |   2 +-
 latest/os/get_started/project_create/index.html |   2 +-
 latest/os/tutorials/arduino_zero/index.html     |   1 +
 latest/os/tutorials/blinky_primo/index.html     |  14 +-
 .../os/tutorials/blinky_stm32f4disc/index.html  |   8 +
 latest/os/tutorials/olimex/index.html           |   6 +-
 .../tutorials/project-stm32-slinky/index.html   |   9 +
 latest/os/tutorials/rbnano2/index.html          |  18 +-
 latest/os/tutorials/wi-fi_on_arduino/index.html |   5 +-
 latest/sitemap.xml                              |  32 +-
 sitemap.xml                                     |  26 +-
 v0_9_0/faq/pics/debug_new_config_small.png      | Bin 0 -> 71855 bytes
 v0_9_0/faq/pics/gdb_debug_small.png             | Bin 0 -> 134895 bytes
 v0_9_0/faq/pics/gdb_server_small.png            | Bin 0 -> 99128 bytes
 v0_9_0/faq/pics/gdb_small.png                   | Bin 0 -> 59655 bytes
 v0_9_0/faq/pics/integrated_terminal_small.png   | Bin 0 -> 51077 bytes
 v0_9_0/faq/pics/launch_small.png                | Bin 0 -> 92234 bytes
 v0_9_0/faq/pics/task_json_small.png             | Bin 0 -> 93487 bytes
 v0_9_0/faq/pics/task_runner_small.png           | Bin 0 -> 92407 bytes
 v0_9_0/faq/pics/task_select_small.png           | Bin 0 -> 66049 bytes
 v0_9_0/faq/pics/task_start_small.png            | Bin 0 -> 99242 bytes
 v0_9_0/sitemap.xml                              |  26 +-
 74 files changed, 1522 insertions(+), 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/answers/index.html
----------------------------------------------------------------------
diff --git a/develop/faq/answers/index.html b/develop/faq/answers/index.html
index 6385c7f..9823050 100644
--- a/develop/faq/answers/index.html
+++ b/develop/faq/answers/index.html
@@ -220,6 +220,14 @@
               
                 
     <li >
+      <a href="../ide/">Using an IDE to Develop Mynewt Applications</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
       <a href="../how_to_edit_docs/">Edit Docs</a>
     </li>
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/go_env/index.html
----------------------------------------------------------------------
diff --git a/develop/faq/go_env/index.html b/develop/faq/go_env/index.html
index aadb28c..c332cfc 100644
--- a/develop/faq/go_env/index.html
+++ b/develop/faq/go_env/index.html
@@ -220,6 +220,14 @@
               
                 
     <li >
+      <a href="../ide/">Using an IDE to Develop Mynewt Applications</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
       <a href="../how_to_edit_docs/">Edit Docs</a>
     </li>
 
@@ -466,8 +474,8 @@ Build and install the tool. The updated binary will be 
installed in the <strong>
     </li>
     <li class="pull-right">
     
-    <a href=../how_to_edit_docs/>
-        Next: Edit Docs
+    <a href=../ide/>
+        Next: Using an IDE to Develop Mynewt Applications
         <span class="fa fa-arrow-right"></span>
     </a>
     

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/how_to_edit_docs/index.html
----------------------------------------------------------------------
diff --git a/develop/faq/how_to_edit_docs/index.html 
b/develop/faq/how_to_edit_docs/index.html
index a0f2954..eef8d87 100644
--- a/develop/faq/how_to_edit_docs/index.html
+++ b/develop/faq/how_to_edit_docs/index.html
@@ -219,6 +219,14 @@
           
               
                 
+    <li >
+      <a href="../ide/">Using an IDE to Develop Mynewt Applications</a>
+    </li>
+
+              
+          
+              
+                
     <li class="active">
       <a href="./">Edit Docs</a>
     </li>
@@ -317,9 +325,9 @@
 <ul class="nav nav-pills" style="margin-bottom: 10px">
     <li>
     
-    <a href=../go_env/>
+    <a href=../ide/>
         <span class="fa fa-arrow-left"></span>
-        Previous: Setting Up Go to Contribute to Newt and Newtmgr Tools
+        Previous: Using an IDE to Develop Mynewt Applications
     </a>
     
     </li>

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/ide/index.html
----------------------------------------------------------------------
diff --git a/develop/faq/ide/index.html b/develop/faq/ide/index.html
new file mode 100644
index 0000000..fdc49c9
--- /dev/null
+++ b/develop/faq/ide/index.html
@@ -0,0 +1,546 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        
+        
+        <!-- This is broken by doc revisioning.
+        <link rel="canonical" href="http://mynewt.apache.org/faq/ide/";> -->
+        <link rel="shortcut icon" href="../../img/favicon.ico">
+
+           <title>Using an IDE to Develop Mynewt Applications - Apache 
Mynewt</title>
+
+        <link href="../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link rel="stylesheet" href="../../css/highlight.css">
+        <link href="../../css/base.css" rel="stylesheet">
+        <link href="../../css/custom.css" rel="stylesheet">
+        <link href="../../css/v2.css" rel="stylesheet">
+        <link href="https://fonts.googleapis.com/css?family=Lato"; 
rel="stylesheet">
+        <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";>
+        <link href="../../extra.css" rel="stylesheet">
+
+        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media 
queries -->
+        <!--[if lt IE 9]>
+            <script 
src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js";></script>
+            <script 
src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js";></script>
+        <![endif]-->
+
+        
+            <script>
+                
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+                
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+                
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+                ga('create', 'UA-72162311-1', 'auto');
+                ga('send', 'pageview');
+            </script>
+        
+    </head>
+
+
+    <body class="Using an IDE to Develop Mynewt Applications">
+
+
+        <div class="container">
+    <div class="row v2-main-banner">
+        <a class="logo-cell" href="/">
+            <img class="logo" src="/img/logo.png">
+        </a>
+        <div class="tagline-cell">
+            <h4 class="tagline">An OS to build, deploy and securely manage 
billions of devices</h4>
+        </div>
+        <div class="news-cell">
+            <div class="well">
+                <h4>Latest News:</h4> <a href="/download">Apache Mynewt 
1.0.0</a> released (March 22, 2017)
+            </div>
+        </div>
+    </div>
+</div>
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" 
data-offset-top="150" role="navigation">
+    <div class="container">
+        <!-- Collapsed navigation -->
+        <div class="navbar-header">
+            <!-- Expander button -->
+            <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-collapse">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+        </div>
+
+        <!-- Expanded navigation -->
+        <div class="navbar-collapse collapse">
+            <!-- Main navigation -->
+            <ul class="nav navbar-nav navbar-right">
+                <li 
+  class=""
+>
+                    <a href="/"><i class="fa fa-home" style="font-size: 
larger;"></i></a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/talks/">Talks</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">Documentation</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/download/">Download</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/community/">Community</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/events/">Events</a>
+                </li>
+            </ul>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar sidebar-container"><div 
id="docSidebar" class="hidden-print" role="complementary">
+    <div class="top">
+        <div role="search">
+            <form id="rtd-search-form" class="wy-form" 
action="../../search.html" method="get">
+                <div class="form-group">
+                    <input type="text" name="q" class="form-control" 
placeholder="Search documentation" />
+                </div>
+            </form>
+        </div>
+    </div>
+    <ul class="toc-nav">
+      <li class="doc-version">
+<select class="form-control" onchange="if (this.value) 
window.location.href=this.value">
+    
+    <option
+      value="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop (latest)
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../go_env/
+">Appendix</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../go_env/">Setting Up Go to Contribute to Newt and Newtmgr 
Tools</a>
+    </li>
+
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">Using an IDE to Develop Mynewt Applications</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../how_to_edit_docs/">Edit Docs</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../answers/">FAQ</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="doc-header">
+                            <div role="navigation" aria-label="breadcrumbs 
navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../go_env/">Appendix</a></li>
+        
+      
+      
+        <li>&raquo; Using an IDE to Develop Mynewt Applications</li>
+      
+    
+    
+  </ul>
+</div>
+                        </div>
+                        
+                            <h2 
id="developing-mynewt-applications-with-visual-studio-code">Developing Mynewt 
Applications with Visual Studio Code</h2>
+<p>This guide shows you how to set up Visual Studio Code to develop and debug 
Mynewt applications. Visual Studio Code is supported on Mac OS, Linux, and 
Windows.  This guide shows you how to:</p>
+<ol>
+<li>Install Visual Studio Code. </li>
+<li>Install the C/C++ and debugger extensions.</li>
+<li>Define task configurations to build Mynewt applications.</li>
+<li>Define debugger configurations to debug Mynewt applications. </li>
+<li>Launch the debugger. </li>
+</ol>
+<p>Prerequisites:</p>
+<ul>
+<li>Have Internet connectivity to fetch remote Mynewt components.</li>
+<li>Have a computer to build a Mynewt application.</li>
+<li>Perform <a href="../../os/get_started/native_install_intro/">native 
installation</a> for the Mynewt tools and toolchains.</li>
+<li>Read the Mynewt OS Concepts section.</li>
+<li>Create a project space (directory structure) and populate it with the core 
code repository (apache-mynewt-core) or know how to as explained in Creating 
Your First Project.  </li>
+<li>Complete one of the <a href="../../os/tutorials/blinky/">Blinky 
Tutorials</a>.</li>
+</ul>
+<p><strong>Notes:</strong> </p>
+<ul>
+<li>This guide is not a tutorial for Visual Studio Code. It assumes you are 
familiar with Visual Studio Code. If this is your first time using Visual 
Studio Code, we recommend that you read the Visual Studio Code <a 
href="https://code.visualstudio.com/docs";>documentation and tutorials</a> and 
evaluate whether you would like to use it to develop Mynewt applications. </li>
+<li>This guide uses Visual Studio Code on Windows. Visual Studio Code is 
supported on Linux and Mac OS but may have some variations in the keyboard 
shortcuts and command names for these platforms. </li>
+<li>You can also use the Eclipse IDE to develop Mynewt applications. See <a 
href="https://www.codecoup.pl/blog/hacking-mynewt-in-eclipse";>https://www.codecoup.pl/blog/hacking-mynewt-in-eclipse</a>
 for more details.</li>
+</ul>
+<h3 id="installing-visual-studio-code">Installing Visual Studio Code</h3>
+<p>Download and install Visual Studio Code from <a 
href="https://code.visualstudio.com/";>https://code.visualstudio.com/</a>.</p>
+<h3 id="installing-the-cc-and-debugger-extensions">Installing the C/C++ and 
Debugger Extensions</h3>
+<p>You need to install two extensions:</p>
+<ol>
+<li>
+<p>The C/C++ extension from Microsoft. This extension provides language 
support such as symbol searching, signatuare help, go to definition, and go to 
declaration.</p>
+</li>
+<li>
+<p>The Native Debug extension from webfreak. This extension provides GDB 
support. </p>
+</li>
+</ol>
+<p><br>
+To install the C/C++ extension:</p>
+<ol>
+<li>Press <code>Ctrl-P</code> to open the search box.</li>
+<li>Type <code>ext install cpptools</code> in the search box and press Enter.  
 You should see the extension at the top of the list. </li>
+<li>Click <code>Install</code> to install the extension. 
+<br></li>
+</ol>
+<p>To install the Native Debugger:</p>
+<ol>
+<li>Press <code>Ctrl-P</code> to open the search box.</li>
+<li>Type <code>ext install webfreak.debug</code> in the search box and press 
Enter.  You should see the Native Debug extension at the top of the list.</li>
+<li>Click <code>Install</code> to install the extension. 
+<br></li>
+</ol>
+<h3 id="defining-tasks-for-mynewt-projects">Defining Tasks for Mynewt 
Projects</h3>
+<p>Two main concepts in Visual Studio Code are workspaces and tasks.  A 
workspace represents a folder that is open.  You can open multiple workspaces 
and switch between workspaces. </p>
+<p>Tasks allow you to integrate the external tools and operations that are 
used to build or test your project into Visual Studio Code. Tasks are run from 
and the task results can be analyzed in Visual Studio Code.  Tasks are defined 
within the scope of a workspace. This means that the tasks you define for a 
workspace only apply to the given workspace.</p>
+<p><br></p>
+<h4 id="associating-a-mynewt-project-to-a-workspace">Associating a Mynewt 
Project to a Workspace</h4>
+<p>For your Mynewt project, your Visual Studio Code workspace is the Mynewt 
project base directory. For example, if you create a project named 
<code>myproj</code> under the <code>~/dev</code> directory, then you open the 
<code>~/dev/myproj</code> folder for your workspace.  </p>
+<p>Select <strong>File</strong> &gt; <strong>Open Folder</strong>, and select 
the <code>myproj</code> folder from the <code>Select Folder</code> dialog box 
to open the folder.</p>
+<p><br></p>
+<h4 
id="defining-visual-studio-code-tasks-to-build-and-debug-mynewt-applications">Defining
 Visual Studio Code Tasks to Build and Debug Mynewt Applications</h4>
+<p>You define Visual Studio Code tasks to build and debug your Mynewt targets 
in Visual Studio Code. We use the Blinky application for the Arduino Zero board 
from the <a href="../../os/tutorials/arduino_zero/">Blinky On Arduino Zero 
Tutorial</a> to illustrate how to define the tasks to build and debug the 
Arduino blinky bootloader and application targets.</p>
+<p>Perform the following steps to create the tasks to build and debug the 
Arduino blinky bootloader and appliction targets:</p>
+<p>Step 1: Press <code>Ctrl-Shift-P</code>, type <code>task</code> in the 
search box, and select <strong>Tasks:Configure Task Runner</strong> from the 
search results.  </p>
+<p>Step 2: Select <strong>Others</strong> (scroll down to the bottom of the 
list) to create a task runner for external commands. 
+<br>
+<p align="center"><img src="/faq/pics/task_runner_small.png"></p>
+<br>
+Tasks are defined in the <code>tasks.json</code> file. You should see the 
<code>.vscode</code> folder created in the <code>MYPROJ</code> folder and a 
<code>tasks.json</code> file created in the <code>.vscode</code> folder.  The 
<code>tasks.json</code> file has the following default values. </p>
+<p><br>
+<p align="center"><img src="/faq/pics/task_json_small.png"></p>
+<br></p>
+<p>The sample <code>tasks.json</code> file defines a simple task that runs the 
echo command with "Hello World" as the argument. </p>
+<p>Step 3: Delete the content from the <code>tasks.json</code> file, add the 
following definitions, and press  <code>Ctrl-S</code> to save the file.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%">{
+    &quot;version&quot;: &quot;0.1.0&quot;,
+    &quot;command&quot;: &quot;newt&quot;,
+    &quot;echoCommand&quot;: true,
+    &quot;isShellCommand&quot;: true,
+
+    &quot;tasks&quot;:[
+        {
+            &quot;taskName&quot;: &quot;build_arduino_boot&quot;,
+            &quot;args&quot;: [&quot;build&quot;, &quot;arduino_boot&quot;],
+            &quot;suppressTaskName&quot;: true
+        },
+        {
+            &quot;taskName&quot;: &quot;build_arduino_blinky&quot;,
+            &quot;args&quot;: [&quot;build&quot;, &quot;arduino_blinky&quot;],
+            &quot;isBuildCommand&quot;: true,  
+            &quot;suppressTaskName&quot;: true
+        },
+        {
+            &quot;taskName&quot;: &quot;create_arduino_blinky&quot;,
+            &quot;args&quot;: [&quot;create-image&quot;, 
&quot;arduino_blinky&quot;, &quot;1.0.0&quot;],
+            &quot;suppressTaskName&quot;:true
+        }, 
+        {
+            &quot;taskName&quot;: &quot;debug_arduino_blinky&quot;,
+            &quot;args&quot;: [&quot;debug&quot;, &quot;arduino_blinky&quot;, 
&quot;-n&quot;],
+            &quot;suppressTaskName&quot;: true
+        }
+    ]
+}
+</pre></div>
+
+
+<p><br>
+The <code>tasks.json</code> file specifies the tasks that are run to build and 
debug the Arduino blinky targets. Each task runs a <code>newt</code> command. 
The <code>newt</code> command to run and the arguments for the 
<code>newt</code> command are passed in the <code>args</code> property for each 
task.  </p>
+<p>The following tasks are defined in this example:</p>
+<ol>
+<li><strong>build_arduino_boot</strong>: Runs the <code>newt build 
arduino_boot</code> command to build the arduino_boot target.</li>
+<li>
+<p><strong>build_arduino_blinky</strong>: Runs the <code>newt build 
arduino_blinky</code> command to build the arduino_blinky target.  </p>
+<p><strong>Note:</strong> This task sets the <code>isBuildCommand</code> 
property to <code>true</code>. This is an optional property that, when set to 
true,  allows you to run the <strong>Tasks: Run Build 
Task</strong>(<code>Ctrl-Shift-B</code>) command to start the task.</p>
+</li>
+<li>
+<p><strong>create_arduino_blinky</strong>: Runs the <code>newt create-image 
arduino_blinky</code> command to create the image file.</p>
+</li>
+<li><strong>debug_arduino_blinky</strong>: Runs the <code>newt build 
arduino_blinky -n</code> command to debug the arduino_blinky target. The 
<code>-n</code> flag is specified to start only the GDB server and not the GDB 
client.  We will launch the GDB client from Visual Studio Code.</li>
+</ol>
+<p>For more information on tasks and all supported properties, see the <a 
href="https://code.visualstudio.com/docs/editor/tasks";>Visual Studio Code Task 
documentation</a>.</p>
+<p><br></p>
+<h4 id="running-a-task">Running a Task</h4>
+<p>To run a task, select <code>Ctrl-Shift-P</code>, type <code>task</code>, 
and select <strong>Tasks: Run Task</strong>.  The tasks that you define in the 
<code>tasks.json</code> file are listed.  Select the task to run. </p>
+<p>The following is an example of running the <code>build_arduino_boot</code> 
task:
+<br>
+<p align="center"><img src="/faq/pics/task_select_small.png"></p>
+<br>
+<br>
+<p align="center"><img src="/faq/pics/task_start_small.png"></p></p>
+<p><br></p>
+<h4 id="defining-tasks-for-other-newt-commands">Defining Tasks for Other Newt 
Commands</h4>
+<p>Other newt commands, such as the <code>newt load</code> command, do not 
need to run from within Visual Studio Code. You can define tasks for them as a 
convenience or run them on the command line from the Visual Studio Code 
integrated terminal (or an external terminal).</p>
+<p>To create the tasks for the <code>newt load arduino_boot</code> and 
<code>newt laod arduino_blinky</code> commands, add the following definitions 
to the <code>tasks.json</code> file:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%">        {
+            &quot;taskName&quot;: &quot;load_arduino_boot&quot;,
+            &quot;args&quot;: [&quot;load&quot;, &quot;arduino_boot&quot;],
+            &quot;suppressTaskName&quot;:true
+        }, 
+        {
+            &quot;taskName&quot;: &quot;load_arduino_blinky&quot;,
+            &quot;args&quot;: [&quot;load&quot;, &quot;arduino_blinky&quot;],
+            &quot;suppressTaskName&quot;:true
+        }, 
+</pre></div>
+
+
+<p><br>
+To run the commands from the Visual Studio integrated terminal, press 
<code>Ctrl-`</code> to launch the integrated terminal and enter the command as 
shown:
+<br>
+<p align="center"><img src="/faq/pics/integrated_terminal_small.png"></p>
+<br></p>
+<h3 id="defining-debugger-configurations">Defining Debugger Configurations</h3>
+<p>You need to define a debugger configuration to launch the GDB debugger from 
within Visual Studio Code: </p>
+<p>Step 1: Select <strong>Debug</strong> &gt; <strong>Open 
Configuration</strong>, and select the <strong>GDB</strong> environment.</p>
+<p><br>
+<p align="center"><img src="/faq/pics/debug_new_config_small.png"></p>
+<br></p>
+<p>You should see a default <code>launch.json</code> file created in the 
<code>.vscode</code> folder.
+<br>
+<p align="center"><img src="/faq/pics/launch_small.png"></p>
+<br></p>
+<p><br>
+Step 2: Delete the content from the <code>launch.json</code> file, add the 
following definitions, and press 'Ctrl-S' to save the file.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%">{
+    &quot;version&quot;: &quot;0.2.0&quot;,
+    &quot;configurations&quot;: [
+        {
+            &quot;name&quot;: &quot;gdb_arduino_blinky&quot;,
+            &quot;type&quot;: &quot;gdb&quot;,
+            &quot;request&quot;: &quot;attach&quot;,
+            &quot;executable&quot;: 
&quot;${workspaceRoot}\\bin\\targets\\arduino_blinky\\app\\apps\\blinky\\blinky.elf&quot;,
+            &quot;target&quot;: &quot;:3333&quot;,
+            &quot;cwd&quot;: &quot;${workspaceRoot}&quot;,
+            &quot;gdbpath&quot;: &quot;arm-none-eabi-gdb.exe&quot;,
+            &quot;remote&quot;: true
+
+        }
+    ]
+}
+</pre></div>
+
+
+<p><br>
+This defines a <code>gdb_arduino_blinky</code> debugger configuration. It 
specifies: </p>
+<ul>
+<li>The debugger is type <strong>gdb</strong>.</li>
+<li>To use the <code>blinky.elf</code> file for the executable. </li>
+<li>To use port 3333 to connect with the remote target.</li>
+<li>To use arm-none-eabi-gdb for the GDB program. 
+<br></li>
+</ul>
+<h3 id="debugging-your-application">Debugging Your Application</h3>
+<p>To debug your application, start the GDB server and launch the GDB session 
from Visual Studio Code. For the the arduino blinky example, perform the 
following:</p>
+<p>Step 1: Run the debug_arduino_blinky task to start the GDB server. Perform 
the following:</p>
+<ol>
+<li>Press <code>Ctrl-Shift-P</code> and type <code>task</code> in the search 
box. </li>
+<li>Select <strong>Tasks:Run Task</strong> &gt; 
<strong>debug_arduino_blinky</strong>.</li>
+<li>Press <code>Ctrl-Shift-U</code> to open the Output Panel and see the 
OpenOCD GDB Server output.
+<br>  <br />
+<p align="center"><img src="/faq/pics/gdb_server_small.png"></p>
+<br></li>
+</ol>
+<p>Step 2: Start the GDB session. Perform the following: </p>
+<ol>
+<li>Press <code>Ctrl-Shift-Y</code>  to view the Debug Console. </li>
+<li>Press the Debugging icon on the activity bar (Ctrl-Shift-D) to bring up 
the Debug Side Bar.</li>
+<li>Select <code>gdb_arduino_blinky</code> from the DEBUG drop down menu. </li>
+<li>Press the green play button to start the gdb session.</li>
+</ol>
+<p align="center"><img src="/faq/pics/gdb_small.png"></p>
+
+<p><br>
+Step 3: Debug your application. You should see a debug session similar to the 
one shown below:
+<p align="center"><img src="/faq/pics/gdb_debug_small.png"></p>
+<br>
+For more information on how to use the Visual Studio Code Debugger, see the <a 
href="https://code.visualstudio.com/docs/editor/debugging";>Visual Studio Code 
debugging documentation</a>.</p>
+<h3 id="working-with-multiple-mynewt-applications">Working with Multiple 
Mynewt Applications</h3>
+<p>As mentioned previously,  each mynewt project corresponds to a Visual 
Studio Code workspace.  If you have multiple Mynewt application targets defined 
in same project, you will need to define build and debug tasks for each target 
in the <code>tasks.json</code> file and debugger configurations for the targets 
in the <code>launch.json</code> file for the workspace. If you have a different 
Mynewt project for each mynewt application, you will need to define build and 
debug tasks in the <code>tasks.json</code> file and the debugger configuration 
in the <code>launch.json</code> file for each workspace. </p>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../go_env/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: Setting Up Go to Contribute to Newt and Newtmgr Tools
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../how_to_edit_docs/>
+        Next: Edit Docs
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <footer class="row">
+    <div class="col-xs-12">
+        
+            <p class="copyright">Apache Mynewt (incubating) is available under 
Apache License, version 2.0.</p>
+        
+    </div>
+    <div class="col-xs-12">
+        <div class="logos">
+            <img src="/img/asf_logo_wide_small.png" alt="Apache" 
title="Apache">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache 
Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is 
required of all newly accepted projects until a further review indicates that 
the infrastructure, communications, and decision making process have stabilized 
in a manner consistent with other successful ASF projects. While incubation 
status is not necessarily a reflection of the completeness or stability of the 
code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+            <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache 
Incubator">
+        </div>
+    </div>
+</footer>
+                    </div>
+                </div>
+            
+            
+        </div>
+
+        <script src="../../js/jquery-1.10.2.min.js"></script>
+        <script src="../../js/bootstrap-3.0.3.min.js"></script>
+        <script src="../../js/highlight.pack.js"></script>
+        <script src="../../js/base.js"></script>
+        <script src="../../js/custom.js"></script>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/debug_new_config_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/debug_new_config_small.png 
b/develop/faq/pics/debug_new_config_small.png
new file mode 100755
index 0000000..5d2e287
Binary files /dev/null and b/develop/faq/pics/debug_new_config_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/gdb_debug_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/gdb_debug_small.png 
b/develop/faq/pics/gdb_debug_small.png
new file mode 100755
index 0000000..5ebfb11
Binary files /dev/null and b/develop/faq/pics/gdb_debug_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/gdb_server_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/gdb_server_small.png 
b/develop/faq/pics/gdb_server_small.png
new file mode 100755
index 0000000..e6a42d7
Binary files /dev/null and b/develop/faq/pics/gdb_server_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/gdb_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/gdb_small.png b/develop/faq/pics/gdb_small.png
new file mode 100755
index 0000000..f6c35d2
Binary files /dev/null and b/develop/faq/pics/gdb_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/integrated_terminal_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/integrated_terminal_small.png 
b/develop/faq/pics/integrated_terminal_small.png
new file mode 100755
index 0000000..11414c8
Binary files /dev/null and b/develop/faq/pics/integrated_terminal_small.png 
differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/launch_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/launch_small.png 
b/develop/faq/pics/launch_small.png
new file mode 100755
index 0000000..5c13dcf
Binary files /dev/null and b/develop/faq/pics/launch_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/task_json_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/task_json_small.png 
b/develop/faq/pics/task_json_small.png
new file mode 100755
index 0000000..5047f61
Binary files /dev/null and b/develop/faq/pics/task_json_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/task_runner_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/task_runner_small.png 
b/develop/faq/pics/task_runner_small.png
new file mode 100755
index 0000000..25a70fa
Binary files /dev/null and b/develop/faq/pics/task_runner_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/task_select_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/task_select_small.png 
b/develop/faq/pics/task_select_small.png
new file mode 100755
index 0000000..35bc304
Binary files /dev/null and b/develop/faq/pics/task_select_small.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/65dc6d41/develop/faq/pics/task_start_small.png
----------------------------------------------------------------------
diff --git a/develop/faq/pics/task_start_small.png 
b/develop/faq/pics/task_start_small.png
new file mode 100755
index 0000000..f84cd26
Binary files /dev/null and b/develop/faq/pics/task_start_small.png differ

Reply via email to