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/03/17 02:25:56 UTC

[1/2] incubator-mynewt-site git commit: Updated Blinky on Olimex tutorial. Closes pull request #53

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/asf-site 2393faf30 -> 477d85dcd


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/477d85dc/os/tutorials/olimex/index.html
----------------------------------------------------------------------
diff --git a/os/tutorials/olimex/index.html b/os/tutorials/olimex/index.html
index 5df2b89..1a5266b 100644
--- a/os/tutorials/olimex/index.html
+++ b/os/tutorials/olimex/index.html
@@ -454,12 +454,18 @@
                         
                             <h2 id="blinky-your-hello-world">Blinky, Your Hello World!<a class="headerlink" href="#blinky-your-hello-world" title="Permanent link">&para;</a></h2>
 <h3 id="objective">Objective<a class="headerlink" href="#objective" title="Permanent link">&para;</a></h3>
-<p>Learn how to use packages from a default application repository of Mynewt to build your first <em>Hello World</em> application (Blinky) on a target board. Once built using <em>newt</em> tool, this application will blink the LED lights on the target board. Fun stuff!</p>
-<p>This tutorial will guide to achieve the following, assuming you have already set up the environment on your computer to use Mynewt OS and newt tool:</p>
-<p>Download packages and use tools to create a runtime image for a board to make its LED blink. You have two choices here:
-    * <a href="#use-sram-to-make-led-blink">Download an image to SRAM</a>, or 
-    * <a href="#use-flash-to-make-led-blink">Download it to flash</a>.</p>
+<p>Learn how to use packages from a default application repository of Mynewt to build your first <em>Hello World</em> application (Blinky) on a target board. Once built using the <em>newt</em> tool, this application will blink the LED lights on the target board. Fun stuff!</p>
+<p>This tutorial will guide you to achieve the following, assuming you have already set up the environment on your computer to use Mynewt OS and newt tool:</p>
+<ul>
+<li>Download packages and use tools to create a runtime image for a board to make its LED blink. You have two choices here:<ul>
+<li><a href="#use-sram-to-make-led-blink">Download an image to SRAM</a>, or </li>
+<li><a href="#use-flash-to-make-led-blink">Download it to flash</a>.</li>
+</ul>
+</li>
+</ul>
+<p><br></p>
 <p><strong> Time Requirement</strong>: Allow yourself a couple of hours for this project if you are relatively new to embedded systems and playing with development boards. Those jumpers can be pesky!</p>
+<p><br></p>
 <h3 id="what-you-need">What you need<a class="headerlink" href="#what-you-need" title="Permanent link">&para;</a></h3>
 <ol>
 <li>STM32-E407 development board from Olimex. You can order it from <a href="http://www.mouser.com/ProductDetail/Olimex-Ltd/STM32-E407/?qs=UN6GZl1KCcit6Ye0xmPO4A%3D%3D">http://www.mouser.com</a>, <a href="http://www.digikey.com/product-detail/en/STM32-E407/1188-1093-ND/3726951">http://www.digikey.com</a>, and other places.</li>
@@ -467,105 +473,92 @@
 <li>USB A-B type cable to connect the debugger to your personal computer</li>
 <li>Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)</li>
 <li>An account on Github repository and <em>git</em> installed on your computer.</li>
-<li>It assumed you already installed native tools described <a href="../../get_started/native_tools/">here</a></li>
+<li>It is assumed you have already installed newt tool. </li>
+<li>It is assumed you already installed native tools as described <a href="../../get_started/native_tools/">here</a></li>
 </ol>
-<p>Also, we assume that you're familiar with UNIX shells.</p>
-<p>Let's gets started!</p>
+<p>Also, we assume that you're familiar with UNIX shells. Let's gets started!</p>
+<p><br></p>
 <h3 id="use-sram-to-make-led-blink">Use SRAM to make LED blink<a class="headerlink" href="#use-sram-to-make-led-blink" title="Permanent link">&para;</a></h3>
 <p>If you wish to build the image to run from the onboard SRAM on Olimex board, follow the steps below:</p>
-<h4 id="preparing-the-software">Preparing the Software<a class="headerlink" href="#preparing-the-software" title="Permanent link">&para;</a></h4>
+<p><br></p>
+<h4 id="prepare-the-software">Prepare the Software<a class="headerlink" href="#prepare-the-software" title="Permanent link">&para;</a></h4>
 <ul>
-<li>
-<p>Make sure the PATH environment variable includes the $HOME/dev/go/bin directory. </p>
-</li>
-<li>
-<p>If you have cloned the larva repository for the simulator test in the previous section, you can skip this step. Otherwise, you have to create a repository for the project. Go to ~/dev and clone the larva repository from the apache git repository into a local directory named <code>larva</code>.</p>
-</li>
+<li>Make sure the PATH environment variable includes the $HOME/dev/go/bin directory. </li>
 </ul>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ cd ~/dev 
-        $ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva
-        $ ls
-
-        go  larva
-        $ ls larva
-        DISCLAIMER  NOTICE      app.yml     compiler    hw      net     project     sys
-        LICENSE     README.md   autotargets fs  libs    pkg-list.yml    scripts
+<p><br></p>
+<h4 id="create-a-project">Create a project.<a class="headerlink" href="#create-a-project" title="Permanent link">&para;</a></h4>
+<p>Create a new project to hold your work.  For a deeper understanding, you can read about project creation in 
+<a href="../../get_started/project_create/">Get Started -- Creating Your First Project</a>
+or just follow the commands below.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ mkdir ~/dev
+    $ cd ~/dev
+    $ newt new myproj
+    Downloading project skeleton from apache/incubator-mynewt-blinky...
+    Installing skeleton in myproj...
+    Project myproj successfully created.
+
+    $<span style="color: #000000">cd</span> myproj
+
+    $ newt install -v 
+    apache-mynewt-core
+    Downloading repository description for apache-mynewt-core... success!
+    ...
+    apache-mynewt-core successfully installed version 0.7.9-none
 </pre></div>
 
 
-<ul>
-<li>
-<p>Change directory to ~dev/larva directory and build the <em>blinky</em> project inside larva, using the <em>newt</em> tool. Starting with the target name, assign specific aspects of the project, as shown below, to pull the appropriate packages and build the right bundle or list for the board. For example, we set the architecture (arch), compiler, board support package (bsp), project, and compiler mode.</p>
-<p>(Remember to prefix each command with "newtvm" if you are executing the newt command in a Linux virtual machine on your Windows box!)</p>
-</li>
-</ul>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ newt target create blinky
-        Creating target blinky
-        Target blinky sucessfully created!
-        $ newt target set blinky arch=cortex_m4
-        Target blinky successfully set arch to arm
-        $ newt target set blinky compiler=arm-none-eabi-m4
-        Target blinky successfully set compiler to arm-none-eabi-m4
-        $ newt target set blinky project=blinky
-        Target blinky successfully set project to blinky
-        $ newt target set blinky compiler_def=debug
-        Target blinky successfully set compiler_def to debug
-        $ newt target set blinky bsp=hw/bsp/olimex_stm32-e407_devboard
-        Target blinky successfully set bsp to hw/bsp/olimex_stm32-e407_devboard
-        $ newt target show blinky
-        blinky
-            arch=cortex_m4
-            bsp=hw/bsp/olimex_stm32-e407_devboard
-            compiler=arm-none-eabi-m4
-            compiler_def=debug
-            name=blinky
-            project=blinky
+<p><br></p>
+<h4 id="create-a-target">Create a target<a class="headerlink" href="#create-a-target" title="Permanent link">&para;</a></h4>
+<p>Change directory to ~/dev/core directory and define the <em>blinky</em> target inside core, using the <em>newt</em> tool. Starting with the target name, assign specific aspects of the project, as shown below, to pull the appropriate packages and build the right bundle or list for the board. For example, we set the build_profile, board support package (bsp), and app.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ newt target create blinky
+    Target targets/blinky successfully created
+    $ newt target set blinky build_profile=debug
+    Target targets/blinky successfully set target.compiler_def to debug
+    $ newt target set blinky bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard
+    Target targets/blinky successfully set target.bsp to ...
+    $ newt target set blinky app=@apache-mynewt-core/apps/blinky
+    Target targets/blinky successfully set target.app to apps/blinky
+    $ newt target show blinky
+    targets/boot_olimex
+        app=apps/blinky
+        bsp=hw/bsp/olimex_stm32-e407_devboard
+        build_profile=debug
 </pre></div>
 
 
-<ul>
-<li>Next, let's build the image with the above values assigned. By default, the linker script within the <code>hw/bsp/olimex_stm32-e407_devboard</code> package builds an image for flash memory, which we don't want; instead, we want an image for the SRAM, so you need to switch that script with <code>run_from_sram.ld</code>. </li>
-</ul>
+<p><br></p>
+<h4 id="build-the-image">Build the image<a class="headerlink" href="#build-the-image" title="Permanent link">&para;</a></h4>
+<p>Next, let's build the image with the above values assigned. By default, the linker script within the <code>hw/bsp/olimex_stm32-e407_devboard</code> package builds an image for flash memory, which we don't want; instead, we want an image for the SRAM, so you need to switch that script with <code>run_from_sram.ld</code>. </p>
 <p><font color="red">
-(We are working to simplify this scheme whereby an executable for a project will correctly elect the linker scripts and generate the relevant image. For example, the scheme will key on project identity such as bootloader, RAM, Flash (default) and build accordingly. </font>.)</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">Afer you build the target, you can find the executable *blinky.elf* in the project directory *~/dev/larva/project/blinky/bin/blinky.*
-</pre></div>
-
-
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ cd ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard
-        $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld
-        (some diff will be displayed)
-        $ cp run_from_sram.ld olimex_stm32-e407_devboard.ld
-        $ cd ~/dev/larva/project/blinky/
-        $ newt target build blinky
-        Building target blinky (project = blinky)
-        Compiling case.c
-        Compiling suite.c
-        ...
-        Successfully run!
-        $ ls bin/blinky
-        blinky.elf  blinky.elf.bin  blinky.elf.cmd  blinky.elf.lst  blinky.elf.map
-</pre></div>
-
-
-<ul>
-<li>Check if you have all the scripts needed to launch OpenOCD and interact with the project's specific hardware. Depending on your system (Ubuntu or Windows) you may already have the scripts in your <em>/usr/share/openocd/scripts/</em> directory, as they may have been part of the openocd download. If they exist, you are all set and can proceed to prepare the hardware. Otherwise check the <em>~/dev/larva/hw/bsp/olimex_stm32-e407_devboard</em> directory for a file named <em>f407.cfg</em>. Used by OpenOCD, this config enables us to interact with this specific hardware. </li>
-</ul>
-<p>You are all set if you see the file.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ ls ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard
-        bin     include     olimex_stm32-e407_devboard_download.sh  run_from_loader.ld
-        boot-olimex_stm32-e407_devboard.ld  olimex_stm32-e407_devboard.ld   pkg.yml     run_from_sram.ld
-        f407.cfg        olimex_stm32-e407_devboard_debug.sh run_from_flash.ld           src
+(We are working to simplify this scheme whereby an executable for a project will correctly elect the linker scripts and generate the relevant image. For example, the scheme will key on project identity such as bootloader, RAM, Flash (default) and build accordingly.) </font>.</p>
+<p>Afer you build the target, you can find the executable <em>blinky.elf</em> in the project directory <em>~/dev/core/bin/blinky/apps/blinky/.</em> </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ cd ~/dev/core/hw/bsp/olimex_stm32-e407_devboard
+    $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld
+    (some diff will be displayed)
+    $ cp run_from_sram.ld olimex_stm32-e407_devboard.ld
+    $ cd ~/dev/core
+    $ newt build blinky
+    Compiling case.c
+    Compiling suite.c
+    ...
+    Linking blinky.elf
+    App successfully built:~/dev/core/bin/blinky/apps/blinky/blinky.elf    
+    $ ls bin/blinky/apps/blinky/
+        blinky.elf      blinky.elf.bin     blinky.elf.cmd  
+        blinky.elf.lst  blinky.elf.map
 </pre></div>
 
 
+<p><br></p>
 <h4 id="prepare-the-hardware-to-boot-from-embedded-sram">Prepare the hardware to boot from embedded SRAM<a class="headerlink" href="#prepare-the-hardware-to-boot-from-embedded-sram" title="Permanent link">&para;</a></h4>
 <ul>
-<li>
-<p>Locate the boot jumpers on the board.
-<img alt="Alt Layout - Top View" src="../pics/topview.png" />
+<li>Locate the boot jumpers on the board.</li>
+</ul>
+<p><br></p>
+<p><img alt="Alt Layout - Top View" src="../pics/topview.png" />
 <img alt="Alt Layout - Bottom View" src="../pics/bottomview.png" /></p>
-</li>
+<p><br></p>
+<ul>
 <li>
 <p>B1_1/B1_0 and B0_1/B0_0 are PTH jumpers. Note that because the markings on the board may not always be accurate, when in doubt, you should always refer to the manual for the correct positioning. Since the jumpers are a pair, they should move together, and as such, the pair is responsible for the boot mode when bootloader is present. 
 To locate the bootloader, the board searches in three places: User Flash Memory, System Memory or the Embedded SRAM. For this Blinky project, we will configure it to boot from SRAM by jumpering <strong>B0_1</strong> and <strong>B1_1</strong>.</p>
@@ -580,44 +573,44 @@ To locate the bootloader, the board searches in three places: User Flash Memory,
 <p>Connect the JTAG connector to the SWD/JTAG interface on the board. The other end of the cable should be connected to the USB port or hub of your computer.</p>
 </li>
 </ul>
+<p><br></p>
 <h4 id="lets-go">Let's Go!<a class="headerlink" href="#lets-go" title="Permanent link">&para;</a></h4>
 <ul>
 <li>Ensure that you are in the blinky project directory with the <em>blinky.elf</em> executable. Run the debug command in the <em>newt</em> tool. You'll see some status messages as shown below. In case you need to halt the debugging session, you can issue an <code>-c "reset halt"</code> command.</li>
 </ul>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ cd ~/dev/larva/project/blinky/bin/blinky
-        $ newt target debug blinky
-        Debugging with /Users/aditihilbert/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky
-        Debugging /Users/aditihilbert/dev/larva/project/blinky/bin/blinky/blinky.elf
-        GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
-        Copyright (C) 2014 Free Software Foundation, Inc.
-        License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
-        ...
-        (info)
-        ...
-        target state: halted
-        target halted due to debug-request, current mode: Thread 
-        xPSR: 0x01000000 pc: 0x20000250 msp: 0x10010000
-        Info : accepting &#39;gdb&#39; connection from 3333
-        Info : device id = 0x10036413
-        Info : flash size = 1024kbytes
-        Reset_Handler () at startup_STM32F40x.s:199
-        199     ldr    r1, =__etext
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ cd ~/dev/core
+    $ newt debug blinky
+    Debugging with ~/dev/core/hw/bsp/olimex_...
+    Debugging ~/dev/core/project/blinky/bin/blinky/blinky.elf
+    GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
+    Copyright (C) 2014 Free Software Foundation, Inc.
+    License GPLv3+: GNU GPL version 3 &lt;http://gnu.org/licenses/gpl.html&gt;
+    ...
+    (info)
+    ...
+    target state: halted
+    target halted due to debug-request, current mode: Thread 
+    xPSR: 0x01000000 pc: 0x080003c0 msp: 0x10010000
+    Info : accepting &#39;gdb&#39; connection on tcp/3333
+    Info : device id = 0x10036413
+    Info : flash size = 1024kbytes
 </pre></div>
 
 
-<p>Check the value of the msp (main service pointer) register. If it is not 0x10010000 as indicated above, you will have to manually set it after you open the gdp tool and load the image on it. For example, </p>
+<p><br></p>
+<p>Check the value of the msp (main service pointer) register. If it is not 0x10010000 as indicated above, you will have to manually set it after you open the gdb tool and load the image on it. For example, </p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        (gdb) set $<span style="color: #000000">msp</span>=0x10010000
 </pre></div>
 
 
+<p><br></p>
 <p>Now load the image and type "c" or "continue" from the GNU debugger. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        (gdb) load ~/dev/larva/project/blinky/bin/blinky/blinky.elf         
-        Loading section .text, size 0x4294 lma 0x20000000
-        Loading section .ARM.extab, size 0x24 lma 0x20004294
-        Loading section .ARM.exidx, size 0xd8 lma 0x200042b8
-        Loading section .data, size 0x874 lma 0x20004390
-        Start address 0x20000250, load size 19460
-        Transfer rate: 81 KB/sec, 2432 bytes/write.
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        (gdb) load ~/dev/core/bin/blinky/apps/blinky/blinky.elf      
+        Loading section .text, size 0x16b88 lma 0x20000000
+        Loading section .ARM.exidx, size 0x18 lma 0x20016b88
+        Loading section .data, size 0x9ec lma 0x20016ba0
+        Start address 0x200004b8, load size 95628
+        Transfer rate: 74 KB/sec, 3825 bytes/write.
         (gdb) c
         Continuing.
 </pre></div>
@@ -626,156 +619,133 @@ To locate the bootloader, the board searches in three places: User Flash Memory,
 <ul>
 <li>Voilà! The board's LED should be blinking at 1 Hz. Success!</li>
 </ul>
+<p><br></p>
 <h3 id="use-flash-to-make-led-blink">Use flash to make LED blink<a class="headerlink" href="#use-flash-to-make-led-blink" title="Permanent link">&para;</a></h3>
 <p>If you wish to build the image to run from the onboard flash memory on Olimex board, follow the steps below:</p>
 <ul>
-<li>Configure the board to boot from flash by moving the two jumpers together to <strong>B0_0</strong> and <strong>B1_0</strong>. Refer to the pictures of the board under the section titled <a href="#prepare-the-hardware-to-boot-from-embedded-sram">"Prepare the hardware to boot from embedded SRAM"</a>.</li>
-</ul>
+<li>
+<p>Configure the board to boot from flash by moving the two jumpers together to <strong>B0_0</strong> and <strong>B1_0</strong>. Refer to the pictures of the board under the section titled <a href="#prepare-the-hardware-to-boot-from-embedded-sram">"Prepare the hardware to boot from embedded SRAM"</a>.</p>
 <p>You will have to reset the board once the image is uploaded to it.</p>
-<ul>
-<li>If you skipped the first option for the project <a href="#use-sram-to-make-led-blink">(downloading an image to SRAM)</a>, then skip this step. Otherwise, continue with this step. </li>
+</li>
+<li>
+<p>If you skipped the first option for the project <a href="#use-sram-to-make-led-blink">(downloading an image to SRAM)</a>, then skip this step. Otherwise, continue with this step. </p>
+</li>
 </ul>
 <p>By default, the linker script (<code>olimex_stm32-e407_devboard.ld</code>) is configured to run from bootloader and flash. However, if you first ran the image from SRAM you had changed <code>olimex_stm32-e407_devboard.ld</code> to match <code>run_from_sram.ld</code>. You will, therefore, return to defaults with <code>olimex_stm32-e407_devboard.ld</code> linker script matching the contents of 'run_from_loader.ld'. Return to the project directory.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ cd ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard
-        $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld
-        $ diff olimex_stm32-e407_devboard.ld run_from_loader.ld
-        (some diff will be displayed)
-        $ cp run_from_loader.ld olimex_stm32-e407_devboard.ld
-        $ cd ~/dev/larva/project/blinky/bin/blinky
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ cd ~/dev/core/hw/bsp/olimex_stm32-e407_devboard
+    $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld
+    $ diff olimex_stm32-e407_devboard.ld run_from_loader.ld
+    (some diff will be displayed)
+    $ cp run_from_loader.ld olimex_stm32-e407_devboard.ld
+    $ cd ~/dev/core
 </pre></div>
 
 
+<p><br></p>
 <ul>
-<li>In order to run the image from flash, you need to build the bootloader as well. The bootloader does the initial set up of the Olimex board and then transfers control to the image stored at a location in flash known to it. The bootloader in turn requires the <em>bin2image</em> tool to check the image header for version information, CRC checks etc. So, we will need to build these two additional targets (bootloader and bin2img).</li>
+<li>In order to run the image from flash, you need to build the bootloader as well. The bootloader does the initial set up of the Olimex board and then transfers control to the image stored at a location in flash known to it. </li>
 </ul>
-<p>Let's first create bin2img:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ newt target create bin2img
-        Creating target bin2img
-        Target bin2img successfully created!
-        $ newt target set bin2img arch=sim
-        Target bin2img successfully set arch to sim
-        $ newt target set bin2img compiler=sim
-        Target bin2img successfully set compiler to sim
-        $ newt target set bin2img project=bin2img
-        Target bin2img successfully set project to bin2img
-        $ newt target set bin2img compiler_def=debug
-        Target bin2img successfully set compiler_def to debug
-        $ newt target set bin2img bsp=hw/bsp/native
-        Target bin2img successfully set bsp to hw/bsp/native
-        $ newt target show bin2img
-        bin2img
-                arch=sim
-                bsp=hw/bsp/native
-                compiler=sim
-                compiler_def=debug
-                name=bin2img
-                project=bin2img
-</pre></div>
-
-
-<p>And then let's create boot_olimex:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ newt target create boot_olimex
-        Creating target boot_olimex
-        Target boot_olimex successfully created!
-        $ newt target set boot_olimex arch=cortex_m4
-        Target boot_olimex successfully set arch to cortex_m4
-        $ newt target set boot_olimex compiler=arm-none-eabi-m4
-        Target boot_olimex successfully set compiler to arm-none-eabi-m4
-        $ newt target set boot_olimex project=boot
-        Target boot_olimex successfully set project to boot
-        $ newt target set boot_olimex compiler_def=optimized
-        Target boot_olimex successfully set compiler_def to optimized
-        $ newt target set boot_olimex bsp=hw/bsp/olimex_stm32-e407_devboard
-        Target boot_olimex successfully set bsp to hw/bsp/olimex_stm32-e407_devboard
-        $ newt target show boot_olimex
-        boot_olimex
-                arch=cortex_m4
-                bsp=hw/bsp/olimex_stm32-e407_devboard
-                compiler=arm-none-eabi-m4
-                compiler_def=optimized
-                name=boot_olimex
-                project=boot
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">Let&#39;s create boot_olimex:
+
+```no-highlight
+    $ newt target create boot_olimex
+    Creating target boot_olimex
+    Target boot_olimex successfully created!
+    $ newt target set boot_olimex build_profile=optimized
+    Target boot_olimex successfully set compiler_def to optimized
+    $ newt target set boot_olimex @apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard
+    Target boot_olimex successfully set bsp to ...
+    $ newt target set boot_olimex app=@apache-mynewt-core/apps/boot
+    Target targets/boot_olimex successfully set target.app to apps/boot
+    $ newt target show boot_olimex
+    targets/boot_olimex
+        app=app=@apache-mynewt-core/apps/boot
+        bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboar
+        build_profile=optimized
 </pre></div>
 
 
+<p><br></p>
 <ul>
-<li>Now let's build all the three targets now.</li>
+<li>Now let's build both targets now.</li>
 </ul>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ newt target build bin2img
-        Building target bin2img (project = bin2img)
-        Building project bin2img
-        ...
-        Successfully run!
-        $ newt target build boot_olimex
-        Building target boot_olimex (project = boot)
-        Building project boot
-        ...
-        Successfully run!
-        $ newt target build blinky
-        Building target blinky (project = blinky)
-        Building project blinky
-        Successfully run!
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ newt build boot_olimex
+    ...
+    App successfully built: ~/dev/core/bin/boot_olimex/apps/boot/boot_olimex.elf
+    $ newt build blinky
+    ...
+    Linking blinky.elf
+    App successfully built: ~/dev/core/bin/blinky/apps/blinky/blinky.elf
 </pre></div>
 
 
+<p><br></p>
 <ul>
-<li>Go to the project directory and download the bootloader and the image to flash ... in a flash! </li>
+<li>Create the blinky image and download the bootloader and the image to flash ... in a flash! 
+When creating an image, you can assign a version number to your image; here we use '1.2.3'</li>
 </ul>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ cd ~/dev/larva/project/blinky/bin/blinky
-        $ newt target download boot_olimex
-        Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
-        $ newt target download blinky
-        Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ newt create-image blinky 1.2.3
+    App image successfully generated: ~/dev/core/bin/blinky/apps/blinky/blinky.img
+    Build manifest: ~/dev/core/bin/blinky/apps/blinky/manifest.json
+    $ newt load boot_olimex
+    Downloading ~/dev/core/bin/boot_olimex/apps/boot/boot.elf.bin to 0x08000000
+    Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)
+    ...
+    shutdown command invoked
+    $ newt load blinky
+    Downloading ~/dev/core/bin/blinky/apps/blinky/blinky.img to 0x08020000
+    Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)
+    ...
+    shutdown command invoked
 </pre></div>
 
 
+<p><br></p>
 <ul>
-<li>
-<p>Voilà! The LED should be blinking! Success!</p>
-</li>
-<li>
-<p>But wait...not so fast. let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olimex JTAG adaptor, severing the debug connection to the JTAG port. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board. </p>
-</li>
+<li>Voilà! The LED should be blinking! Success!</li>
 </ul>
+<p><br></p>
+<p><strong>But wait...not so fast.</strong> Let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olimex JTAG adaptor, severing the debug connection to the JTAG port. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board. </p>
 <p>The LED light will start blinking again. Success!</p>
-<p>Note #1: If you want to download the image to flash and a gdb session opened up, use <code>newt target debug blinky</code> instead of <code>newt target download blinky</code>.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        $ newt target debug blinky
-        Debugging with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky
-        Debugging ~/dev/larva/project/blinky/bin/blinky/blinky.elf
-        GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
-        Copyright (C) 2014 Free Software Foundation, Inc.
-        License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
-        ...
-        (info)
-        ...
-        target state: halted
-        target halted due to debug-request, current mode: Thread 
-        xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000
-        Info : accepting &#39;gdb&#39; connection from 3333
-        Info : device id = 0x10036413
-        Info : flash size = 1024kbytes
-        Reset_Handler () at startup_STM32F40x.s:199
-        199     ldr    r1, =__etext
-        (gdb)
+<p><strong>Note #1:</strong> If you want to download the image to flash and a gdb session opened up, use <code>newt debug blinky</code> after <code>newt download blinky</code>.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    $ newt debug blinky
+    Debugging with ~/dev/core/hw/bsp/olimex_stm32-e407_...
+    Debugging ~/dev/core/project/blinky/bin/blinky/blinky.elf
+    GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs
+    Copyright (C) 2014 Free Software Foundation, Inc.
+    License GPLv3+: GNU GPL version 3 &lt;http://gnu.org/licenses/gpl.html&gt;
+    ...
+    (info)
+    ...
+    target state: halted
+    target halted due to debug-request, current mode: Thread 
+    xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000
+    Info : accepting &#39;gdb&#39; connection from 3333
+    Info : device id = 0x10036413
+    Info : flash size = 1024kbytes
+    Reset_Handler () at startup_STM32F40x.s:199
+    199     ldr    r1, =__etext
+    (gdb)
 </pre></div>
 
 
-<p>Note #2: If you want to erase the flash and load the image again you may use the following commands from within gdb. <code>flash erase_sector 0 0 x</code> tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the contents of the sector starting at location 'lma,' you should see all f's. The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">        (gdb) monitor flash erase_sector 0 0 4
-        erased sectors 0 through 4 on flash bank 0 in 2.296712s
-        (gdb) monitor mdw 0x08000000 16
-        0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 
-        (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 
-        (0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 
-        (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff         
-        (gdb) monitor flash info 0
+<p><br></p>
+<p><strong>Note #2:</strong> If you want to erase the flash and load the image again you may use the following commands from within gdb. <code>flash erase_sector 0 0 x</code> tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the contents of the sector starting at location 'lma,' you should see all f's. The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    (gdb) monitor flash erase_sector 0 0 4
+    erased sectors 0 through 4 on flash bank 0 in 2.296712s
+    (gdb) monitor mdw 0x08000000 16
+    0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 
+    (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 
+    (0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 
+    (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff         
+    (gdb) monitor flash info 0
 </pre></div>
 
 
 <h3 id="conclusion">Conclusion<a class="headerlink" href="#conclusion" title="Permanent link">&para;</a></h3>
-<p>Congratulations! You have now tried out a project on actual hardware. If this is your first time to embedded systems, this must feel like the best hands-on and low-level "Hello World" progam ever. </p>
+<p>Congratulations! You have now tried out a project on actual hardware. If this is your first time to embedded systems, this must feel like the best hands-on and low-level "Hello World" program ever. </p>
 <p>Good, we have more fun tutorials for you to get your hands dirty. Be bold and try other Blinky-like <a href="../nRF52/">tutorials</a>.</p>
-<p>If you see anything missing or want to send us feeback, please do so by signing up for appropriate mailing lists on our <a href="../../../community/">Community Page</a></p>
+<p>If you see anything missing or want to send us feedback, please do so by signing up for appropriate mailing lists on our <a href="../../../community/">Community Page</a></p>
 <p>Keep on hacking and blinking!</p>
                         
                         <div class="row">

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/477d85dc/os/tutorials/pics/bottomview.png
----------------------------------------------------------------------
diff --git a/os/tutorials/pics/bottomview.png b/os/tutorials/pics/bottomview.png
index fb7bf0a..c50a461 100644
Binary files a/os/tutorials/pics/bottomview.png and b/os/tutorials/pics/bottomview.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/477d85dc/os/tutorials/pics/topview.png
----------------------------------------------------------------------
diff --git a/os/tutorials/pics/topview.png b/os/tutorials/pics/topview.png
index e57995e..e889ee0 100644
Binary files a/os/tutorials/pics/topview.png and b/os/tutorials/pics/topview.png differ

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/477d85dc/sitemap.xml
----------------------------------------------------------------------
diff --git a/sitemap.xml b/sitemap.xml
index 6db8bff..bd308a7 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -4,7 +4,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -12,7 +12,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/about/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -20,7 +20,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/documentation/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -28,7 +28,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/download/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -36,7 +36,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/community/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -44,7 +44,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/events/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -53,7 +53,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/os/get_started/introduction/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
@@ -93,7 +93,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/newt/newt_intro/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
@@ -115,7 +115,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/newtmgr/overview/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
@@ -137,7 +137,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/faq/answers/</loc>
-     <lastmod>2016-03-15</lastmod>
+     <lastmod>2016-03-16</lastmod>
      <changefreq>daily</changefreq>
     </url>
         



[2/2] incubator-mynewt-site git commit: Updated Blinky on Olimex tutorial. Closes pull request #53

Posted by ad...@apache.org.
Updated Blinky on Olimex tutorial. Closes pull request #53


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

Branch: refs/heads/asf-site
Commit: 477d85dcd7af74a00a83cb0f980ae9444882e45c
Parents: 2393faf
Author: aditihilbert <ad...@runtime.io>
Authored: Wed Mar 16 18:25:42 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Wed Mar 16 18:25:42 2016 -0700

----------------------------------------------------------------------
 mkdocs/search_index.json         |  35 ++-
 os/tutorials/olimex/index.html   | 424 ++++++++++++++++------------------
 os/tutorials/pics/bottomview.png | Bin 1995826 -> 701983 bytes
 os/tutorials/pics/topview.png    | Bin 1945584 -> 723333 bytes
 sitemap.xml                      |  20 +-
 5 files changed, 232 insertions(+), 247 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/477d85dc/mkdocs/search_index.json
----------------------------------------------------------------------
diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json
index 034f2e2..4843986 100644
--- a/mkdocs/search_index.json
+++ b/mkdocs/search_index.json
@@ -247,7 +247,7 @@
         }, 
         {
             "location": "/os/tutorials/olimex/", 
-            "text": "Blinky, Your Hello World!\n\n\nObjective\n\n\nLearn how to use packages from a default application repository of Mynewt to build your first \nHello World\n application (Blinky) on a target board. Once built using \nnewt\n tool, this application will blink the LED lights on the target board. Fun stuff!\n\n\nThis tutorial will guide to achieve the following, assuming you have already set up the environment on your computer to use Mynewt OS and newt tool:\n\n\nDownload packages and use tools to create a runtime image for a board to make its LED blink. You have two choices here:\n    * \nDownload an image to SRAM\n, or \n    * \nDownload it to flash\n.\n\n\n Time Requirement\n: Allow yourself a couple of hours for this project if you are relatively new to embedded systems and playing with development boards. Those jumpers can be pesky!\n\n\nWhat you need\n\n\n\n\nSTM32-E407 development board from Olimex. You can order it from \nhttp://www.mouser.com\n, \nhttp://www.
 digikey.com\n, and other places.\n\n\nARM-USB-TINY-H connector with JTAG interface for debugging ARM microcontrollers (comes with the ribbon cable to hook up to the board)\n\n\nUSB A-B type cable to connect the debugger to your personal computer\n\n\nPersonal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)\n\n\nAn account on Github repository and \ngit\n installed on your computer.\n\n\nIt assumed you already installed native tools described \nhere\n\n\n\n\nAlso, we assume that you're familiar with UNIX shells.\n\n\nLet's gets started!\n\n\nUse SRAM to make LED blink\n\n\nIf you wish to build the image to run from the onboard SRAM on Olimex board, follow the steps below:\n\n\nPreparing the Software\n\n\n\n\n\n\nMake sure the PATH environment variable includes the $HOME/dev/go/bin directory. \n\n\n\n\n\n\nIf you have cloned the larva repository for the simulator test in the previous section, you can skip this step. Otherwise, you 
 have to create a repository for the project. Go to ~/dev and clone the larva repository from the apache git repository into a local directory named \nlarva\n.\n\n\n\n\n\n\n        $ cd ~/dev \n        $ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva\n        $ ls\n\n        go  larva\n        $ ls larva\n        DISCLAIMER  NOTICE      app.yml     compiler    hw      net     project     sys\n        LICENSE     README.md   autotargets fs  libs    pkg-list.yml    scripts\n\n\n\n\n\n\n\n\n\nChange directory to ~dev/larva directory and build the \nblinky\n project inside larva, using the \nnewt\n tool. Starting with the target name, assign specific aspects of the project, as shown below, to pull the appropriate packages and build the right bundle or list for the board. For example, we set the architecture (arch), compiler, board support package (bsp), project, and compiler mode.\n\n\n(Remember to prefix each command with \"newtvm\" if you are executi
 ng the newt command in a Linux virtual machine on your Windows box!)\n\n\n\n\n\n\n        $ newt target create blinky\n        Creating target blinky\n        Target blinky sucessfully created!\n        $ newt target set blinky arch=cortex_m4\n        Target blinky successfully set arch to arm\n        $ newt target set blinky compiler=arm-none-eabi-m4\n        Target blinky successfully set compiler to arm-none-eabi-m4\n        $ newt target set blinky project=blinky\n        Target blinky successfully set project to blinky\n        $ newt target set blinky compiler_def=debug\n        Target blinky successfully set compiler_def to debug\n        $ newt target set blinky bsp=hw/bsp/olimex_stm32-e407_devboard\n        Target blinky successfully set bsp to hw/bsp/olimex_stm32-e407_devboard\n        $ newt target show blinky\n        blinky\n            arch=cortex_m4\n            bsp=hw/bsp/olimex_stm32-e407_devboard\n            compiler=arm-none-eabi-m4\n            compiler_def=deb
 ug\n            name=blinky\n            project=blinky\n\n\n\n\n\n\n\nNext, let's build the image with the above values assigned. By default, the linker script within the \nhw/bsp/olimex_stm32-e407_devboard\n package builds an image for flash memory, which we don't want; instead, we want an image for the SRAM, so you need to switch that script with \nrun_from_sram.ld\n. \n\n\n\n\n\n(We are working to simplify this scheme whereby an executable for a project will correctly elect the linker scripts and generate the relevant image. For example, the scheme will key on project identity such as bootloader, RAM, Flash (default) and build accordingly. \n.)\n\n\nAfer you build the target, you can find the executable *blinky.elf* in the project directory *~/dev/larva/project/blinky/bin/blinky.*\n\n\n\n\n\n        $ cd ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard\n        $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n        (some diff will be displayed)\n        $ cp run_from_sram.l
 d olimex_stm32-e407_devboard.ld\n        $ cd ~/dev/larva/project/blinky/\n        $ newt target build blinky\n        Building target blinky (project = blinky)\n        Compiling case.c\n        Compiling suite.c\n        ...\n        Successfully run!\n        $ ls bin/blinky\n        blinky.elf  blinky.elf.bin  blinky.elf.cmd  blinky.elf.lst  blinky.elf.map\n\n\n\n\n\n\n\nCheck if you have all the scripts needed to launch OpenOCD and interact with the project's specific hardware. Depending on your system (Ubuntu or Windows) you may already have the scripts in your \n/usr/share/openocd/scripts/\n directory, as they may have been part of the openocd download. If they exist, you are all set and can proceed to prepare the hardware. Otherwise check the \n~/dev/larva/hw/bsp/olimex_stm32-e407_devboard\n directory for a file named \nf407.cfg\n. Used by OpenOCD, this config enables us to interact with this specific hardware. \n\n\n\n\nYou are all set if you see the file.\n\n\n        $ ls
  ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard\n        bin     include     olimex_stm32-e407_devboard_download.sh  run_from_loader.ld\n        boot-olimex_stm32-e407_devboard.ld  olimex_stm32-e407_devboard.ld   pkg.yml     run_from_sram.ld\n        f407.cfg        olimex_stm32-e407_devboard_debug.sh run_from_flash.ld           src\n\n\n\n\n\nPrepare the hardware to boot from embedded SRAM\n\n\n\n\n\n\nLocate the boot jumpers on the board.\n\n\n\n\n\n\n\n\n\nB1_1/B1_0 and B0_1/B0_0 are PTH jumpers. Note that because the markings on the board may not always be accurate, when in doubt, you should always refer to the manual for the correct positioning. Since the jumpers are a pair, they should move together, and as such, the pair is responsible for the boot mode when bootloader is present. \nTo locate the bootloader, the board searches in three places: User Flash Memory, System Memory or the Embedded SRAM. For this Blinky project, we will configure it to boot from SRAM by jumpering \nB
 0_1\n and \nB1_1\n.\n\n\n\n\n\n\nConnect USB-OTG#2 in the picture above to a USB port on your computer (or a powered USB hub to make sure there is enough power available to the board). \n\n\n\n\n\n\nThe red PWR LED should be lit. \n\n\n\n\n\n\nConnect the JTAG connector to the SWD/JTAG interface on the board. The other end of the cable should be connected to the USB port or hub of your computer.\n\n\n\n\n\n\nLet's Go!\n\n\n\n\nEnsure that you are in the blinky project directory with the \nblinky.elf\n executable. Run the debug command in the \nnewt\n tool. You'll see some status messages as shown below. In case you need to halt the debugging session, you can issue an \n-c \"reset halt\"\n command.\n\n\n\n\n        $ cd ~/dev/larva/project/blinky/bin/blinky\n        $ newt target debug blinky\n        Debugging with /Users/aditihilbert/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky\n        Debugging /Users/aditihilbert/dev/larva/project/blinky
 /bin/blinky/blinky.elf\n        GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n        Copyright (C) 2014 Free Software Foundation, Inc.\n        License GPLv3+: GNU GPL version 3 or later \nhttp://gnu.org/licenses/gpl.html\n\n        ...\n        (info)\n        ...\n        target state: halted\n        target halted due to debug-request, current mode: Thread \n        xPSR: 0x01000000 pc: 0x20000250 msp: 0x10010000\n        Info : accepting \ngdb\n connection from 3333\n        Info : device id = 0x10036413\n        Info : flash size = 1024kbytes\n        Reset_Handler () at startup_STM32F40x.s:199\n        199     ldr    r1, =__etext\n\n\n\n\n\nCheck the value of the msp (main service pointer) register. If it is not 0x10010000 as indicated above, you will have to manually set it after you open the gdp tool and load the image on it. For example, \n\n\n        (gdb) set $\nmsp\n=0x10010000\n\n\n\n\n\nNow load the image and type \"c\" or \"continue\" from the G
 NU debugger. \n\n\n        (gdb) load ~/dev/larva/project/blinky/bin/blinky/blinky.elf         \n        Loading section .text, size 0x4294 lma 0x20000000\n        Loading section .ARM.extab, size 0x24 lma 0x20004294\n        Loading section .ARM.exidx, size 0xd8 lma 0x200042b8\n        Loading section .data, size 0x874 lma 0x20004390\n        Start address 0x20000250, load size 19460\n        Transfer rate: 81 KB/sec, 2432 bytes/write.\n        (gdb) c\n        Continuing.\n\n\n\n\n\n\n\nVoil\u00e0! The board's LED should be blinking at 1 Hz. Success!\n\n\n\n\nUse flash to make LED blink\n\n\nIf you wish to build the image to run from the onboard flash memory on Olimex board, follow the steps below:\n\n\n\n\nConfigure the board to boot from flash by moving the two jumpers together to \nB0_0\n and \nB1_0\n. Refer to the pictures of the board under the section titled \n\"Prepare the hardware to boot from embedded SRAM\"\n.\n\n\n\n\nYou will have to reset the board once the image is u
 ploaded to it.\n\n\n\n\nIf you skipped the first option for the project \n(downloading an image to SRAM)\n, then skip this step. Otherwise, continue with this step. \n\n\n\n\nBy default, the linker script (\nolimex_stm32-e407_devboard.ld\n) is configured to run from bootloader and flash. However, if you first ran the image from SRAM you had changed \nolimex_stm32-e407_devboard.ld\n to match \nrun_from_sram.ld\n. You will, therefore, return to defaults with \nolimex_stm32-e407_devboard.ld\n linker script matching the contents of 'run_from_loader.ld'. Return to the project directory.\n\n\n        $ cd ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard\n        $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n        $ diff olimex_stm32-e407_devboard.ld run_from_loader.ld\n        (some diff will be displayed)\n        $ cp run_from_loader.ld olimex_stm32-e407_devboard.ld\n        $ cd ~/dev/larva/project/blinky/bin/blinky\n\n\n\n\n\n\n\nIn order to run the image from flash, you need 
 to build the bootloader as well. The bootloader does the initial set up of the Olimex board and then transfers control to the image stored at a location in flash known to it. The bootloader in turn requires the \nbin2image\n tool to check the image header for version information, CRC checks etc. So, we will need to build these two additional targets (bootloader and bin2img).\n\n\n\n\nLet's first create bin2img:\n\n\n        $ newt target create bin2img\n        Creating target bin2img\n        Target bin2img successfully created!\n        $ newt target set bin2img arch=sim\n        Target bin2img successfully set arch to sim\n        $ newt target set bin2img compiler=sim\n        Target bin2img successfully set compiler to sim\n        $ newt target set bin2img project=bin2img\n        Target bin2img successfully set project to bin2img\n        $ newt target set bin2img compiler_def=debug\n        Target bin2img successfully set compiler_def to debug\n        $ newt target set bin2
 img bsp=hw/bsp/native\n        Target bin2img successfully set bsp to hw/bsp/native\n        $ newt target show bin2img\n        bin2img\n                arch=sim\n                bsp=hw/bsp/native\n                compiler=sim\n                compiler_def=debug\n                name=bin2img\n                project=bin2img\n\n\n\n\n\nAnd then let's create boot_olimex:\n\n\n        $ newt target create boot_olimex\n        Creating target boot_olimex\n        Target boot_olimex successfully created!\n        $ newt target set boot_olimex arch=cortex_m4\n        Target boot_olimex successfully set arch to cortex_m4\n        $ newt target set boot_olimex compiler=arm-none-eabi-m4\n        Target boot_olimex successfully set compiler to arm-none-eabi-m4\n        $ newt target set boot_olimex project=boot\n        Target boot_olimex successfully set project to boot\n        $ newt target set boot_olimex compiler_def=optimized\n        Target boot_olimex successfully set compiler_def to
  optimized\n        $ newt target set boot_olimex bsp=hw/bsp/olimex_stm32-e407_devboard\n        Target boot_olimex successfully set bsp to hw/bsp/olimex_stm32-e407_devboard\n        $ newt target show boot_olimex\n        boot_olimex\n                arch=cortex_m4\n                bsp=hw/bsp/olimex_stm32-e407_devboard\n                compiler=arm-none-eabi-m4\n                compiler_def=optimized\n                name=boot_olimex\n                project=boot\n\n\n\n\n\n\n\nNow let's build all the three targets now.\n\n\n\n\n        $ newt target build bin2img\n        Building target bin2img (project = bin2img)\n        Building project bin2img\n        ...\n        Successfully run!\n        $ newt target build boot_olimex\n        Building target boot_olimex (project = boot)\n        Building project boot\n        ...\n        Successfully run!\n        $ newt target build blinky\n        Building target blinky (project = blinky)\n        Building project blinky\n        Suc
 cessfully run!\n\n\n\n\n\n\n\nGo to the project directory and download the bootloader and the image to flash ... in a flash! \n\n\n\n\n        $ cd ~/dev/larva/project/blinky/bin/blinky\n        $ newt target download boot_olimex\n        Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh\n        $ newt target download blinky\n        Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh\n\n\n\n\n\n\n\n\n\nVoil\u00e0! The LED should be blinking! Success!\n\n\n\n\n\n\nBut wait...not so fast. let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olimex JTAG adaptor, severing the debug connection to the JTAG port. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board. \n\n\n\n\n\n\nThe LED light will start blinking aga
 in. Success!\n\n\nNote #1: If you want to download the image to flash and a gdb session opened up, use \nnewt target debug blinky\n instead of \nnewt target download blinky\n.\n\n\n        $ newt target debug blinky\n        Debugging with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky\n        Debugging ~/dev/larva/project/blinky/bin/blinky/blinky.elf\n        GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n        Copyright (C) 2014 Free Software Foundation, Inc.\n        License GPLv3+: GNU GPL version 3 or later \nhttp://gnu.org/licenses/gpl.html\n\n        ...\n        (info)\n        ...\n        target state: halted\n        target halted due to debug-request, current mode: Thread \n        xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000\n        Info : accepting \ngdb\n connection from 3333\n        Info : device id = 0x10036413\n        Info : flash size = 1024kbytes\n        Reset_Handler () at startup_STM32F40x
 .s:199\n        199     ldr    r1, =__etext\n        (gdb)\n\n\n\n\n\nNote #2: If you want to erase the flash and load the image again you may use the following commands from within gdb. \nflash erase_sector 0 0 x\n tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the contents of the sector starting at location 'lma,' you should see all f's. The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.\n\n\n        (gdb) monitor flash erase_sector 0 0 4\n        erased sectors 0 through 4 on flash bank 0 in 2.296712s\n        (gdb) monitor mdw 0x08000000 16\n        0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n        (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n        (0x08000000: ffffffff ffffffff ffffffff ffffffff fffff
 fff ffffffff ffffffff ffffffff \n        (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff         \n        (gdb) monitor flash info 0\n\n\n\n\n\nConclusion\n\n\nCongratulations! You have now tried out a project on actual hardware. If this is your first time to embedded systems, this must feel like the best hands-on and low-level \"Hello World\" progam ever. \n\n\nGood, we have more fun tutorials for you to get your hands dirty. Be bold and try other Blinky-like \ntutorials\n.\n\n\nIf you see anything missing or want to send us feeback, please do so by signing up for appropriate mailing lists on our \nCommunity Page\n\n\nKeep on hacking and blinking!", 
+            "text": "Blinky, Your Hello World!\n\n\nObjective\n\n\nLearn how to use packages from a default application repository of Mynewt to build your first \nHello World\n application (Blinky) on a target board. Once built using the \nnewt\n tool, this application will blink the LED lights on the target board. Fun stuff!\n\n\nThis tutorial will guide you to achieve the following, assuming you have already set up the environment on your computer to use Mynewt OS and newt tool:\n\n\n\n\nDownload packages and use tools to create a runtime image for a board to make its LED blink. You have two choices here:\n\n\nDownload an image to SRAM\n, or \n\n\nDownload it to flash\n.\n\n\n\n\n\n\n\n\n\n\n Time Requirement\n: Allow yourself a couple of hours for this project if you are relatively new to embedded systems and playing with development boards. Those jumpers can be pesky!\n\n\n\n\nWhat you need\n\n\n\n\nSTM32-E407 development board from Olimex. You can order it from \nhttp://www.mou
 ser.com\n, \nhttp://www.digikey.com\n, and other places.\n\n\nARM-USB-TINY-H connector with JTAG interface for debugging ARM microcontrollers (comes with the ribbon cable to hook up to the board)\n\n\nUSB A-B type cable to connect the debugger to your personal computer\n\n\nPersonal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)\n\n\nAn account on Github repository and \ngit\n installed on your computer.\n\n\nIt is assumed you have already installed newt tool. \n\n\nIt is assumed you already installed native tools as described \nhere\n\n\n\n\nAlso, we assume that you're familiar with UNIX shells. Let's gets started!\n\n\n\n\nUse SRAM to make LED blink\n\n\nIf you wish to build the image to run from the onboard SRAM on Olimex board, follow the steps below:\n\n\n\n\nPrepare the Software\n\n\n\n\nMake sure the PATH environment variable includes the $HOME/dev/go/bin directory. \n\n\n\n\n\n\nCreate a project.\n\n\nCreate a new projec
 t to hold your work.  For a deeper understanding, you can read about project creation in \n\nGet Started -- Creating Your First Project\n\nor just follow the commands below.\n\n\n    $ mkdir ~/dev\n    $ cd ~/dev\n    $ newt new myproj\n    Downloading project skeleton from apache/incubator-mynewt-blinky...\n    Installing skeleton in myproj...\n    Project myproj successfully created.\n\n    $\ncd\n myproj\n\n    $ newt install -v \n    apache-mynewt-core\n    Downloading repository description for apache-mynewt-core... success!\n    ...\n    apache-mynewt-core successfully installed version 0.7.9-none\n\n\n\n\n\n\n\nCreate a target\n\n\nChange directory to ~/dev/core directory and define the \nblinky\n target inside core, using the \nnewt\n tool. Starting with the target name, assign specific aspects of the project, as shown below, to pull the appropriate packages and build the right bundle or list for the board. For example, we set the build_profile, board support package (bsp), 
 and app.\n\n\n    $ newt target create blinky\n    Target targets/blinky successfully created\n    $ newt target set blinky build_profile=debug\n    Target targets/blinky successfully set target.compiler_def to debug\n    $ newt target set blinky bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard\n    Target targets/blinky successfully set target.bsp to ...\n    $ newt target set blinky app=@apache-mynewt-core/apps/blinky\n    Target targets/blinky successfully set target.app to apps/blinky\n    $ newt target show blinky\n    targets/boot_olimex\n        app=apps/blinky\n        bsp=hw/bsp/olimex_stm32-e407_devboard\n        build_profile=debug\n\n\n\n\n\n\n\nBuild the image\n\n\nNext, let's build the image with the above values assigned. By default, the linker script within the \nhw/bsp/olimex_stm32-e407_devboard\n package builds an image for flash memory, which we don't want; instead, we want an image for the SRAM, so you need to switch that script with \nrun_from_sram.ld\n
 . \n\n\n\n(We are working to simplify this scheme whereby an executable for a project will correctly elect the linker scripts and generate the relevant image. For example, the scheme will key on project identity such as bootloader, RAM, Flash (default) and build accordingly.) \n.\n\n\nAfer you build the target, you can find the executable \nblinky.elf\n in the project directory \n~/dev/core/bin/blinky/apps/blinky/.\n \n\n\n    $ cd ~/dev/core/hw/bsp/olimex_stm32-e407_devboard\n    $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n    (some diff will be displayed)\n    $ cp run_from_sram.ld olimex_stm32-e407_devboard.ld\n    $ cd ~/dev/core\n    $ newt build blinky\n    Compiling case.c\n    Compiling suite.c\n    ...\n    Linking blinky.elf\n    App successfully built:~/dev/core/bin/blinky/apps/blinky/blinky.elf    \n    $ ls bin/blinky/apps/blinky/\n        blinky.elf      blinky.elf.bin     blinky.elf.cmd  \n        blinky.elf.lst  blinky.elf.map\n\n\n\n\n\n\n\nPrepare the ha
 rdware to boot from embedded SRAM\n\n\n\n\nLocate the boot jumpers on the board.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nB1_1/B1_0 and B0_1/B0_0 are PTH jumpers. Note that because the markings on the board may not always be accurate, when in doubt, you should always refer to the manual for the correct positioning. Since the jumpers are a pair, they should move together, and as such, the pair is responsible for the boot mode when bootloader is present. \nTo locate the bootloader, the board searches in three places: User Flash Memory, System Memory or the Embedded SRAM. For this Blinky project, we will configure it to boot from SRAM by jumpering \nB0_1\n and \nB1_1\n.\n\n\n\n\n\n\nConnect USB-OTG#2 in the picture above to a USB port on your computer (or a powered USB hub to make sure there is enough power available to the board). \n\n\n\n\n\n\nThe red PWR LED should be lit. \n\n\n\n\n\n\nConnect the JTAG connector to the SWD/JTAG interface on the board. The other end of the cable should be c
 onnected to the USB port or hub of your computer.\n\n\n\n\n\n\n\n\nLet's Go!\n\n\n\n\nEnsure that you are in the blinky project directory with the \nblinky.elf\n executable. Run the debug command in the \nnewt\n tool. You'll see some status messages as shown below. In case you need to halt the debugging session, you can issue an \n-c \"reset halt\"\n command.\n\n\n\n\n    $ cd ~/dev/core\n    $ newt debug blinky\n    Debugging with ~/dev/core/hw/bsp/olimex_...\n    Debugging ~/dev/core/project/blinky/bin/blinky/blinky.elf\n    GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n    Copyright (C) 2014 Free Software Foundation, Inc.\n    License GPLv3+: GNU GPL version 3 \nhttp://gnu.org/licenses/gpl.html\n\n    ...\n    (info)\n    ...\n    target state: halted\n    target halted due to debug-request, current mode: Thread \n    xPSR: 0x01000000 pc: 0x080003c0 msp: 0x10010000\n    Info : accepting \ngdb\n connection on tcp/3333\n    Info : device id = 0x10036413\n    I
 nfo : flash size = 1024kbytes\n\n\n\n\n\n\n\nCheck the value of the msp (main service pointer) register. If it is not 0x10010000 as indicated above, you will have to manually set it after you open the gdb tool and load the image on it. For example, \n\n\n        (gdb) set $\nmsp\n=0x10010000\n\n\n\n\n\n\n\nNow load the image and type \"c\" or \"continue\" from the GNU debugger. \n\n\n        (gdb) load ~/dev/core/bin/blinky/apps/blinky/blinky.elf      \n        Loading section .text, size 0x16b88 lma 0x20000000\n        Loading section .ARM.exidx, size 0x18 lma 0x20016b88\n        Loading section .data, size 0x9ec lma 0x20016ba0\n        Start address 0x200004b8, load size 95628\n        Transfer rate: 74 KB/sec, 3825 bytes/write.\n        (gdb) c\n        Continuing.\n\n\n\n\n\n\n\nVoil\u00e0! The board's LED should be blinking at 1 Hz. Success!\n\n\n\n\n\n\nUse flash to make LED blink\n\n\nIf you wish to build the image to run from the onboard flash memory on Olimex board, follow 
 the steps below:\n\n\n\n\n\n\nConfigure the board to boot from flash by moving the two jumpers together to \nB0_0\n and \nB1_0\n. Refer to the pictures of the board under the section titled \n\"Prepare the hardware to boot from embedded SRAM\"\n.\n\n\nYou will have to reset the board once the image is uploaded to it.\n\n\n\n\n\n\nIf you skipped the first option for the project \n(downloading an image to SRAM)\n, then skip this step. Otherwise, continue with this step. \n\n\n\n\n\n\nBy default, the linker script (\nolimex_stm32-e407_devboard.ld\n) is configured to run from bootloader and flash. However, if you first ran the image from SRAM you had changed \nolimex_stm32-e407_devboard.ld\n to match \nrun_from_sram.ld\n. You will, therefore, return to defaults with \nolimex_stm32-e407_devboard.ld\n linker script matching the contents of 'run_from_loader.ld'. Return to the project directory.\n\n\n    $ cd ~/dev/core/hw/bsp/olimex_stm32-e407_devboard\n    $ diff olimex_stm32-e407_devboar
 d.ld run_from_sram.ld\n    $ diff olimex_stm32-e407_devboard.ld run_from_loader.ld\n    (some diff will be displayed)\n    $ cp run_from_loader.ld olimex_stm32-e407_devboard.ld\n    $ cd ~/dev/core\n\n\n\n\n\n\n\n\n\nIn order to run the image from flash, you need to build the bootloader as well. The bootloader does the initial set up of the Olimex board and then transfers control to the image stored at a location in flash known to it. \n\n\n\n\nLet\ns create boot_olimex:\n\n```no-highlight\n    $ newt target create boot_olimex\n    Creating target boot_olimex\n    Target boot_olimex successfully created!\n    $ newt target set boot_olimex build_profile=optimized\n    Target boot_olimex successfully set compiler_def to optimized\n    $ newt target set boot_olimex @apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard\n    Target boot_olimex successfully set bsp to ...\n    $ newt target set boot_olimex app=@apache-mynewt-core/apps/boot\n    Target targets/boot_olimex successfully set 
 target.app to apps/boot\n    $ newt target show boot_olimex\n    targets/boot_olimex\n        app=app=@apache-mynewt-core/apps/boot\n        bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboar\n        build_profile=optimized\n\n\n\n\n\n\n\n\n\nNow let's build both targets now.\n\n\n\n\n    $ newt build boot_olimex\n    ...\n    App successfully built: ~/dev/core/bin/boot_olimex/apps/boot/boot_olimex.elf\n    $ newt build blinky\n    ...\n    Linking blinky.elf\n    App successfully built: ~/dev/core/bin/blinky/apps/blinky/blinky.elf\n\n\n\n\n\n\n\n\n\nCreate the blinky image and download the bootloader and the image to flash ... in a flash! \nWhen creating an image, you can assign a version number to your image; here we use '1.2.3'\n\n\n\n\n    $ newt create-image blinky 1.2.3\n    App image successfully generated: ~/dev/core/bin/blinky/apps/blinky/blinky.img\n    Build manifest: ~/dev/core/bin/blinky/apps/blinky/manifest.json\n    $ newt load boot_olimex\n    Downloading ~/de
 v/core/bin/boot_olimex/apps/boot/boot.elf.bin to 0x08000000\n    Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)\n    ...\n    shutdown command invoked\n    $ newt load blinky\n    Downloading ~/dev/core/bin/blinky/apps/blinky/blinky.img to 0x08020000\n    Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)\n    ...\n    shutdown command invoked\n\n\n\n\n\n\n\n\n\nVoil\u00e0! The LED should be blinking! Success!\n\n\n\n\n\n\nBut wait...not so fast.\n Let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olimex JTAG adaptor, severing the debug connection to the JTAG port. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board. \n\n\nThe LED light will start blinking again. Success!\n\n\nNote #1:\n If you want to download the image to flash and a gdb session opened up, use \nnewt debug blinky\n after \nnewt download blinky
 \n.\n\n\n    $ newt debug blinky\n    Debugging with ~/dev/core/hw/bsp/olimex_stm32-e407_...\n    Debugging ~/dev/core/project/blinky/bin/blinky/blinky.elf\n    GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n    Copyright (C) 2014 Free Software Foundation, Inc.\n    License GPLv3+: GNU GPL version 3 \nhttp://gnu.org/licenses/gpl.html\n\n    ...\n    (info)\n    ...\n    target state: halted\n    target halted due to debug-request, current mode: Thread \n    xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000\n    Info : accepting \ngdb\n connection from 3333\n    Info : device id = 0x10036413\n    Info : flash size = 1024kbytes\n    Reset_Handler () at startup_STM32F40x.s:199\n    199     ldr    r1, =__etext\n    (gdb)\n\n\n\n\n\n\n\nNote #2:\n If you want to erase the flash and load the image again you may use the following commands from within gdb. \nflash erase_sector 0 0 x\n tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the 
 contents of the sector starting at location 'lma,' you should see all f's. The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.\n\n\n    (gdb) monitor flash erase_sector 0 0 4\n    erased sectors 0 through 4 on flash bank 0 in 2.296712s\n    (gdb) monitor mdw 0x08000000 16\n    0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n    (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n    (0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n    (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff         \n    (gdb) monitor flash info 0\n\n\n\n\n\nConclusion\n\n\nCongratulations! You have now tried out a project on actual hardware. If this is your first time to embedded systems, this must feel like 
 the best hands-on and low-level \"Hello World\" program ever. \n\n\nGood, we have more fun tutorials for you to get your hands dirty. Be bold and try other Blinky-like \ntutorials\n.\n\n\nIf you see anything missing or want to send us feedback, please do so by signing up for appropriate mailing lists on our \nCommunity Page\n\n\nKeep on hacking and blinking!", 
             "title": "Blinky on Olimex"
         }, 
         {
@@ -257,12 +257,12 @@
         }, 
         {
             "location": "/os/tutorials/olimex/#objective", 
-            "text": "Learn how to use packages from a default application repository of Mynewt to build your first  Hello World  application (Blinky) on a target board. Once built using  newt  tool, this application will blink the LED lights on the target board. Fun stuff!  This tutorial will guide to achieve the following, assuming you have already set up the environment on your computer to use Mynewt OS and newt tool:  Download packages and use tools to create a runtime image for a board to make its LED blink. You have two choices here:\n    *  Download an image to SRAM , or \n    *  Download it to flash .   Time Requirement : Allow yourself a couple of hours for this project if you are relatively new to embedded systems and playing with development boards. Those jumpers can be pesky!", 
+            "text": "Learn how to use packages from a default application repository of Mynewt to build your first  Hello World  application (Blinky) on a target board. Once built using the  newt  tool, this application will blink the LED lights on the target board. Fun stuff!  This tutorial will guide you to achieve the following, assuming you have already set up the environment on your computer to use Mynewt OS and newt tool:   Download packages and use tools to create a runtime image for a board to make its LED blink. You have two choices here:  Download an image to SRAM , or   Download it to flash .       Time Requirement : Allow yourself a couple of hours for this project if you are relatively new to embedded systems and playing with development boards. Those jumpers can be pesky!", 
             "title": "Objective"
         }, 
         {
             "location": "/os/tutorials/olimex/#what-you-need", 
-            "text": "STM32-E407 development board from Olimex. You can order it from  http://www.mouser.com ,  http://www.digikey.com , and other places.  ARM-USB-TINY-H connector with JTAG interface for debugging ARM microcontrollers (comes with the ribbon cable to hook up to the board)  USB A-B type cable to connect the debugger to your personal computer  Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)  An account on Github repository and  git  installed on your computer.  It assumed you already installed native tools described  here   Also, we assume that you're familiar with UNIX shells.  Let's gets started!", 
+            "text": "STM32-E407 development board from Olimex. You can order it from  http://www.mouser.com ,  http://www.digikey.com , and other places.  ARM-USB-TINY-H connector with JTAG interface for debugging ARM microcontrollers (comes with the ribbon cable to hook up to the board)  USB A-B type cable to connect the debugger to your personal computer  Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or Linux box (Ubuntu 14.10: Utopic Unicorn)  An account on Github repository and  git  installed on your computer.  It is assumed you have already installed newt tool.   It is assumed you already installed native tools as described  here   Also, we assume that you're familiar with UNIX shells. Let's gets started!", 
             "title": "What you need"
         }, 
         {
@@ -271,28 +271,43 @@
             "title": "Use SRAM to make LED blink"
         }, 
         {
-            "location": "/os/tutorials/olimex/#preparing-the-software", 
-            "text": "Make sure the PATH environment variable includes the $HOME/dev/go/bin directory.     If you have cloned the larva repository for the simulator test in the previous section, you can skip this step. Otherwise, you have to create a repository for the project. Go to ~/dev and clone the larva repository from the apache git repository into a local directory named  larva .            $ cd ~/dev \n        $ git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva.git larva\n        $ ls\n\n        go  larva\n        $ ls larva\n        DISCLAIMER  NOTICE      app.yml     compiler    hw      net     project     sys\n        LICENSE     README.md   autotargets fs  libs    pkg-list.yml    scripts    Change directory to ~dev/larva directory and build the  blinky  project inside larva, using the  newt  tool. Starting with the target name, assign specific aspects of the project, as shown below, to pull the appropriate packages and build the right bundle or lis
 t for the board. For example, we set the architecture (arch), compiler, board support package (bsp), project, and compiler mode.  (Remember to prefix each command with \"newtvm\" if you are executing the newt command in a Linux virtual machine on your Windows box!)            $ newt target create blinky\n        Creating target blinky\n        Target blinky sucessfully created!\n        $ newt target set blinky arch=cortex_m4\n        Target blinky successfully set arch to arm\n        $ newt target set blinky compiler=arm-none-eabi-m4\n        Target blinky successfully set compiler to arm-none-eabi-m4\n        $ newt target set blinky project=blinky\n        Target blinky successfully set project to blinky\n        $ newt target set blinky compiler_def=debug\n        Target blinky successfully set compiler_def to debug\n        $ newt target set blinky bsp=hw/bsp/olimex_stm32-e407_devboard\n        Target blinky successfully set bsp to hw/bsp/olimex_stm32-e407_devboard\n        $ 
 newt target show blinky\n        blinky\n            arch=cortex_m4\n            bsp=hw/bsp/olimex_stm32-e407_devboard\n            compiler=arm-none-eabi-m4\n            compiler_def=debug\n            name=blinky\n            project=blinky   Next, let's build the image with the above values assigned. By default, the linker script within the  hw/bsp/olimex_stm32-e407_devboard  package builds an image for flash memory, which we don't want; instead, we want an image for the SRAM, so you need to switch that script with  run_from_sram.ld .    \n(We are working to simplify this scheme whereby an executable for a project will correctly elect the linker scripts and generate the relevant image. For example, the scheme will key on project identity such as bootloader, RAM, Flash (default) and build accordingly.  .)  Afer you build the target, you can find the executable *blinky.elf* in the project directory *~/dev/larva/project/blinky/bin/blinky.*          $ cd ~/dev/larva/hw/bsp/olimex_stm
 32-e407_devboard\n        $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n        (some diff will be displayed)\n        $ cp run_from_sram.ld olimex_stm32-e407_devboard.ld\n        $ cd ~/dev/larva/project/blinky/\n        $ newt target build blinky\n        Building target blinky (project = blinky)\n        Compiling case.c\n        Compiling suite.c\n        ...\n        Successfully run!\n        $ ls bin/blinky\n        blinky.elf  blinky.elf.bin  blinky.elf.cmd  blinky.elf.lst  blinky.elf.map   Check if you have all the scripts needed to launch OpenOCD and interact with the project's specific hardware. Depending on your system (Ubuntu or Windows) you may already have the scripts in your  /usr/share/openocd/scripts/  directory, as they may have been part of the openocd download. If they exist, you are all set and can proceed to prepare the hardware. Otherwise check the  ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard  directory for a file named  f407.cfg . Used by OpenOCD,
  this config enables us to interact with this specific hardware.    You are all set if you see the file.          $ ls ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard\n        bin     include     olimex_stm32-e407_devboard_download.sh  run_from_loader.ld\n        boot-olimex_stm32-e407_devboard.ld  olimex_stm32-e407_devboard.ld   pkg.yml     run_from_sram.ld\n        f407.cfg        olimex_stm32-e407_devboard_debug.sh run_from_flash.ld           src", 
-            "title": "Preparing the Software"
+            "location": "/os/tutorials/olimex/#prepare-the-software", 
+            "text": "Make sure the PATH environment variable includes the $HOME/dev/go/bin directory.", 
+            "title": "Prepare the Software"
+        }, 
+        {
+            "location": "/os/tutorials/olimex/#create-a-project", 
+            "text": "Create a new project to hold your work.  For a deeper understanding, you can read about project creation in  Get Started -- Creating Your First Project \nor just follow the commands below.      $ mkdir ~/dev\n    $ cd ~/dev\n    $ newt new myproj\n    Downloading project skeleton from apache/incubator-mynewt-blinky...\n    Installing skeleton in myproj...\n    Project myproj successfully created.\n\n    $ cd  myproj\n\n    $ newt install -v \n    apache-mynewt-core\n    Downloading repository description for apache-mynewt-core... success!\n    ...\n    apache-mynewt-core successfully installed version 0.7.9-none", 
+            "title": "Create a project."
+        }, 
+        {
+            "location": "/os/tutorials/olimex/#create-a-target", 
+            "text": "Change directory to ~/dev/core directory and define the  blinky  target inside core, using the  newt  tool. Starting with the target name, assign specific aspects of the project, as shown below, to pull the appropriate packages and build the right bundle or list for the board. For example, we set the build_profile, board support package (bsp), and app.      $ newt target create blinky\n    Target targets/blinky successfully created\n    $ newt target set blinky build_profile=debug\n    Target targets/blinky successfully set target.compiler_def to debug\n    $ newt target set blinky bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard\n    Target targets/blinky successfully set target.bsp to ...\n    $ newt target set blinky app=@apache-mynewt-core/apps/blinky\n    Target targets/blinky successfully set target.app to apps/blinky\n    $ newt target show blinky\n    targets/boot_olimex\n        app=apps/blinky\n        bsp=hw/bsp/olimex_stm32-e407_devboard\n  
       build_profile=debug", 
+            "title": "Create a target"
+        }, 
+        {
+            "location": "/os/tutorials/olimex/#build-the-image", 
+            "text": "Next, let's build the image with the above values assigned. By default, the linker script within the  hw/bsp/olimex_stm32-e407_devboard  package builds an image for flash memory, which we don't want; instead, we want an image for the SRAM, so you need to switch that script with  run_from_sram.ld .   \n(We are working to simplify this scheme whereby an executable for a project will correctly elect the linker scripts and generate the relevant image. For example, the scheme will key on project identity such as bootloader, RAM, Flash (default) and build accordingly.)  .  Afer you build the target, you can find the executable  blinky.elf  in the project directory  ~/dev/core/bin/blinky/apps/blinky/.        $ cd ~/dev/core/hw/bsp/olimex_stm32-e407_devboard\n    $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n    (some diff will be displayed)\n    $ cp run_from_sram.ld olimex_stm32-e407_devboard.ld\n    $ cd ~/dev/core\n    $ newt build blinky\n    Compiling cas
 e.c\n    Compiling suite.c\n    ...\n    Linking blinky.elf\n    App successfully built:~/dev/core/bin/blinky/apps/blinky/blinky.elf    \n    $ ls bin/blinky/apps/blinky/\n        blinky.elf      blinky.elf.bin     blinky.elf.cmd  \n        blinky.elf.lst  blinky.elf.map", 
+            "title": "Build the image"
         }, 
         {
             "location": "/os/tutorials/olimex/#prepare-the-hardware-to-boot-from-embedded-sram", 
-            "text": "Locate the boot jumpers on the board.     B1_1/B1_0 and B0_1/B0_0 are PTH jumpers. Note that because the markings on the board may not always be accurate, when in doubt, you should always refer to the manual for the correct positioning. Since the jumpers are a pair, they should move together, and as such, the pair is responsible for the boot mode when bootloader is present. \nTo locate the bootloader, the board searches in three places: User Flash Memory, System Memory or the Embedded SRAM. For this Blinky project, we will configure it to boot from SRAM by jumpering  B0_1  and  B1_1 .    Connect USB-OTG#2 in the picture above to a USB port on your computer (or a powered USB hub to make sure there is enough power available to the board).     The red PWR LED should be lit.     Connect the JTAG connector to the SWD/JTAG interface on the board. The other end of the cable should be connected to the USB port or hub of your computer.", 
+            "text": "Locate the boot jumpers on the board.         B1_1/B1_0 and B0_1/B0_0 are PTH jumpers. Note that because the markings on the board may not always be accurate, when in doubt, you should always refer to the manual for the correct positioning. Since the jumpers are a pair, they should move together, and as such, the pair is responsible for the boot mode when bootloader is present. \nTo locate the bootloader, the board searches in three places: User Flash Memory, System Memory or the Embedded SRAM. For this Blinky project, we will configure it to boot from SRAM by jumpering  B0_1  and  B1_1 .    Connect USB-OTG#2 in the picture above to a USB port on your computer (or a powered USB hub to make sure there is enough power available to the board).     The red PWR LED should be lit.     Connect the JTAG connector to the SWD/JTAG interface on the board. The other end of the cable should be connected to the USB port or hub of your computer.", 
             "title": "Prepare the hardware to boot from embedded SRAM"
         }, 
         {
             "location": "/os/tutorials/olimex/#lets-go", 
-            "text": "Ensure that you are in the blinky project directory with the  blinky.elf  executable. Run the debug command in the  newt  tool. You'll see some status messages as shown below. In case you need to halt the debugging session, you can issue an  -c \"reset halt\"  command.           $ cd ~/dev/larva/project/blinky/bin/blinky\n        $ newt target debug blinky\n        Debugging with /Users/aditihilbert/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky\n        Debugging /Users/aditihilbert/dev/larva/project/blinky/bin/blinky/blinky.elf\n        GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n        Copyright (C) 2014 Free Software Foundation, Inc.\n        License GPLv3+: GNU GPL version 3 or later  http://gnu.org/licenses/gpl.html \n        ...\n        (info)\n        ...\n        target state: halted\n        target halted due to debug-request, current mode: Thread \n        xPSR: 0x01000000 pc: 0x2000025
 0 msp: 0x10010000\n        Info : accepting  gdb  connection from 3333\n        Info : device id = 0x10036413\n        Info : flash size = 1024kbytes\n        Reset_Handler () at startup_STM32F40x.s:199\n        199     ldr    r1, =__etext  Check the value of the msp (main service pointer) register. If it is not 0x10010000 as indicated above, you will have to manually set it after you open the gdp tool and load the image on it. For example,           (gdb) set $ msp =0x10010000  Now load the image and type \"c\" or \"continue\" from the GNU debugger.           (gdb) load ~/dev/larva/project/blinky/bin/blinky/blinky.elf         \n        Loading section .text, size 0x4294 lma 0x20000000\n        Loading section .ARM.extab, size 0x24 lma 0x20004294\n        Loading section .ARM.exidx, size 0xd8 lma 0x200042b8\n        Loading section .data, size 0x874 lma 0x20004390\n        Start address 0x20000250, load size 19460\n        Transfer rate: 81 KB/sec, 2432 bytes/write.\n        (gdb) c
 \n        Continuing.   Voil\u00e0! The board's LED should be blinking at 1 Hz. Success!", 
+            "text": "Ensure that you are in the blinky project directory with the  blinky.elf  executable. Run the debug command in the  newt  tool. You'll see some status messages as shown below. In case you need to halt the debugging session, you can issue an  -c \"reset halt\"  command.       $ cd ~/dev/core\n    $ newt debug blinky\n    Debugging with ~/dev/core/hw/bsp/olimex_...\n    Debugging ~/dev/core/project/blinky/bin/blinky/blinky.elf\n    GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n    Copyright (C) 2014 Free Software Foundation, Inc.\n    License GPLv3+: GNU GPL version 3  http://gnu.org/licenses/gpl.html \n    ...\n    (info)\n    ...\n    target state: halted\n    target halted due to debug-request, current mode: Thread \n    xPSR: 0x01000000 pc: 0x080003c0 msp: 0x10010000\n    Info : accepting  gdb  connection on tcp/3333\n    Info : device id = 0x10036413\n    Info : flash size = 1024kbytes   Check the value of the msp (main service pointer) 
 register. If it is not 0x10010000 as indicated above, you will have to manually set it after you open the gdb tool and load the image on it. For example,           (gdb) set $ msp =0x10010000   Now load the image and type \"c\" or \"continue\" from the GNU debugger.           (gdb) load ~/dev/core/bin/blinky/apps/blinky/blinky.elf      \n        Loading section .text, size 0x16b88 lma 0x20000000\n        Loading section .ARM.exidx, size 0x18 lma 0x20016b88\n        Loading section .data, size 0x9ec lma 0x20016ba0\n        Start address 0x200004b8, load size 95628\n        Transfer rate: 74 KB/sec, 3825 bytes/write.\n        (gdb) c\n        Continuing.   Voil\u00e0! The board's LED should be blinking at 1 Hz. Success!", 
             "title": "Let's Go!"
         }, 
         {
             "location": "/os/tutorials/olimex/#use-flash-to-make-led-blink", 
-            "text": "If you wish to build the image to run from the onboard flash memory on Olimex board, follow the steps below:   Configure the board to boot from flash by moving the two jumpers together to  B0_0  and  B1_0 . Refer to the pictures of the board under the section titled  \"Prepare the hardware to boot from embedded SRAM\" .   You will have to reset the board once the image is uploaded to it.   If you skipped the first option for the project  (downloading an image to SRAM) , then skip this step. Otherwise, continue with this step.    By default, the linker script ( olimex_stm32-e407_devboard.ld ) is configured to run from bootloader and flash. However, if you first ran the image from SRAM you had changed  olimex_stm32-e407_devboard.ld  to match  run_from_sram.ld . You will, therefore, return to defaults with  olimex_stm32-e407_devboard.ld  linker script matching the contents of 'run_from_loader.ld'. Return to the project directory.          $ cd ~/dev/larva/hw/bsp/ol
 imex_stm32-e407_devboard\n        $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n        $ diff olimex_stm32-e407_devboard.ld run_from_loader.ld\n        (some diff will be displayed)\n        $ cp run_from_loader.ld olimex_stm32-e407_devboard.ld\n        $ cd ~/dev/larva/project/blinky/bin/blinky   In order to run the image from flash, you need to build the bootloader as well. The bootloader does the initial set up of the Olimex board and then transfers control to the image stored at a location in flash known to it. The bootloader in turn requires the  bin2image  tool to check the image header for version information, CRC checks etc. So, we will need to build these two additional targets (bootloader and bin2img).   Let's first create bin2img:          $ newt target create bin2img\n        Creating target bin2img\n        Target bin2img successfully created!\n        $ newt target set bin2img arch=sim\n        Target bin2img successfully set arch to sim\n        $ newt targe
 t set bin2img compiler=sim\n        Target bin2img successfully set compiler to sim\n        $ newt target set bin2img project=bin2img\n        Target bin2img successfully set project to bin2img\n        $ newt target set bin2img compiler_def=debug\n        Target bin2img successfully set compiler_def to debug\n        $ newt target set bin2img bsp=hw/bsp/native\n        Target bin2img successfully set bsp to hw/bsp/native\n        $ newt target show bin2img\n        bin2img\n                arch=sim\n                bsp=hw/bsp/native\n                compiler=sim\n                compiler_def=debug\n                name=bin2img\n                project=bin2img  And then let's create boot_olimex:          $ newt target create boot_olimex\n        Creating target boot_olimex\n        Target boot_olimex successfully created!\n        $ newt target set boot_olimex arch=cortex_m4\n        Target boot_olimex successfully set arch to cortex_m4\n        $ newt target set boot_olimex compil
 er=arm-none-eabi-m4\n        Target boot_olimex successfully set compiler to arm-none-eabi-m4\n        $ newt target set boot_olimex project=boot\n        Target boot_olimex successfully set project to boot\n        $ newt target set boot_olimex compiler_def=optimized\n        Target boot_olimex successfully set compiler_def to optimized\n        $ newt target set boot_olimex bsp=hw/bsp/olimex_stm32-e407_devboard\n        Target boot_olimex successfully set bsp to hw/bsp/olimex_stm32-e407_devboard\n        $ newt target show boot_olimex\n        boot_olimex\n                arch=cortex_m4\n                bsp=hw/bsp/olimex_stm32-e407_devboard\n                compiler=arm-none-eabi-m4\n                compiler_def=optimized\n                name=boot_olimex\n                project=boot   Now let's build all the three targets now.           $ newt target build bin2img\n        Building target bin2img (project = bin2img)\n        Building project bin2img\n        ...\n        Success
 fully run!\n        $ newt target build boot_olimex\n        Building target boot_olimex (project = boot)\n        Building project boot\n        ...\n        Successfully run!\n        $ newt target build blinky\n        Building target blinky (project = blinky)\n        Building project blinky\n        Successfully run!   Go to the project directory and download the bootloader and the image to flash ... in a flash!            $ cd ~/dev/larva/project/blinky/bin/blinky\n        $ newt target download boot_olimex\n        Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh\n        $ newt target download blinky\n        Downloading with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh    Voil\u00e0! The LED should be blinking! Success!    But wait...not so fast. let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olime
 x JTAG adaptor, severing the debug connection to the JTAG port. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board.     The LED light will start blinking again. Success!  Note #1: If you want to download the image to flash and a gdb session opened up, use  newt target debug blinky  instead of  newt target download blinky .          $ newt target debug blinky\n        Debugging with ~/dev/larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh blinky\n        Debugging ~/dev/larva/project/blinky/bin/blinky/blinky.elf\n        GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n        Copyright (C) 2014 Free Software Foundation, Inc.\n        License GPLv3+: GNU GPL version 3 or later  http://gnu.org/licenses/gpl.html \n        ...\n        (info)\n        ...\n        target state: halted\n        target halted due to debug-request, current mode: Thread
  \n        xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000\n        Info : accepting  gdb  connection from 3333\n        Info : device id = 0x10036413\n        Info : flash size = 1024kbytes\n        Reset_Handler () at startup_STM32F40x.s:199\n        199     ldr    r1, =__etext\n        (gdb)  Note #2: If you want to erase the flash and load the image again you may use the following commands from within gdb.  flash erase_sector 0 0 x  tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the contents of the sector starting at location 'lma,' you should see all f's. The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.          (gdb) monitor flash erase_sector 0 0 4\n        erased sectors 0 through 4 on flash bank 0 in 2.296712s\n        (gdb) monitor mdw 0x08000000 16\n        0x08000000: ffffffff f
 fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n        (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n        (0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n        (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff         \n        (gdb) monitor flash info 0", 
+            "text": "If you wish to build the image to run from the onboard flash memory on Olimex board, follow the steps below:    Configure the board to boot from flash by moving the two jumpers together to  B0_0  and  B1_0 . Refer to the pictures of the board under the section titled  \"Prepare the hardware to boot from embedded SRAM\" .  You will have to reset the board once the image is uploaded to it.    If you skipped the first option for the project  (downloading an image to SRAM) , then skip this step. Otherwise, continue with this step.     By default, the linker script ( olimex_stm32-e407_devboard.ld ) is configured to run from bootloader and flash. However, if you first ran the image from SRAM you had changed  olimex_stm32-e407_devboard.ld  to match  run_from_sram.ld . You will, therefore, return to defaults with  olimex_stm32-e407_devboard.ld  linker script matching the contents of 'run_from_loader.ld'. Return to the project directory.      $ cd ~/dev/core/hw/bsp/olime
 x_stm32-e407_devboard\n    $ diff olimex_stm32-e407_devboard.ld run_from_sram.ld\n    $ diff olimex_stm32-e407_devboard.ld run_from_loader.ld\n    (some diff will be displayed)\n    $ cp run_from_loader.ld olimex_stm32-e407_devboard.ld\n    $ cd ~/dev/core    In order to run the image from flash, you need to build the bootloader as well. The bootloader does the initial set up of the Olimex board and then transfers control to the image stored at a location in flash known to it.    Let s create boot_olimex:\n\n```no-highlight\n    $ newt target create boot_olimex\n    Creating target boot_olimex\n    Target boot_olimex successfully created!\n    $ newt target set boot_olimex build_profile=optimized\n    Target boot_olimex successfully set compiler_def to optimized\n    $ newt target set boot_olimex @apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard\n    Target boot_olimex successfully set bsp to ...\n    $ newt target set boot_olimex app=@apache-mynewt-core/apps/boot\n    Target ta
 rgets/boot_olimex successfully set target.app to apps/boot\n    $ newt target show boot_olimex\n    targets/boot_olimex\n        app=app=@apache-mynewt-core/apps/boot\n        bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboar\n        build_profile=optimized    Now let's build both targets now.       $ newt build boot_olimex\n    ...\n    App successfully built: ~/dev/core/bin/boot_olimex/apps/boot/boot_olimex.elf\n    $ newt build blinky\n    ...\n    Linking blinky.elf\n    App successfully built: ~/dev/core/bin/blinky/apps/blinky/blinky.elf    Create the blinky image and download the bootloader and the image to flash ... in a flash! \nWhen creating an image, you can assign a version number to your image; here we use '1.2.3'       $ newt create-image blinky 1.2.3\n    App image successfully generated: ~/dev/core/bin/blinky/apps/blinky/blinky.img\n    Build manifest: ~/dev/core/bin/blinky/apps/blinky/manifest.json\n    $ newt load boot_olimex\n    Downloading ~/dev/core/bin/
 boot_olimex/apps/boot/boot.elf.bin to 0x08000000\n    Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)\n    ...\n    shutdown command invoked\n    $ newt load blinky\n    Downloading ~/dev/core/bin/blinky/apps/blinky/blinky.img to 0x08020000\n    Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)\n    ...\n    shutdown command invoked    Voil\u00e0! The LED should be blinking! Success!    But wait...not so fast.  Let's double check that it is indeed booting from flash and making the LED blink from the image in flash. Pull the USB cable off the Olimex JTAG adaptor, severing the debug connection to the JTAG port. Next power off the Olimex board by pulling out the USB cable from the board. Wait for a couple of seconds and plug the USB cable back to the board.   The LED light will start blinking again. Success!  Note #1:  If you want to download the image to flash and a gdb session opened up, use  newt debug blinky  after  newt download blinky .      $ newt debug blinky\n    Debugging with ~/
 dev/core/hw/bsp/olimex_stm32-e407_...\n    Debugging ~/dev/core/project/blinky/bin/blinky/blinky.elf\n    GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\n    Copyright (C) 2014 Free Software Foundation, Inc.\n    License GPLv3+: GNU GPL version 3  http://gnu.org/licenses/gpl.html \n    ...\n    (info)\n    ...\n    target state: halted\n    target halted due to debug-request, current mode: Thread \n    xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000\n    Info : accepting  gdb  connection from 3333\n    Info : device id = 0x10036413\n    Info : flash size = 1024kbytes\n    Reset_Handler () at startup_STM32F40x.s:199\n    199     ldr    r1, =__etext\n    (gdb)   Note #2:  If you want to erase the flash and load the image again you may use the following commands from within gdb.  flash erase_sector 0 0 x  tells it to erase sectors 0 through x. When you ask it to display (in hex notation) the contents of the sector starting at location 'lma,' you should see all f's. 
 The memory location 0x8000000 is the start or origin of the flash memory contents and is specified in the olimex_stm32-e407_devboard.ld linker script. The flash memory locations is specific to the processor.      (gdb) monitor flash erase_sector 0 0 4\n    erased sectors 0 through 4 on flash bank 0 in 2.296712s\n    (gdb) monitor mdw 0x08000000 16\n    0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n    (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n    (0x08000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff \n    (0x08000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff         \n    (gdb) monitor flash info 0", 
             "title": "Use flash to make LED blink"
         }, 
         {
             "location": "/os/tutorials/olimex/#conclusion", 
-            "text": "Congratulations! You have now tried out a project on actual hardware. If this is your first time to embedded systems, this must feel like the best hands-on and low-level \"Hello World\" progam ever.   Good, we have more fun tutorials for you to get your hands dirty. Be bold and try other Blinky-like  tutorials .  If you see anything missing or want to send us feeback, please do so by signing up for appropriate mailing lists on our  Community Page  Keep on hacking and blinking!", 
+            "text": "Congratulations! You have now tried out a project on actual hardware. If this is your first time to embedded systems, this must feel like the best hands-on and low-level \"Hello World\" program ever.   Good, we have more fun tutorials for you to get your hands dirty. Be bold and try other Blinky-like  tutorials .  If you see anything missing or want to send us feedback, please do so by signing up for appropriate mailing lists on our  Community Page  Keep on hacking and blinking!", 
             "title": "Conclusion"
         }, 
         {