You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/01/13 02:57:03 UTC
[GitHub] aditihilbert closed pull request #727: Remove blinky tutorials
aditihilbert closed pull request #727: Remove blinky tutorials
URL: https://github.com/apache/mynewt-core/pull/727
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/os/tutorials/blinky/arduino_zero.rst b/docs/os/tutorials/blinky/arduino_zero.rst
deleted file mode 100644
index e5f9c894f..000000000
--- a/docs/os/tutorials/blinky/arduino_zero.rst
+++ /dev/null
@@ -1,377 +0,0 @@
-Blinky, your "Hello World!", on Arduino Zero
---------------------------------------------
-
-This tutorial shows you how to create, build and run the Blinky
-application on an Arduino Zero board.
-
-Prerequisites
-~~~~~~~~~~~~~
-
-- Meet the prerequisites listed in `Project
- Blinky </os/tutorials/blinky.html>`__.
-- Have an Arduino Zero board.
- Note: There are many flavors of Arduino. Make sure you are using an
- Arduino Zero. See below for the versions of Arduino Zero that are
- compatible with this tutorial.
-- Install the `OpenOCD debugger </os/get_started/cross_tools/>`__.
-
-This tutorial uses the Arduino Zero Pro board. The tutorial has been
-tested on the following three Arduino Zero boards - Zero, M0 Pro, and
-Zero-Pro.
-
-Mynewt has not been tested on Arduino M0 which has no internal debugger
-support.
-
-Create a Project
-~~~~~~~~~~~~~~~~
-
-Create a new project if you do not have an existing one. You can skip
-this step and proceed to `fetch external packages <#fetchexternal>`__ if
-you already created a project.
-
-Run the following commands to create a new project:
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
- $ cd myproj
- $ newt install
- apache-mynewt-core
- $
-
-Fetch External Packages
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-Mynewt uses source code provided directly from the chip manufacturer for
-low level operations. Sometimes this code is licensed only for the
-specific manufacturer of the chipset and cannot live in the Apache
-Mynewt repository. That happens to be the case for the Arduino Zero
-board which uses Atmel SAMD21. Runtime's github repository hosts such
-external third-party packages and the newt tool can fetch them.
-
-To fetch the package with MCU support for Atmel SAMD21 for Arduino Zero
-from the Runtime git repository, you need to add the repository to the
-``project.yml`` file in your base project directory.
-
-Here is an example ``project.yml`` file with the Arduino Zero repository
-added. The sections with ``mynewt_arduino_zero`` that need to be added
-to your project file are highlighted.
-
-**Note:** On Windows platforms: You need to set ``vers`` to ``0-dev``
-and use the latest master branch for both repositories.
-
-\`\`\`hl\_lines="6 14 15 16 17 18" $ more project.yml project.name:
-"my\_project"
-
-project.repositories: - apache-mynewt-core - mynewt\_arduino\_zero
-
-repository.apache-mynewt-core: type: github vers: 1-latest user: apache
-repo: mynewt-core
-
-repository.mynewt\_arduino\_zero: type: github vers: 1-latest user:
-runtimeco repo: mynewt\_arduino\_zero $ \`\`\`
-
-Install the project dependencies using the ``newt install`` command
-(you can specify ``-v`` for verbose output):
-
-.. code-block:: console
-
- $ newt install
- apache-mynewt-core
- mynewt_arduino_zero
- $
-
-**NOTE:** If there has been a new release of a repo used in your project
-since you last installed it, the ``1-latest`` version for the repo in
-the ``project.yml`` file will refer to the new release and will not
-match the installed files. In that case you will get an error message
-saying so and you will need to run ``newt upgrade`` to overwrite the
-existing files with the latest codebase.
-
-| You need to create two targets for the Arduino Zero Pro board, one
- for the bootloader and one for the Blinky application.
-| Run the following ``newt target`` commands, from your project
- directory, to create a bootloader target. We name the target
- ``arduino_boot``.
-
-.. code-block:: console
-
- $ newt target create arduino_boot
- $ newt target set arduino_boot bsp=@mynewt_arduino_zero/hw/bsp/arduino_zero
- $ newt target set arduino_boot app=@apache-mynewt-core/apps/boot
- $ newt target set arduino_boot build_profile=optimized
- Target targets/arduino_boot successfully set target.build_profile to optimized
- $ newt target set arduino_boot syscfg=BSP_ARDUINO_ZERO_PRO=1
- Target targets/arduino_boot successfully set target.syscfg to BSP_ARDUINO_ZERO_PRO=1
- $
-
-**Note:** If you have an Arduino Zero instead of an Arduino Zero Pro or
-Arduino M0 Pro board, replace ``BSP_ARDUINO_ZERO_PRO`` with
-``BSP_ARDUINO_ZERO`` in the last ``newt target set`` command.
-
-These commands perform the following:
-
-- Create a target named ``arduino_boot`` for the Arduino Zero
- Bootloader.
-- Set the application for the ``arduino_boot`` target to the default
- Apache Mynewt bootloader (``@apache-mynewt-core/apps/boot``)
-- Set the board support package for the target to
- ``@mynewt_arduino_zero/hw/bsp/arduino_zero``. This is a reference to
- the downloaded Arduino Zero support from Github.
-- Use the "optimized" build profile for the ``arduino_boot`` target.
- This instructs Newt to generate smaller and more efficient code for
- this target. This setting is necessary due to the bootloader's strict
- size constraints.
-- Sets the system configuration setting for Board Support Package to
- support the Arduino Zero Pro.
-
-See the `Concepts <../get_started/vocabulary.html>`__ section for more
-information on setting options. ###Create a Target for the Blinky
-Application Run the following ``newt target`` commands to create the
-Blinky application target. We name the application target
-``arduino_blinky``.
-
-.. code-block:: console
-
- $ newt target create arduino_blinky
- Target targets/arduino_blinky successfully created
- $ newt target set arduino_blinky app=apps/blinky
- Target targets/arduino_blinky successfully set target.app to apps/blinky
- $ newt target set arduino_blinky bsp=@mynewt_arduino_zero/hw/bsp/arduino_zero
- Target targets/arduino_blinky successfully set target.bsp to @mynewt_arduino_zero/hw/bsp/arduino_zero
- $ newt target set arduino_blinky build_profile=debug
- Target targets/arduino_blinky successfully set target.build_profile to debug
- $ newt target set arduino_blinky syscfg=BSP_ARDUINO_ZERO_PRO=1
- Target targets/arduino_boot successfully set target.syscfg to BSP_ARDUINO_ZERO_PRO=1
- $
-
-**Note:** If you have an Arduino Zero instead of a Arduino Zero Pro
-board, replace ``BSP_ARDUINO_ZERO_PRO`` with ``BSP_ARDUINO_ZERO`` in the
-last ``newt target set`` command.
-
-Build the Bootloader
-~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build arduino_boot`` command to build the bootloader:
-
-.. code-block:: console
-
- $ newt build arduino_boot
- Building target targets/arduino_boot
- Compiling bin/targets/arduino_boot/generated/src/arduino_boot-sysinit-app.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_rsa.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c
- Compiling bin/targets/arduino_boot/generated/src/arduino_boot-sysflash.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_validate.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
- Compiling repos/apache-mynewt-core/apps/boot/src/boot.c
- Compiling repos/apache-mynewt-core/crypto/mbedtls/src/arc4.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/loader.c
- Compiling repos/apache-mynewt-core/crypto/mbedtls/src/aes.c
-
- ....
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/arduino_boot/app/apps/boot/boot.elf
- Target successfully built: targets/arduino_boot
-
-Build the Blinky Application
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build arduino_blinky`` command to build the Blinky
-application image:
-
-.. code-block:: console
-
- $ newt build arduino_blinky
- Building target targets/arduino_blinky
- Compiling repos/apache-mynewt-core/hw/hal/src/hal_flash.c
- Compiling apps/blinky/src/main.c
- Compiling repos/mynewt_arduino_zero/hw/mcu/atmel/samd21xx/src/sam0/drivers/i2s/i2s.c
- Compiling repos/mynewt_arduino_zero/hw/bsp/arduino_zero/src/hal_bsp.c
- Compiling repos/mynewt_arduino_zero/hw/mcu/atmel/samd21xx/src/sam0/drivers/i2s/i2s_callback.c
- Compiling repos/mynewt_arduino_zero/hw/mcu/atmel/samd21xx/src/sam0/drivers/nvm/nvm.c
-
- ...
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/arduino_blinky/app/apps/blinky/blinky.elf
- Target successfully built: targets/arduino_blinky
-
-Connect to the Board
-~~~~~~~~~~~~~~~
-
-
-Connect your computer to the Arduino Zero (from now on we'll call this
-the target) with a Micro-USB cable through the Programming Port as shown
-below. Mynewt will load the image onto the board and debug the target
-through this port. You should see a green LED come on that indicates the
-board has power.
-
-No external debugger is required. The Arduino Zero comes with an
-internal debugger that can be accessed by Mynewt.
-
-The images below show the Arduino Zero Programming Port.
-
-Load the Bootloader onto the Board
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt load arduino_boot`` command to load the bootloader onto
-the board:
-
-.. code-block:: console
-
- $ newt load arduino_boot
- Loading bootloader
- $
-
-The bootloader is loaded onto your board succesfully when the
-``newt load`` command returns to the command prompt after the
-``Loading bootloader`` status message. You can proceed to load and run
-your Blinky application image (See `Run the Blinky
-Application <#runimage>`__).
-
-If the ``newt load`` command outputs the following error messages, you
-will need to erase the board.
-
-::
-
- $ newt load arduino_boot -v
- Loading bootloader
- Error: Downloading ~/dev/myproj/bin/targets/arduino_boot/app/apps/boot/boot.elf.bin to 0x0
- Open On-Chip Debugger 0.9.0 (2015-11-15-05:39)
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- Info : only one transport option; autoselect 'swd'
- adapter speed: 500 kHz
- adapter_nsrst_delay: 100
- cortex_m reset_config sysresetreq
- Info : CMSIS-DAP: SWD Supported
- Info : CMSIS-DAP: JTAG Supported
- Info : CMSIS-DAP: Interface Initialised (SWD)
- Info : CMSIS-DAP: FW Version = 01.1F.0118
- Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
- Info : CMSIS-DAP: Interface ready
- Info : clock speed 500 kHz
- Info : SWD IDCODE 0x0bc11477
- Info : at91samd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints
- Error: Target not halted
-
-To erase your board, start a debug session and enter the highlighted
-commands at the ``(gdb)`` prompts:
-
-**Note:** On Windows, openocd and gdb are started in separate Windows
-Command Prompt terminals, and the terminals are automatically closed
-when you quit gdb. In addition, the output of openocd is logged to the
-openocd.log file in your project's base directory instead of the
-terminal.
-
-``hl_lines="2, 5, 14" $ newt debug arduino_blinky (gdb) mon at91samd chip-erase chip erased chip erased (gdb) x/32wx 0 0x0: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x10: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x20: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x30: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x40: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x50: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x60: 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x70: 0xffffffff 0xffffffff 0xffffffff 0xffffffff (gdb) q``
-Run the ``newt load arduino_boot`` command again after erasing the
-board.
-
-Reminder if you are using Docker: When working with actual hardware,
-remember that each board has an ID. If you swap boards and do not
-refresh the USB Device Filter on the VirtualBox UI, the ID might be
-stale and the Docker instance may not be able to see the board
-correctly. For example, you may see an error message like
-``Error: unable to find CMSIS-DAP device`` when you try to load or run
-an image on the board. In that case, you need to click on the USB link
-in VirtualBox UI, remove the existing USB Device Filter (e.g. "Atmel
-Corp. EDBG CMSIS-DAP[0101]") by clicking on the "Removes selected USB
-filter" button, and add a new filter by clicking on the "Adds new USB
-filter" button.
-
-Run the Blinky Application
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-After you load the bootloader successfully onto your board, you can load
-and run the Blinky application.
-
-Run the ``newt run arduino_blinky 1.0.0`` command to build the
-arduino\_blinky target (if necessary), create an image with version
-1.0.0, load the image onto the board, and start a debugger session.
-
-**Note** The output of the debug session below is for Mac OS and Linux
-platforms. On Windows, openocd and gdb are started in separate Windows
-Command Prompt terminals. The output of openocd is logged to the
-openocd.log file in your project's base directory and not to the
-terminal. The openocd and gdb terminals will close automatically when
-you quit gdb.
-
-.. code-block:: console
-
- $ newt run arduino_blinky 1.0.0
- App image succesfully generated: ~/dev/myproj/bin/targets/arduino_blinky/app/apps/blinky/blinky.img
- Loading app image into slot 1
- [~/dev/myproj/repos/mynewt_arduino_zero/hw/bsp/arduino_zero/arduino_zero_debug.sh ~/dev/myproj/repos/mynewt_arduino_zero/hw/bsp/arduino_zero ~/dev/myproj/bin/targets/arduino_blinky/app/apps/blinky/blinky]
- Open On-Chip Debugger 0.9.0 (2015-11-15-13:10)
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- Info : only one transport option; autoselect 'swd'
- adapter speed: 500 kHz
- adapter_nsrst_delay: 100
- cortex_m reset_config sysresetreq
- Info : CMSIS-DAP: SWD Supported
- Info : CMSIS-DAP: JTAG Supported
- Info : CMSIS-DAP: Interface Initialised (SWD)
- Info : CMSIS-DAP: FW Version = 01.1F.0118
- Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
- Info : CMSIS-DAP: Interface ready
- Info : clock speed 500 kHz
- Info : SWD IDCODE 0x0bc11477
- Info : at91samd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints
- target state: halted
- target halted due to debug-request, current mode: Thread
- xPSR: 0x21000000 pc: 0x0000fca6 psp: 0x20002408
- 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 <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
- Type "show configuration" for configuration details.
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>.
- Find the GDB manual and other documentation resources online at:
- <http://www.gnu.org/software/gdb/documentation/>.
- For help, type "help".
- Type "apropos word" to search for commands related to "word"...
- Reading symbols from ~/dev/myproj/bin/targets/arduino_blinky/app/apps/blinky/blinky.elf...(no debugging symbols found)...done.
- Info : accepting 'gdb' connection on tcp/3333
- Info : SAMD MCU: SAMD21G18A (256KB Flash, 32KB RAM)
- 0x0000fca6 in os_tick_idle ()
- target state: halted
- target halted due to debug-request, current mode: Thread
- xPSR: 0x21000000 pc: 0x000000b8 msp: 0x20008000
- target state: halted
- target halted due to debug-request, current mode: Thread
- xPSR: 0x21000000 pc: 0x000000b8 msp: 0x20008000
- (gdb) r
- The "remote" target does not support "run". Try "help target" or "continue".
- (gdb) c
- Continuing.
-
-**NOTE:** The 1.0.0 is the version number to assign to the image. You
-may assign an arbitrary version number. If you are not providing remote
-upgrade, and are just developing locally, you can provide 1.0.0 for
-every image version.
-
-If you want the image to run without the debugger connected, simply quit
-the debugger and restart the board. The image you programmed will come
-and run on the Arduino on next boot!
-
-You should see the LED blink!
diff --git a/docs/os/tutorials/blinky/blinky.rst b/docs/os/tutorials/blinky/blinky.rst
deleted file mode 100644
index 44c3bdc4f..000000000
--- a/docs/os/tutorials/blinky/blinky.rst
+++ /dev/null
@@ -1,79 +0,0 @@
-Blinky, your "Hello World!" on a Target Board
-=============================================
-
-.. toctree::
- :hidden:
-
- arduino_zero
- blinky_primo
- olimex
- nRF52
- rbnano2
- blinky_stm32f4disc
- blinky_console
-
-The set of Blinky tutorials show you how to create, build, and run a
-"Hello World" application that blinks a LED on the various target boards
-that Mynewt supports. The tutorials use the same Blinky application from
-the `Creating Your First Project </os/get_started/project_create>`__
-tutorial.
-
-Objective
-~~~~~~~~~
-
-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 a LED light on the target board.
-
-Available Tutorials
-~~~~~~~~~~~~~~~~~~~
-
-Tutorials are available for the following boards:
-
-- `Blinky on an Arduino Zero </os/tutorials/arduino_zero.html>`__
-- `Blinky on an Arduino Primo </os/tutorials/blinky_primo.html>`__
-- `Blinky on an Olimex </os/tutorials/olimex.html>`__
-- `Blinky on a nRF52 Development Kit </os/tutorials/nRF52.html>`__
-- `Blinky on a RedBear Nano 2 </os/tutorials/rbnano2.html>`__
-- `Blinky on a
- STM32F4-Discovery </os/tutorials/blinky_stm32f4disc.html>`__
-
-We also have a tutorial that shows you how to add `Console and Shell to
-the Blinky Application </os/tutorials/blinky_console.html>`__. ###
-Prerequisites Ensure that you meet the following prerequisites before
-continuing with one of the tutorials.
-
-- Have Internet connectivity to fetch remote Mynewt components.
-- Have a computer to build a Mynewt application and connect to the
- board over USB.
-- Have a Micro-USB cable to connect the board and the computer.
-- Install the newt tool and toolchains (See `Basic
- Setup </os/get_started/get_started.html>`__).
-- Read the Mynewt OS `Concepts </os/get_started/vocabulary.html>`__
- section.
-- Create a project space (directory structure) and populate it with the
- core code repository (apache-mynewt-core) or know how to as explained
- in `Creating Your First Project </os/get_started/project_create>`__.
- ###Overview of Steps These are the general steps to create, load and
- run the Blinky application on your board:
-
-- Create a project.
-- Define the bootloader and Blinky application targets for the board.
-- Build the bootloader target.
-- Build the Blinky application target and create an application image.
-- Connect to the board.
-- Load the bootloader onto the board.
-- Load the Blinky application image onto the board.
-- See the LED on your board blink.
-
-After you try the Blinky application on your boards, checkout out other
-tutorials to enable additional functionality such as `remote
-comms <project-slinky.html>`__ on the current board. If you have BLE
-(Bluetooth Low Energy) chip (e.g. nRF52) on your board, you can try
-turning it into an `iBeacon <ibeacon.html>`__ or `Eddystone
-Beacon <eddystone.html>`__!
-
-If you see anything missing or want to send us feedback, please sign up
-for appropriate mailing lists on our `Community
-Page <../../community.html>`__.
diff --git a/docs/os/tutorials/blinky/blinky_console.rst b/docs/os/tutorials/blinky/blinky_console.rst
deleted file mode 100644
index aa7681c9c..000000000
--- a/docs/os/tutorials/blinky/blinky_console.rst
+++ /dev/null
@@ -1,239 +0,0 @@
-Enabling The Console and Shell for Blinky
------------------------------------------
-
-This tutorial shows you how to add the Console and Shell to the Blinky
-application and interact with it over a serial line connection.
-
-Prerequisites
-~~~~~~~~~~~~~
-
-- Work through one of the Blinky Tutorials to create and build a Blinky
- application for one of the boards.
-- Have a `serial setup </os/get_started/serial_access.html>`__.
-
-Use an Existing Project
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Since all we're doing is adding the shell and console capability to
-blinky, we assume that you have worked through at least some of the
-other tutorials, and have an existing project. For this example, we'll
-be modifying the `blinky on nrf52 <./nRF52.html>`__ project to enable the
-shell and console connectivity. You can use blinky on a different board.
-
-Modify the Dependencies and Configuration
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Modify the package dependencies in your application target's ``pkg.yml``
-file as follows:
-
-- Add the shell package: ``@apache-mynewt-core/sys/shell``.
-- Replace the ``@apache-mynewt-core/sys/console/stub`` package with the
- ``@apache-mynewt-core/sys/console/full`` package.
-
- **Note**: If you are using version 1.1 or lower of blinky, the
- ``@apache-mynewt-core/sys/console/full`` package may be already
- listed as a dependency.
-
-The updated ``pkg.yml`` file should have the following two lines:
-
-.. code-block:: console
-
- pkg.deps:
- - "@apache-mynewt-core/sys/console/full"
- - "@apache-mynewt-core/sys/shell"
-
-This lets the newt system know that it needs to pull in the code for the
-console and the shell.
-
-Modify the system configuration settings to enable Shell and Console
-ticks and prompt. Add the following to your application target's
-``syscfg.yml`` file:
-
-.. code-block:: console
-
- syscfg.vals:
- # Enable the shell task.
- SHELL_TASK: 1
- SHELL_PROMPT_MODULE: 1
-
-Use the OS Default Event Queue to Process Blinky Timer and Shell Events
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Mynewt creates a main task that executes the application ``main()``
-function. It also creates an OS default event queue that packages can
-use to queue their events. Shell uses the OS default event queue for
-Shell events, and ``main()`` can process the events in the context of
-the main task.
-
-Blinky's main.c is very simple. It only has a ``main()`` function that
-executes an infinite loop to toggle the LED and sleep for one second. We
-will modify blinky:
-
-- To use os\_callout to generate a timer event every one second instead
- of sleeping. The timer events are added to the OS default event
- queue.
-- To process events from the OS default event queue inside the infinite
- loop in ``main()``.
-
-This allows the main task to process both Shell events and the timer
-events to toggle the LED from the OS default event queue.
-
-Modify main.c
-~~~~~~~~~~~~~
-
-Initialize a os\_callout timer and move the toggle code from the while
-loop in ``main()`` to the event callback function. Add the following
-code above the ``main()`` function:
-
-.. code:: c
-
- /* The timer callout */
- static struct os_callout blinky_callout;
-
- /*
- * Event callback function for timer events. It toggles the led pin.
- */
- static void
- timer_ev_cb(struct os_event *ev)
- {
- assert(ev != NULL);
-
- ++g_task1_loops;
- hal_gpio_toggle(g_led_pin);
-
- os_callout_reset(&blinky_callout, OS_TICKS_PER_SEC);
- }
-
- static void
- init_timer(void)
- {
- /*
- * Initialize the callout for a timer event.
- */
- os_callout_init(&blinky_callout, os_eventq_dflt_get(),
- timer_ev_cb, NULL);
-
- os_callout_reset(&blinky_callout, OS_TICKS_PER_SEC);
- }
-
-In ``main()``, add the call to the ``init_timer()`` function before the
-while loop and modify the while loop to process events from the OS
-default event queue:
-
-\`\`\`c hl\_lines="15 17" int main(int argc, char \*\*argv) {
-
-::
-
- int rc;
-
-ifdef ARCH\_sim
-===============
-
-::
-
- mcu_sim_parse_args(argc, argv);
-
-endif
-=====
-
-::
-
- sysinit();
-
- g_led_pin = LED_BLINK_PIN;
- hal_gpio_init_out(g_led_pin, 1);
- init_timer();
- while (1) {
- os_eventq_run(os_eventq_dflt_get());
- }
- assert(0);
- return rc;
-
-}
-
-\`\`\`
-
-Build, Run, and Upload the Blinky Application Target
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-We're not going to build the bootloader here since we are assuming that
-you have already built and loaded it during previous tutorials.
-
-We will use the ``newt run`` command to build and deploy our improved
-blinky image. The run command performs the following tasks for us:
-
-1. Builds a binary Mynewt executable
-2. Wraps the executable in an image header and footer, turning it into a
- Mynewt image.
-3. Uploads the image to the target hardware.
-4. Starts a gdb process to remotely debug the Mynewt device.
-
-Run the ``newt run nrf52_blinky 0`` command. The ``0`` is the version
-number that should be written to the image header. Any version will do,
-so we choose 0.
-
-.. code-block:: console
-
- $ newt run nrf52_blinky 0
-
- ...
-
- Archiving util_mem.a
- Linking /home/me/dev/myproj/bin/targets/nrf52_blinky/app/apps/blinky/blinky.elf
- App image succesfully generated: /home/me/dev/myproj/bin/targets/nrf52_blinky/app/apps/blinky/blinky.elf
- Loading app image into slot 1
- [/home/me/dev/myproj/repos/apache-mynewt-core/hw/bsp/nrf52dk/nrf52dk_debug.sh /home/me/dev/myproj/repos/apache-mynewt-core/hw/bsp/nrf52dk /home/me/dev/myproj/bin/targets/nrf52_blinky/app/apps/blinky]
- Debugging /home/me/dev/myproj/bin/targets/nrf52_blinky/app/apps/blinky/blinky.elf
-
-Set Up a Serial Connection
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-You'll need a Serial connection to see the output of your program. You
-can reference the `Serial Port
-Setup <../get_started/serial_access.html>`__ Tutorial for more information
-on setting up your serial communication.
-
-Communicate with the Application
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Once you have a connection set up, you can connect to your device as
-follows:
-
-- On Mac OS and Linux platforms, you can run
- ``minicom -D /dev/tty.usbserial-<port> -b 115200`` to connect to the
- console of your app. Note that on Linux, the format of the port name
- is ``/dev/ttyUSB<N>``, where N is a number.
-
-- On Windows, you can use a terminal application such as PuTTY to
- connect to the device.
-
-If you located your port from a MinGW terminal, the port name format is
-``/dev/ttyS<N>``, where ``N`` is a number. You must map the port name to
-a Windows COM port: ``/dev/ttyS<N>`` maps to ``COM<N+1>``. For example,
-``/dev/ttyS2`` maps to ``COM3``.
-
-You can also use the Windows Device Manager to locate the COM port.
-
-To test and make sure that the Shell is running, first just hit :
-
-.. code-block:: console
-
- 004543 shell>
-
-You can try some commands:
-
-.. code-block:: console
-
- 003005 shell> help
- 003137 Available modules:
- 003137 os
- 003138 prompt
- 003138 To select a module, enter 'select <module name>'.
- 003140 shell> prompt
- 003827 help
- 003827 ticks shell ticks command
- 004811 shell> prompt ticks off
- 005770 Console Ticks off
- shell> prompt ticks on
- 006404 Console Ticks on
- 006404 shell>
diff --git a/docs/os/tutorials/blinky/blinky_primo.rst b/docs/os/tutorials/blinky/blinky_primo.rst
deleted file mode 100644
index c8723884a..000000000
--- a/docs/os/tutorials/blinky/blinky_primo.rst
+++ /dev/null
@@ -1,302 +0,0 @@
-Blinky, your "Hello World!", on Arduino Primo
----------------------------------------------
-
-This tutorial shows you how to create, build, and run the Blinky
-application on an Arduino Primo board.
-
-Note that the Mynewt OS will run on the nRF52 chip in the Arduino Primo
-board. However, the board support package for the Arduino Primo is
-different from the nRF52 dev kit board support package. ###
-Prerequisites
-
-- Meet the the prerequisites listed in `Project
- Blinky </os/tutorials/blinky.html>`__.
-- Have an Arduino Primo board.
-- Install a debugger. Choose one of the two options below: Option 1
- requires additional hardware but very easy to set up.
-
-# Option 1
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
- \* `Segger J-Link Debug Probe <https://www.segger.com/jlink-debug-probes.html>`__ - any model
-(this tutorial has been tested with J-Link EDU and J-Link Pro) \*
-`J-Link 9 pin Cortex-M
-Adapter <https://www.segger.com/jlink-adapters.html#CM_9pin>`__ that
-allows JTAG, SWD and SWO connections between J-Link and Cortex M based
-target hardware systems \* Install the `Segger JLINK Software and
-documentation pack <https://www.segger.com/jlink-software.html>`__.
-
-Option 2
-''''''''
-
-This board requires a patch version of OpenOCD 0.10.0 that is in
-development. See `Install OpenOCD </os/get_started/cross_tools.html>`__
-instructions to install it if you do not have this version installed.
-
-You can now use openocd to upload to Arduino Primo board via the USB
-port itself.
-
-Create a Project
-~~~~~~~~~~~~~~~~
-
-Create a new project if you do not have an existing one. You can skip
-this step and proceed to `create the targets <#create_targets>`__ if you
-already created a project.
-
-Run the following commands to create a new project:
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
- $ cd myproj
- $ newt install
- apache-mynewt-core
- $
-
-Create the Targets
-~~~~~~~~~~~~~~~
-
-
-Create two targets for the Arduino Primo board - one for the bootloader
-and one for the Blinky application.
-
-Run the following ``newt target`` commands, from your project directory,
-to create a bootloader target. We name the target ``primo_boot``.
-
-.. code-block:: console
-
- $ newt target create primo_boot
- $ newt target set primo_boot app=@apache-mynewt-core/apps/boot bsp=@apache-mynewt-core/hw/bsp/arduino_primo_nrf52 build_profile=optimized
-
-Run the following ``newt target`` commands to create a target for the
-Blinky application. We name the target ``primoblinky``.
-
-.. code-block:: console
-
- $ newt target create primoblinky
- $ newt target set primoblinky app=apps/blinky bsp=@apache-mynewt-core/hw/bsp/arduino_primo_nrf52 build_profile=debug
-
-If you are using openocd, run the following ``newt target set``
-commands:
-
-.. code-block:: console
-
- $ newt target set primoblinky syscfg=OPENOCD_DEBUG=1
- $ newt target set primo_boot syscfg=OPENOCD_DEBUG=1
-
-You can run the ``newt target show`` command to verify the target
-settings:
-
-.. code-block:: console
-
- $ newt target show
- targets/my_blinky_sim
- app=apps/blinky
- bsp=@apache-mynewt-core/hw/bsp/native
- build_profile=debug
- targets/primo_boot
- app=@apache-mynewt-core/apps/boot
- bsp=@apache-mynewt-core/hw/bsp/arduino_primo_nrf52
- build_profile=optimized
- targets/primoblinky
- app=@apache-mynewt-core/apps/blinky
- bsp=@apache-mynewt-core/hw/bsp/arduino_primo_nrf52
- build_profile=optimized
-
-Build the Target Executables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build primo_boot`` command to build the bootloader:
-
-.. code-block:: console
-
- $ newt build primo_boot
- Building target targets/primo_boot
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_rsa.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c
- Compiling repos/apache-mynewt-core/crypto/mbedtls/src/aes.c
- Compiling repos/apache-mynewt-core/apps/boot/src/boot.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/loader.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
-
- ...
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/primo_boot/app/apps/boot/boot.elf
- Target successfully built: targets/primo_boot
-
-Run the ``newt build primoblinky`` command to build the Blinky
-application:
-
-.. code-block:: console
-
- $ newt build primoblinky
- Building target targets/primoblinky
- Compiling repos/apache-mynewt-core/hw/drivers/uart/src/uart.c
- Assembling repos/apache-mynewt-core/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52.s
- Compiling repos/apache-mynewt-core/hw/bsp/arduino_primo_nrf52/src/sbrk.c
- Compiling repos/apache-mynewt-core/hw/cmsis-core/src/cmsis_nvic.c
- Assembling repos/apache-mynewt-core/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52_split.s
- Compiling apps/blinky/src/main.c
- Compiling repos/apache-mynewt-core/hw/drivers/uart/uart_bitbang/src/uart_bitbang.c
- Compiling repos/apache-mynewt-core/hw/bsp/arduino_primo_nrf52/src/hal_bsp.c
-
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/primoblinky/app/apps/blinky/blinky.elf
- Target successfully built: targets/primoblinky
-
-Sign and Create the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt create-image primoblinky 1.0.0`` command to create and
-sign the application image. You may assign an arbitrary version (e.g.
-1.0.0) to the image.
-
-.. code-block:: console
-
- $ newt create-image primoblinky 1.0.0
- App image succesfully generated: ~/dev/myproj/bin/targets/primoblinky/app/apps/blinky/blinky.img
-
-Connect to the Board
-~~~~~~~~~~~~~~~~~~~~
-
-- Connect a micro USB cable to the Arduino Primo board and to your
- computer's USB port.
-- If you are using the Segger J-Link debug probe, connect the debug
- probe to the JTAG port on the Primo board using the Jlink 9-pin
- adapter and cable. Note that there are two JTAG ports on the board.
- Use the one nearest to the reset button as shown in the picture.
-
-.. figure:: pics/primo-jlink.jpg
- :alt: Connecting J-Link debug probe to Arduino Primo
-
- J-Link debug probe to Arduino
-
-**Note:** If you are using the OpenOCD debugger, you do not need to
-attach this connector.
-
-Load the Bootloader
-~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt load primo_boot`` command to load the bootloader onto the
-board:
-
-.. code-block:: console
-
- $ newt load primo_boot
- Loading bootloader
- $
-
-**Note:** If you are using OpenOCD on a Windows platform and you get an
-``unable to find CMSIS-DAP device`` error, you will need to download and
-install the mbed Windows serial port driver from
-https://developer.mbed.org/handbook/Windows-serial-configuration. Follow
-the instructions from the site to install the driver. Here are some
-additional notes about the installation:
-
-1. The instructions indicate that the mbed Windows serial port driver is
- not required for Windows 10. If you are using Windows 10 and get the
- ``unable to find CMSIS-DAP device`` error, we recommend that you
- install the driver.
-2. If the driver installation fails, we recommend that you download and
- install the Arduino Primo CMSIS-DAP driver. Perform the following
- steps:
-
- - Download the `Arduino Primo CMSIS-DAP
- driver <https://github.com/runtimeco/openocd-binaries/raw/master/arduino_primo_drivers.zip>`__
- and extract the zip file.
- - Start Device Manager.
- - Select **Other Devices** > **CMSIS-DAP CDC** > **Properties** >
- **Drivers** > **Update Driver...**.
- - Select **Browse my computer for driver software**.
- - Select the Arduino Driver folder where extracted the drivers to
- (check the include subfolders). Click **Next** to install the
- driver.
-
-Run the ``newt load primo_boot`` command again.
-
-Load the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt load primoblinky`` command to load the Blinky application image onto the board.
-
-.. code-block:: console
-
- $ newt load primoblinky
- Loading app image into slot 1
- $
-
-You should see the orange LED (L13), below the ON LED, on the board
-blink!
-
-Note: If the LED does not blink, try resetting the board.
-
-Erase Flash
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If you want to erase the flash and load the image again, use JLinkExe and issue the ``erase`` command when you are using the
-Jlink debug probe:
-
-**Note:** On Windows: Run the ``jlink`` command with the same arguments
-from a Windows Command Prompt terminal.
-
-.. code-block:: console
-
- $ JLinkExe -device nRF52 -speed 4000 -if SWD
- SEGGER J-Link Commander V5.12c (Compiled Apr 21 2016 16:05:51)
- DLL version V5.12c, compiled Apr 21 2016 16:05:45
-
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
- Hardware version: V1.00
- S/N: 682863966
- VTref = 3.300V
-
-
- Type "connect" to establish a target connection, '?' for help
- J-Link>erase
- Cortex-M4 identified.
- Erasing device (0;?i?)...
- Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Total time needed: 0.363s (Prepare: 0.093s, Compare: 0.000s, Erase: 0.262s, Program: 0.000s, Verify: 0.000s, Restore: 0.008s)
- Erasing done.
- J-Link>exit
- $
-
-If you are using the OpenOCD debugger, run the
-``newt debug primoblinky`` command and issue the highlighted command at
-the (gdb) prompt:
-
-**Note:** The output of the debug session below is for Mac OS and Linux
-platforms. On Windows, openocd and gdb are started in separate Windows
-Command Prompt terminals, and the terminals are automatically closed
-when you quit gdb. In addition, the output of openocd is logged to the
-openocd.log file in your project's base directory instead of the
-terminal.
-
-.. code:: hl_lines="11"
-
- $newt debug primoblinky
- [~/dev/myproj/repos/apache-mynewt-core/hw/bsp/arduino_primo_nrf52/primo_debug.sh ~/dev/myproj/repos/apache-mynewt-core/hw/bsp/arduino_primo_nrf52 ~/dev/myproj/bin/targets/primoblinky/app/apps/blinky/blinky]
- Open On-Chip Debugger 0.10.0-dev-snapshot (2017-03-28-11:24)
-
- ...
-
- os_tick_idle (ticks=128)
- at repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_os_tick.c:200
- warning: Source file is more recent than executable.
- 200 if (ticks > 0) {
- (gdb) mon nrf52 mass_erase
diff --git a/docs/os/tutorials/blinky/blinky_sram_olimex.rst b/docs/os/tutorials/blinky/blinky_sram_olimex.rst
deleted file mode 100644
index 7728adfbb..000000000
--- a/docs/os/tutorials/blinky/blinky_sram_olimex.rst
+++ /dev/null
@@ -1,193 +0,0 @@
-Run Blinky from SRAM without bootloader
----------------------------------------
-
-Objective
-~~~~~~~~~
-
-To download an application image directly into the embedded SRAM in the
-microcontroller and run it without the bootloader. This tutorial
-describes how you do it on an Olimex STM32 board.
-
-What you need
-~~~~~~~~~~~~~
-
-1. STM32-E407 development board from Olimex. You can order it from
- `http://www.mouser.com <http://www.mouser.com/ProductDetail/Olimex-Ltd/STM32-E407/?qs=UN6GZl1KCcit6Ye0xmPO4A%3D%3D>`__,
- `http://www.digikey.com <http://www.digikey.com/product-detail/en/STM32-E407/1188-1093-ND/3726951>`__,
- and other places.
-2. ARM-USB-TINY-H connector with JTAG interface for debugging ARM
- microcontrollers (comes with the ribbon cable to hook up to the
- board)
-3. USB A-B type cable to connect the debugger to your personal computer
-4. Personal Computer with Mac OS (Mac: OS X Yosemite Version 10.10.5) or
- Linux box (Ubuntu 14.10: Utopic Unicorn)
-5. An account on Github repository and *git* installed on your computer.
-6. It is assumed you have already installed newt tool.
-7. It is assumed you already installed native tools as described
- `here <../get_started/native_tools.html>`__
-
-Also, we assume that you're familiar with UNIX shells. Let's gets
-started!
-
-Prepare the Software
-~~~~~~~~~~~~~~~~~~~~
-
-- Make sure the PATH environment variable includes the $HOME/dev/go/bin
- directory.
-
-Create a project
-~~~~~~~~~~~~~~~~
-
-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 <../get_started/project_create.html>`__ or just follow the
-commands below.
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/incubator-mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
-
- $cd 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
-
-Create a target
-~~~~~~~~~~~~~~~
-
-Change directory to ~/dev/myproj directory and define the *blinky*
-target inside myproj, 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.
-
-.. code-block:: console
-
- $ newt target create blinky
- $ newt target set blinky build_profile=debug
- $ newt target set blinky bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard
- $ newt target set blinky app=apps/blinky
- $ newt target show blinky
- targets/blinky
- app=apps/blinky
- bsp=hw/bsp/olimex_stm32-e407_devboard
- build_profile=debug
-
-Build the image
-~~~~~~~~~~~~~~~
-
-Next, let's build the image for the above target. 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``.
-
-Afer you build the target, you can find the executable *blinky.elf* in
-the project directory *~/dev/myproj/bin/blinky/apps/blinky/.*
-
-.. code-block:: console
-
- $ cd ~/dev/myproj/repos/apache-mynewt-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/myproj
- $ newt build blinky
- Compiling case.c
- Compiling suite.c
- ...
- Linking blinky.elf
- App successfully built:~/dev/myproj/bin/blinky/apps/blinky/blinky.elf
- $ ls ~/dev/myproj/bin/blinky/apps/blinky/
- blinky.elf blinky.elf.bin blinky.elf.cmd
- blinky.elf.lst blinky.elf.map
-
-Prepare the hardware to boot from embedded SRAM
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-- Locate the boot jumpers on the board.
-
-|Alt Layout - Top View| |Alt Layout - Bottom View|
-
-- 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 **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.
-
-Let's Go!
-~~~~~~~~~
-
-- 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.
-
-.. code-block:: console
-
- $ 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 <http://gnu.org/licenses/gpl.html>
- ...
- (info)
- ...
- target state: halted
- target halted due to debug-request, current mode: Thread
- xPSR: 0x01000000 pc: 0x080003c0 msp: 0x10010000
- Info : accepting 'gdb' connection on tcp/3333
- Info : device id = 0x10036413
- 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,
-
-.. code-block:: console
-
- (gdb) set $msp=0x10010000
-
-Now load the image and type "c" or "continue" from the GNU debugger.
-
-.. code-block:: console
-
- (gdb) load ~/dev/myproj/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.
-
-- Voil?! The board's LED should be blinking at 1 Hz. Success!
-
-.. |Alt Layout - Top View| image:: pics/topview.png
-.. |Alt Layout - Bottom View| image:: pics/bottomview.png
-
diff --git a/docs/os/tutorials/blinky/blinky_stm32f4disc.rst b/docs/os/tutorials/blinky/blinky_stm32f4disc.rst
deleted file mode 100644
index 39c565c16..000000000
--- a/docs/os/tutorials/blinky/blinky_stm32f4disc.rst
+++ /dev/null
@@ -1,259 +0,0 @@
-Blinky, your "Hello World!", on STM32F4-Discovery
--------------------------------------------------
-
-This tutorial shows you how to create, build, and run the Blinky
-application on the STM32F4-Discovery board.
-
-Prerequisites
-~~~~~~~~~~~~~
-
-- Meet the prerequisites listed in `Project
- Blinky </os/tutorials/blinky.html>`__.
-- Have a STM32F4-Discovery board.
-- Have a USB type A to Mini-B cable.
-- Install a patched version of OpenOCD 0.10.0 described in `Install
- OpenOCD </os/get_started/cross_tools/>`__.
-
-Create a Project
-~~~~~~~~~~~~~~~~
-
-Create a new project if you do not have an existing one. You can skip
-this step and proceed to `create the targets <#create_targets>`__ if you
-already have a project created.
-
-Run the following commands to create a new project:
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
- $ cd myproj
- $ newt install
- apache-mynewt-core
- $
-
-Create the Targets
-~~~~~~~~~~~~~~~~~~
-
-Create two targets for the STM32F4-Discovery board - one for the
-bootloader and one for the Blinky application.
-
-Run the following ``newt target`` commands, from your project directory,
-to create a bootloader target. We name the target ``stm32f4disc_boot``:
-
-.. code-block:: console
-
- $ newt target create stm32f4disc_boot
- $ newt target set stm32f4disc_boot app=@apache-mynewt-core/apps/boot
- $ newt target set stm32f4disc_boot bsp=@apache-mynewt-core/hw/bsp/stm32f4discovery
- $ newt target set stm32f4disc_boot build_profile=optimized
-
-Run the following ``newt target`` commands to create a target for the
-Blinky application. We name the target ``stm32f4disc_blinky``:
-
-.. code-block:: console
-
- $ newt target create stm32f4disc_blinky
- $ newt target set stm32f4disc_blinky app=apps/blinky
- $ newt target set stm32f4disc_blinky bsp=@apache-mynewt-core/hw/bsp/stm32f4discovery
- $ newt target set stm32f4disc_blinky build_profile=debug
-
-You can run the ``newt target show`` command to verify the target
-settings:
-
-.. code-block:: console
-
- $ newt target show
- targets/my_blinky_sim
- app=apps/blinky
- bsp=@apache-mynewt-core/hw/bsp/native
- build_profile=debug
- targets/stm32f4disc_blinky
- app=apps/blinky
- bsp=@apache-mynewt-core/hw/bsp/stm32f4discovery
- build_profile=debug
- targets/stm32f4disc_boot
- app=@apache-mynewt-core/apps/boot
- bsp=@apache-mynewt-core/hw/bsp/stm32f4discovery
- build_profile=optimized
-
-Build the Target Executables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build stm32f4disc_boot`` command to build the bootloader:
-
-.. code-block:: console
-
- $ newt build stm32f4disc_boot
- Building target targets/stm32f4disc_boot
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
- Compiling repos/apache-mynewt-core/apps/boot/src/boot.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_rsa.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_validate.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/loader.c
- ...
-
- Archiving sys_flash_map.a
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/stm32f4disc_boot/app/apps/boot/boot.elf
- Target successfully built: targets/stm32f4disc_boot
-
-Run the ``newt build stm32f4disc_blinky`` command to build the Blinky
-application:
-
-.. code-block:: console
-
- $newt build stm32f4disc_blinky
- Building target targets/stm32f4disc_blinky
- Compiling apps/blinky/src/main.c
- Compiling repos/apache-mynewt-core/hw/bsp/stm32f4discovery/src/sbrk.c
- Compiling repos/apache-mynewt-core/hw/bsp/stm32f4discovery/src/system_stm32f4xx.c
- Compiling repos/apache-mynewt-core/hw/bsp/stm32f4discovery/src/hal_bsp.c
- Assembling repos/apache-mynewt-core/hw/bsp/stm32f4discovery/src/arch/cortex_m4/startup_STM32F40x.s
- Compiling repos/apache-mynewt-core/hw/cmsis-core/src/cmsis_nvic.c
- Compiling repos/apache-mynewt-core/hw/drivers/uart/src/uart.c
- Compiling repos/apache-mynewt-core/hw/drivers/uart/uart_hal/src/uart_hal.c
- Compiling repos/apache-mynewt-core/hw/hal/src/hal_common.c
- Compiling repos/apache-mynewt-core/hw/hal/src/hal_flash.c
-
- ...
-
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/stm32f4disc_blinky/app/apps/blinky/blinky.elf
- Target successfully built: targets/stm32f4disc_blinky
-
-Sign and Create the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt create-image stm32f4disc_blinky 1.0.0`` command to create
-and sign the application image. You may assign an arbitrary version
-(e.g. 1.0.0) to the image.
-
-.. code-block:: console
-
- $newt create-image stm32f4disc_blinky 1.0.0
- App image succesfully generated: ~/dev/myproj/bin/targets/stm32f4disc_blinky/app/apps/blinky/blinky.img
-
-Connect to the Board
-~~~~~~~~~~~~~~~~~~~~
-
-Connect a USB type A to Mini-B cable from your computer to the port the
-board indicated on the diagram:
-
- |stm32f4-discovery|
-
-You should see the small PWR red LED light up.
-
-Load the Bootloader and the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt load stm32f4disc_boot`` command to load the bootloader
-onto the board:
-
-.. code-block:: console
-
- $newt load stm32f4disc_boot
- Loading bootloader
-
-Note: If you are using Windows and get an ``open failed`` or
-``no device found`` error, you will need to install the usb driver.
-Download `Zadig <http://zadig.akeo.ie>`__ and run it:
-
-- Select Options > List All Devices.
-- Select ``STM32 STLink`` from the drop down menu.
-- Select the ``WinUSB`` driver.
-- Click Install Driver.
-- Run the ``newt load stm32f4disc_boot`` command again.
-
-Note: If you are running Linux and get an ``open failed`` message, there
-are two common issues with this board. If you have a board produced
-before mid-2016, it is likely that you have an older version of the
-ST-LINK programmer. To correct this, open the
-``repos/apache-mynewt-core/hw/bsp/stm32f4discovery/f4discovery.cfg``
-file in a text editor, and change the line:
-
-.. code-block:: console
-
- source [find interface/stlink-v2-1.cfg]
-
-to:
-
-.. code-block:: console
-
- source [find interface/stlink-v2.cfg]
-
-If you receive an error like
-``libusb_open() failed with LIBUSB_ERROR_ACCESS``, it means that your
-``udev`` rules are not correctly set up for this device. You can find
-some example ``udev`` rules for ST-LINK programmers
-`here <https://github.com/texane/stlink/tree/master/etc/udev/rules.d>`__.
-
-Run the ``newt load stm32f4disc_blinky`` command to load the Blinky
-application image onto the board.
-
-.. code-block:: console
-
- $newt load stm32f4disc_blinky
- Loading app image into slot 1
-
-You should see the small green LD4 LED on the board blink!
-
-Note: If the LED does not blink, try resetting your board.
-
-If you want to erase the flash and load the image again, start a debug
-session, and enter ``mon stm32f2x mass_erase 0`` at the gdb prompt:
-
-**Note:** The output of the debug session below is for Mac OS and Linux
-platforms. On Windows, openocd and gdb are started in separate Windows
-Command Prompt terminals, and the terminals are automatically closed
-when you quit gdb. In addition, the output of openocd is logged to the
-openocd.log file in your project's base directory instead of the
-terminal.
-
-.. code-block:: console
-
- $newt debug stm32f4disc_blinky
- [~/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery/stm32f4discovery_debug.sh ~/dev/myproj/repos/apache-mynewt-core/hw/bsp/stm32f4discovery ~/dev/myproj/bin/targets/stm32f4disc_blinky/app/apps/blinky/blinky]
- Open On-Chip Debugger 0.10.0
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
- adapter speed: 2000 kHz
- adapter_nsrst_delay: 100
- none separate
- Info : Unable to match requested speed 2000 kHz, using 1800 kHz
- Info : Unable to match requested speed 2000 kHz, using 1800 kHz
- Info : clock speed 1800 kHz
- Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B
- Info : using stlink api v2
- Info : Target voltage: 2.881129
- Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
- target halted due to debug-request, current mode: Thread
-
- ...
-
- Reading symbols from ~/dev/myproj/bin/targets/stm32f4disc_blinky/app/apps/blinky/blinky.elf...done.
- target halted due to debug-request, current mode: Thread
- xPSR: 0x41000000 pc: 0x08021e90 psp: 0x20002290
- Info : accepting 'gdb' connection on tcp/3333
- Info : device id = 0x10076413
- Info : flash size = 1024kbytes
- 0x08021e90 in __WFI () at repos/apache-mynewt-core/hw/cmsis-core/src/ext/core_cmInstr.h:342
- 342 __ASM volatile ("wfi");
- (gdb) mon stm32f2x mass_erase 0
- stm32x mass erase complete
- stm32x mass erase complete
- (gdb)
-
-.. |stm32f4-discovery| image:: pics/stm32f4_disc.jpg
-
diff --git a/docs/os/tutorials/blinky/blinky_windows.rst b/docs/os/tutorials/blinky/blinky_windows.rst
deleted file mode 100644
index d5f77bc43..000000000
--- a/docs/os/tutorials/blinky/blinky_windows.rst
+++ /dev/null
@@ -1,362 +0,0 @@
-Project Blinky on a Windows Machine
------------------------------------
-
-Getting your Windows machine ready for simulated target
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``newt`` tool is the build software used to build Mynewt OS images
-or executables for any embedded hardware device/board, including the one
-for the current tutorial (STM32-E407 development board from Olimex). You
-can run the ``newt`` tool natively on a computer running any of the
-three Operating System machines - OSX, Linux, or Windows.
-
-However, Mynewt OS images for a simulated target are built on the
-Windows machine by using Linux versions of the build software (newt)in a
-virtual machine on your Windows box. The Linux VM is set up by
-installing the Docker Toolbox. Your Windows machine will communicate
-with the Linux VM via transient ssh connections. You will then download
-a Docker image (``newtvm.exe``)that allows you to run the newt commands
-in the Linux Docker instance. The Docker image contains:
-
-- The newt command-line tool
-- Go
-- A multilib-capable native gcc / glibc
-- An arm-none-eabi gcc
-- Native gdb
-
-The sequence of events when using the Docker image is as follows:
-
-1. A new docker environment is created in the Linux VM.
-2. The specified command with the newtvm prefix (``newtvm newt``
- command) is sent to the docker environment via ssh.
-3. The Linux command runs.
-4. The output from the command is sent back to Windows via ssh.
-5. The output is displayed in the Windows command prompt.
-
-Install Linux virtual machine
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-- Download the Docker Toolbox for Windows (version 1.9.0c or later)
- from https://www.docker.com/docker-toolbox. The Docker toolbox
- creates a consistently reproducible and self-contained environment in
- Linux.
-
-- Run the Docker Toolbox installer. All the default settings are OK.
-
-- You may need to add
- "C::raw-latex:`\Program `Files:raw-latex:`\Git`:raw-latex:`\usr`:raw-latex:`\bin`"
- to your PATH environment variable. To add to the PATH environment
- variable, right-click on the Start button in the bottom left corner.
- Choose System -> Advanced system settings -> Environment Variables.
- Click on the PATH variable under "System variables" and click Edit to
- check and add it if it is not already there.
-
-Install newtvm tool
-^^^^^^^^^^^^^^^^^^^
-
-- From your base user (home) directory, pull or clone the latest code
- from the newt repository into the ``newt`` directory. It includes the
- executable ``newtvm.exe`` for the newtvm tool in the ``newtvm``
- directory.
-
- .. code:: c
-
- C:\Users\admin> git clone https://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt newt
-
- The newtvm tool is what allows you to run programs in the Linux
- docker instance.
-
-- Run the Docker Quickstart Terminal application inside the Docker
- folder under Programs. You can find it by clicking Start button ->
- All apps. By default, the Docker Toolbox installer creates a shortcut
- to this program on your desktop. Wait until you see an ASCII art
- whale displayed in the terminal window and the Docker prompt given.
-
-.. code:: c
-
- ## .
- ## ## ## ==
- ## ## ## ## ## ===
- /"""""""""""""""""\___/ ===
- ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
- \______ o __/
- \ \ __/
- \____\_______/
-
- docker is configured to use the default machine with IP 192.168.99.100
- For help getting started, check out the docs at https://docs.docker.com
-
- admin@dev1 MINGW64 ~ (master)
- $
-
-The first time you run this, it may take several minutes to complete.
-You will need to run the Docker Quickstart Terminal once each time you
-restart your computer.
-
-- Open a command prompt (e.g., Windows-R, "cmd", enter). You execute
- the newt tool commands as though you were running newt in Linux, but
- you prefix each command with "newtvm". For example:
-
- .. code:: c
-
- C:\Users\admin\newt\newtvm> newtvm newt help
-
-The newtvm tool will take a long time to run the first time you execute
-it. The delay is due to the fact that the tool must download the mynewt
-docker instance.
-
-- You are now ready to proceed to `building the image for the simulated
- target <#building-test-code-on-simulator>`__.
-
-Getting your Windows machine ready for hardware target
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-When you want to produce images for actual hardware board on your
-Windows machine, go through the following setup procedure and then
-proceed to the `blinky project on the Olimex
-board <#Using-SRAM-to-make-LED-blink>`__ with this method.
-
-Installing some prerequisites
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-- You have to install the following if you do not have them already.
- The steps below indicate specific folders where each of these
- programs should be installed. You can choose different locations, but
- the remainder of this tutorial for a Windows machine assumes the
- specified folders.
-
- - win-builds-i686
- - win-builds-x86\_64
- - MSYS
- - gcc for ARM
- - openocd
- - zadig
- - git
- - go
-
- - *win-builds (mingw64) 1.5 for i686*
-
- Download from
- http://win-builds.org/doku.php/download_and_installation_from_windows.
- Install at: "C::raw-latex:`\win`-builds-i686".
-
- Be sure to click the i686 option (not x86\_64). The defaults for
- all other options are OK. The installer will want to download a
- bunch of additional packages. They are not all necessary, but it
- is simplest to just accept the defaults.
-
- - *win-builds (mingw64) 1.5 for x86\_64*
-
- Download from
- http://win-builds.org/doku.php/download_and_installation_from_windows.
- Install at "C::raw-latex:`\win`-builds-x86\_64"
-
- Run the installer a second time, but this time click the x86\_64
- option, NOT i686. The defaults for all other options are OK.
-
- - *MSYS*
-
- Start your download from
- http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip
-
- Unzip to "C::raw-latex:`\msys`"
-
- - *gcc for ARM, 4.9.3*
-
- Download the Windows installer from
- https://launchpad.net/gcc-arm-embedded/+download and install at
- "C::raw-latex:`\Program `Files (x86):raw-latex:`\GNU `Tools ARM
- Embedded:raw-latex:`\4`.9 2015q3".
-
- - OpenOCD 0.8.0
-
- Download OpenOCD 0.8.0 from
- http://www.freddiechopin.info/en/download/category/4-openocd.
- Unzip to "C::raw-latex:`\openocd`".
-
- - Zadig 2.1.2
-
- Download it from http://zadig.akeo.ie and install it at
- "C::raw-latex:`\zadig`".
-
- - Git
-
- Click on https://git-scm.com/download/win to start the download.
- Install at "C::raw-latex:`\Program `Files (x86):raw-latex:`\Git`".
- Specify the "Use Git from the Windows Command Prompt" option. The
- defaults for all other options are OK.
-
- - Go
-
- Download the release for Microsoft Windows from
- https://golang.org/dl/ and install it "C::raw-latex:`\Go`".
-
-Creating local repository
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-- The directory structure must be first readied for using Go. Go code
- must be kept inside a workspace. A workspace is a directory hierarchy
- with three directories at its root:
-
- - src contains Go source files organized into packages (one package
- per directory),
-
- - pkg contains package objects, and
-
- - bin contains executable commands.
-
- The GOPATH environment variable specifies the location of your
- workspace. First create a 'dev' directory and then a 'go' directory
- under it. Set the GOPATH environment variable to this directory and
- then proceed to create the directory for cloning the newt tool
- repository.
-
- .. code:: c
-
- $ cd c:\
- $ mkdir dev\go
- $ cd dev\go
-
-- Set the following user environment variables using the steps outlined
- here.
-
- .. code:: c
-
- * GOPATH: C:\dev\go
- * PATH: C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin;%GOPATH%\bin;C:\win-builds-x86_64\bin;C:\win-builds-i686\bin;C:\msys\bin
-
- Steps:
-
-1. Right-click the start button
-2. Click "Control panel"
-3. Click "System and Security"
-4. Click "System"
-5. Click "Advanced system settings" in the left panel
-6. Click the "Envoronment Variables..." button
-7. There will be two sets of environment variables: user variables in
- the upper half of the screen, and system variables in the lower half.
- Configuring the user variables is recommended and tested (though
- system variables will work as well).
-
-- Next, install godep. Note that the following command produces no
- output.
-
- .. code:: c
-
- $ go get github.com/tools/godep
-
-- Set up the repository for the package building tool "newt" on your
- local machine. First create the appropriate directory for it and then
- clone the newt tool repository from the online apache repository (or
- its github.com mirror) into this newly created directory. Check the
- contents of the directory.
-
- .. code:: c
-
- $ go get git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/newt
- $ dir
- bin pkg src
- $ dir src
- git-wip-us.apache.org github.com gopkg.in
- $ dir
- newt
- $ cd newt
- $ dir
- Godeps README.md coding_style.txt newt.go
- LICENSE cli design.txt
-
-- Check that newt is in place.
-
- .. code:: c
-
- $ dir $GOPATH\src\git-wip-us.apache.org\repos\asf\incubator-mynewt-newt.git\newt
- Godeps README.md coding_style.txt newt.go
- LICENSE cli design.txt
-
-Building the newt tool
-^^^^^^^^^^^^^^^^^^^^^^
-
-- You will use Go to run the newt.go program to build the newt tool.
- The command used is ``go install`` which compiles and writes the
- resulting executable to an output file named ``newt``. It installs
- the results along with its dependencies in $GOPATH/bin.
-
- .. code:: c
-
- $ go install
- $ ls "$GOPATH"/bin/
- godep incubator-mynewt-newt.git newt
-
-- Try running newt using the compiled binary. For example, check for
- the version number by typing 'newt version'. See all the possible
- commands available to a user of newt by typing 'newt -h'.
-
-Note: If you are going to be be modifying the newt tool itself often and
-wish to compile the program every time you call it, you may want to
-define the newt environment variable that allows you to execute the
-command via ``%newt%``. Use
-``set newt=go run %GOPATH%\src\github.com\mynewt\newt\newt.go`` or set
-it from the GUI. Here, you use ``go run`` which runs the compiled binary
-directly without producing an executable.
-
-.. code:: c
-
- $ newt version
- Newt version: 1.0
- $ newt -h
- Newt allows you to create your own embedded project based on the Mynewt
- operating system. Newt provides both build and package management in a
- single tool, which allows you to compose an embedded workspace, and set
- of projects, and then build the necessary artifacts from those projects.
- For more information on the Mynewt operating system, please visit
- https://www.github.com/mynewt/documentation.
-
- Please use the newt help command, and specify the name of the command
- you want help for, for help on how to use a specific command
-
- Usage:
- newt [flags]
- newt [command]
-
- Examples:
- newt
- newt help [<command-name>]
- For help on <command-name>. If not specified, print this message.
-
-
- Available Commands:
- version Display the Newt version number.
- target Set and view target information
- egg Commands to list and inspect eggs on a nest
- nest Commands to manage nests & clutches (remote egg repositories)
- help Help about any command
-
- Flags:
- -h, --help=false: help for newt
- -l, --loglevel="WARN": Log level, defaults to WARN.
- -q, --quiet=false: Be quiet; only display error output.
- -s, --silent=false: Be silent; don't output anything.
- -v, --verbose=false: Enable verbose output when executing commands.
-
-
- Use "newt help [command]" for more information about a command.
-
-- Without creating a project repository you can't do a whole lot with
- the Newt tool. So you'll have to wait till you have downloaded a nest
- to try out the tool.
-
-Getting the debugger ready
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-- Use Zadig to configure the USB driver for your Olimex debugger. If
- your debugger is already set up, you can skip this step.
-
-1. Plug in your Olimex debugger.
-2. Start Zadig.
-3. Check the Options -> List All Devices checkbox.
-4. Select "Olimex OpenOCD JTAG ARM-USB-TINY-H" in the dropdown menu.
-5. Select the "WinUSB" driver.
-6. Click the "Install Driver" button.
-
-- Proceed to the section on how to `make an LED
- blink <#using-sram-to-make-led-blink>`__ section.
diff --git a/docs/os/tutorials/blinky/nRF52.rst b/docs/os/tutorials/blinky/nRF52.rst
deleted file mode 100644
index 7d3a87933..000000000
--- a/docs/os/tutorials/blinky/nRF52.rst
+++ /dev/null
@@ -1,219 +0,0 @@
-Blinky, your "Hello World!", on a nRF52 Development Kit
--------------------------------------------------------
-
-This tutorial shows you how to create, build, and run the Blinky
-application on a nRF52 Development Kit.
-
-Note that there are several versions of the nRF52 Development Kit in the
-market. The boards tested with this tutorial are listed under
-"Prerequisites".
-
-Prerequisites
-~~~~~~~~~~~~~
-
-- Meet the prerequisites listed in `Project
- Blinky </os/tutorials/blinky.html>`__.
-- Have a nRF52 Development Kit (one of the following)
-
- - Nordic nRF52-DK Development Kit - PCA 10040
- - Rigado BMD-300 Evaluation Kit - BMD-300-EVAL-ES
-
-- Install the `Segger JLINK Software and documentation
- pack <https://www.segger.com/jlink-software.html>`__.
-
-This tutorial uses the Nordic nRF52-DK board.
-
-Create a Project
-~~~~~~~~~~~~~~~~
-
-Create a new project if you do not have an existing one. You can skip
-this step and proceed to `create the targets <#create_targets>`__ if you
-already have a project created.
-
-Run the following commands to create a new project:
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
- $ cd myproj
- $ newt install
- apache-mynewt-core
- $
-
-Create the Targets
-~~~~~~~~~~~~~~~~~~
-
-Create two targets for the nRF52-DK board - one for the bootloader and
-one for the Blinky application.
-
-Run the following ``newt target`` commands, from your project directory,
-to create a bootloader target. We name the target ``nrf52_boot``:
-
-Note: This tutorial uses the Nordic nRF52-DK board. You must specify
-the correct bsp for the board you are using.
-
-- For the Nordic Preview Dev Kit choose
- @apache-mynewt-core/hw/bsp/nrf52pdk (as shown below)
-- For the Nordic Dev Kit choose @apache-mynewt-core/hw/bsp/nrf52dk
- instead (in the highlighted lines)
-- For the Rigado Eval Kit choose @apache-mynewt-core/hw/bsp/bmd300eval
- instead (in the highlighted lines)
-
-.. code:: hl_lines="3"
-
- $ newt target create nrf52_boot
- $ newt target set nrf52_boot app=@apache-mynewt-core/apps/boot
- $ newt target set nrf52_boot bsp=@apache-mynewt-core/hw/bsp/nrf52pdk
- $ newt target set nrf52_boot build_profile=optimized
-
-Run the following ``newt target`` commands to create a target for the
-Blinky application. We name the target ``nrf52_blinky``.
-
-.. code:: hl_lines="3"
-
- $ newt target create nrf52_blinky
- $ newt target set nrf52_blinky app=apps/blinky
- $ newt target set nrf52_blinky bsp=@apache-mynewt-core/hw/bsp/nrf52dk
- $ newt target set nrf52_blinky build_profile=debug
-
-You can run the ``newt target show`` command to verify the target
-settings:
-
-.. code-block:: console
-
- $ newt target show
- targets/nrf52_blinky
- app=apps/blinky
- bsp=@apache-mynewt-core/hw/bsp/nrf52pdk
- build_profile=debug
- targets/nrf52_boot
- app=@apache-mynewt-core/apps/boot
- bsp=@apache-mynewt-core/hw/bsp/nrf52pdk
- build_profile=optimized
-
-Build the Target Executables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build nrf52_boot`` command to build the bootloader:
-
-.. code-block:: console
-
- $ newt build nrf52_boot
- Building target targets/nrf52_boot
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_rsa.c
- Compiling repos/apache-mynewt-core/crypto/mbedtls/src/aes.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/loader.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_validate.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
- Compiling repos/apache-mynewt-core/apps/boot/src/boot.c
- ...
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/nrf52_boot/app/apps/boot/boot.elf
- Target successfully built: targets/nrf52_boot
-
-Run the ``newt build nrf52_blinky`` command to build the Blinky
-application:
-
-.. code-block:: console
-
- $ newt build nrf52_blinky
- Building target targets/nrf52_blinky
- Assembling repos/apache-mynewt-core/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52_split.s
- Compiling repos/apache-mynewt-core/hw/bsp/nrf52dk/src/sbrk.c
- Compiling repos/apache-mynewt-core/hw/cmsis-core/src/cmsis_nvic.c
- Compiling repos/apache-mynewt-core/hw/drivers/uart/uart_hal/src/uart_hal.c
- Assembling repos/apache-mynewt-core/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52.s
- Compiling apps/blinky/src/main.c
-
- ...
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/nrf52_blinky/app/apps/blinky/blinky.elf
- Target successfully built: targets/nrf52_blinky
-
-Sign and Create the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt create-image nrf52_blinky 1.0.0`` command to create and
-sign the application image. You may assign an arbitrary version (e.g.
-1.0.0) to the image.
-
-.. code-block:: console
-
- $ newt create-image nrf52_blinky 1.0.0
- App image succesfully generated: ~/dev/myproj/bin/targets/nrf52_blinky/app/apps/blinky/blinky.img
-
-Connect to the Board
-~~~~~~~~~~~~~~~~~~~~
-
-- Connect a micro-USB cable from your computer to the micro-USB port on
- the nRF52-DK board.
-- Turn the power on the board to ON. You should see the green LED light
- up on the board.
-
-Load the Bootloader and the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt load nrf52_boot`` command to load the bootloader onto the
-board:
-
-.. code-block:: console
-
- $ newt load nrf52_boot
- Loading bootloader
- $
-
-Run the ``newt load nrf52_blinky`` command to load the Blinky
-application image onto the board.
-
-.. code-block:: console
-
- $ newt load nrf52_blinky
- Loading app image into slot 1
-
-You should see the LED1 on the board blink!
-
-Note: If the LED does not blink, try resetting your board.
-
-If you want to erase the flash and load the image again, you can run
-``JLinkExe`` to issue an ``erase`` command.
-
-**Note:** On Windows: Run the ``jlink`` command with the same arguments
-from a Windows Command Prompt terminal.
-
-.. code-block:: console
-
- $ JLinkExe -device nRF52 -speed 4000 -if SWD
- SEGGER J-Link Commander V5.12c (Compiled Apr 21 2016 16:05:51)
- DLL version V5.12c, compiled Apr 21 2016 16:05:45
-
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
- Hardware version: V1.00
- S/N: 682863966
- VTref = 3.300V
-
-
- Type "connect" to establish a target connection, '?' for help
- J-Link>erase
- Cortex-M4 identified.
- Erasing device (0;?i?)...
- Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Total time needed: 0.363s (Prepare: 0.093s, Compare: 0.000s, Erase: 0.262s, Program: 0.000s, Verify: 0.000s, Restore: 0.008s)
- Erasing done.
- J-Link>exit
- $
diff --git a/docs/os/tutorials/blinky/olimex.rst b/docs/os/tutorials/blinky/olimex.rst
deleted file mode 100644
index 0b981860c..000000000
--- a/docs/os/tutorials/blinky/olimex.rst
+++ /dev/null
@@ -1,268 +0,0 @@
-Blinky, your "Hello World!", on Olimex
---------------------------------------
-
-This tutorial shows you how to create, build, and run the Blinky
-application on an Olimex STM32-E407 board. ### Prerequisites
-
-- Meet the prerequisites listed in `Project
- Blinky </os/tutorials/blinky.html>`__.
-- Have a STM32-E407 development board from Olimex.
-- Have a ARM-USB-TINY-H connector with JTAG interface for debugging ARM
- microcontrollers (comes with the ribbon cable to hook up to the
- board)
-- Have a USB A-B type cable to connect the debugger to your computer.
-- Install the `OpenOCD debugger </os/get_started/cross_tools/>`__.
-
-Create a Project
-~~~~~~~~~~~~~~~
-
-Create a new project if you do not have an existing one. You can skip this step and proceed to `create the
-targets <#create_targets>`__ if you already created a project.
-
-Run the following commands to create a new project:
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
-
- $cd myproj
-
- $ newt install
- apache-mynewt-core
- $
-
-Create the Targets
-~~~~~~~~~~~~~~~~~~
-
-Create two targets for the Olimex board - one for the bootloader and one
-for the Blinky application.
-
-Run the following ``newt target`` commands, from your project directory,
-to create a bootloader target. We name the target ``boot_olimex``.
-
-.. code-block:: console
-
- $ newt target create boot_olimex
- $ newt target set boot_olimex build_profile=optimized
- $ newt target set boot_olimex app=@apache-mynewt-core/apps/boot
- $ newt target set boot_olimex bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard
-
-Run the following ``newt target`` commands to create a target for the
-Blinky application. We name the target ``olimex_blinky``.
-
-.. code-block:: console
-
- $ newt target create olimex_blinky
- $ newt target set olimex_blinky build_profile=debug
- $ newt target set olimex_blinky bsp=@apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard
- $ newt target set olimex_blinky app=apps/blinky
-
-Build the Bootloader
-~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build boot_olimex`` command to build the bootloader:
-
-.. code-block:: console
-
- $ newt build boot_olimex
- Building target targets/boot_olimex
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_rsa.c
- Compiling bin/targets/boot_olimex/generated/src/boot_olimex-sysflash.c
-
- ...
-
- Archiving libc_baselibc.a
- Archiving sys_flash_map.a
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/boot_olimex/app/apps/boot/boot.elf
- Target successfully built: targets/boot_olimex
-
-Build the Blinky Application
-~~~~~~~~~~~~~~~
-
-Run the ``newt build olimex_blinky`` command to build the blinky application:
-
-.. code-block:: console
-
- $ newt build olimex_blinky
- Building target targets/olimex_blinky
- Assembling repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard/src/arch/cortex_m4/startup_STM32F40x.s
- Compiling repos/apache-mynewt-core/hw/drivers/uart/src/uart.c
- Compiling repos/apache-mynewt-core/hw/cmsis-core/src/cmsis_nvic.c
- Compiling repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard/src/sbrk.c
- Compiling apps/blinky/src/main.c
- Compiling repos/apache-mynewt-core/hw/drivers/uart/uart_hal/src/uart_hal.c
- Compiling repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c
- Compiling repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard/src/system_stm32f4xx.c
- Compiling repos/apache-mynewt-core/hw/hal/src/hal_common.c
- Compiling repos/apache-mynewt-core/hw/hal/src/hal_flash.c
-
- ...
-
- Archiving sys_mfg.a
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/olimex_blinky/app/apps/blinky/blinky.elf
- Target successfully built: targets/olimex_blinky
-
-Sign and Create the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt create-image olimex_blinky 1.0.0`` command to sign and
-create an image file for the blinky application. You may assign an
-arbitrary version (e.g. 1.0.0) number.
-
-.. code-block:: console
-
- $ newt create-image olimex_blinky 1.0.0
- App image succesfully generated: ~/dev/myproj/bin/targets/olimex_blinky/app/apps/blinky/blinky.img
-
-Connect to the Board
-~~~~~~~~~~~~~~~~~~~~
-
-Configure the board to bootload from flash memory and to use USB-OTG2
-for the power source. Refer to the following diagrams to locate the boot
-jumpers and power input select jumpers on the board.
-
-**Note:** The labels for the **USB-OTG1** and **USB-OTG2** ports on the
-diagram are reversed. The port labeled USB-OTG1 on the diagram is the
-USB-OTG2 port and the port labeled USB-OTG2 on the diagram is the
-USB-OTG1 port.
-
-.. raw:: html
-
- <p align="center">
-
-.. raw:: html
-
- </p>
-
-- Locate the boot jumpers on the lower right corner of the board.
- **B1\_1/B1\_0** and **B0\_1/B0\_0** are PTH jumpers to control the
- boot mode when a bootloader is present. These two jumpers must be
- moved together. The board searches for the bootloader in three
- places: User Flash Memory, System Memory or the Embedded SRAM. For
- this Blinky project, we configure the board to boot from flash by
- jumpering **B0\_0** and **B1\_0**. **Note:** The markings on the
- board may not always be accurate, and you should always refer to the
- manual for the correct positioning.
-
-- Locate the **Power Input Select** jumpers on the lower left corner of
- the board. Set the Power Select jumpers to position 5 and 6 to use
- the USB-OTG2 port for the power source. If you would like to use a
- different power source, refer to the `OLIMEX STM32-E407 user
- manual <https://www.olimex.com/Products/ARM/ST/STM32-E407/resources/STM32-E407.pdf>`__
- for pin specifications.
-
-- Connect the USB Micro-A cable to the USB-OTG2 port on the board.
-
-- Connect the JTAG connector to the JTAG/SWD interface on the board.
-
-- Connect the USB A-B cable to the ARM-USB-TINY-H connector and your
- computer.
-
-- Check that the red PWR LED lights up. ### Load the Bootloader and
- Blinky Application
-
-Run the ``newt load boot_olimex`` command to load the bootloader image
-onto the board:
-
-.. code-block:: console
-
- $newt load -v boot_olimex
- Loading bootloader
- Load command: ~/dev/myproj/repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh ~/dev/myproj/repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard ~/dev/myproj/bin/targets/boot_olimex/app/apps/boot/boot
- Successfully loaded image.
-
-Note: If you are using Windows and get a ``no device found`` error, you
-will need to install the usb driver. Download
-`Zadig <http://zadig.akeo.ie>`__ and run it:
-
-- Select Options > List All Devices.
-- Select ``Olimex OpenOCD JTAG ARM-USB-TINY-H`` from the drop down
- menu.
-- Select the ``WinUSB`` driver.
-- Click Install Driver.
-- Run the ``newt load boot_olimex`` command again.
-
-Run the ``newt load olimex_blinky`` command to load the blinky
-application image onto the board:
-
-.. code-block:: console
-
- newt load -v olimex_blinky
- Loading app image into slot 1
- Load command: ~/dev/myproj/repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh ~/dev/myproj/repos/apache-mynewt-core/hw/bsp/olimex_stm32-e407_devboard ~/dev/myproj/bin/targets/olimex_blinky/app/apps/blinky/blinky
- Successfully loaded image.
-
-The LED should be blinking!
-
-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!
-
-If you want to download the image to flash and open a gdb session, use
-``newt debug blinky``.
-
-**Note:** The output of the debug session below is for Mac OS and Linux
-platforms. On Windows, openocd and gdb are started in separate Windows
-Command Prompt terminals, and the terminals are automatically closed
-when you quit gdb. In addition, the output of openocd is logged to the
-openocd.log file in your project's base directory instead of the
-terminal.
-
-Type ``c`` to continue inside the gdb session.
-
-.. code-block:: console
-
- $ newt debug blinky
- Debugging with ~/dev/myproj/hw/bsp/olimex_stm32-e407_...
- Debugging ~/dev/myproj/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 <http://gnu.org/licenses/gpl.html>
- ...
- (info)
- ...
- target state: halted
- target halted due to debug-request, current mode: Thread
- xPSR: 0x01000000 pc: 0x08000250 msp: 0x10010000
- Info : accepting 'gdb' connection from 3333
- Info : device id = 0x10036413
- Info : flash size = 1024kbytes
- Reset_Handler () at startup_STM32F40x.s:199
- 199 ldr r1, =__etext
- (gdb)
-
-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.
-
-.. code-block:: console
-
- (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
diff --git a/docs/os/tutorials/blinky/rbnano2.rst b/docs/os/tutorials/blinky/rbnano2.rst
deleted file mode 100644
index c777bdef7..000000000
--- a/docs/os/tutorials/blinky/rbnano2.rst
+++ /dev/null
@@ -1,213 +0,0 @@
-Blinky, your "Hello World!", on RedBear Nano 2
-----------------------------------------------
-
-This tutorial shows you how to create, build and run the Blinky
-application on a RedBear Nano 2 board.
-
-Prerequisites
-~~~~~~~~~~~~~
-
-- Meet the prerequisites listed in `Project
- Blinky </os/tutorials/blinky.html>`__.
-- Have a RedBear Nano 2 board.
-- Install a patched version of OpenOCD 0.10.0 described in `Install
- OpenOCD </os/get_started/cross_tools/>`__.
-
-Create a Project
-~~~~~~~~~~~~~~~~
-
-Create a new project if you do not have an existing one. You can skip
-this step and proceed to `create the targets <#create_targets>`__ if you
-already have a project created.
-
-Run the following commands to create a new project:
-
-.. code-block:: console
-
- $ mkdir ~/dev
- $ cd ~/dev
- $ newt new myproj
- Downloading project skeleton from apache/mynewt-blinky...
- Installing skeleton in myproj...
- Project myproj successfully created.
- $ cd myproj
- $ newt install
- apache-mynewt-core
- $
-
-Create the Targets
-~~~~~~~~~~~~~~~~~~
-
-Create two targets for the RedBear Nano 2 board - one for the bootloader
-and one for the Blinky application.
-
-Run the following ``newt target`` commands, from your project directory,
-to create a bootloader target. We name the target ``rbnano2_boot``:
-
-.. code-block:: console
-
- $ newt target create rbnano2_boot
- $ newt target set rbnano2_boot app=@apache-mynewt-core/apps/boot
- $ newt target set rbnano2_boot bsp=@apache-mynewt-core/hw/bsp/rb-nano2
- $ newt target set rbnano2_boot build_profile=optimized
-
-Run the following ``newt target`` commands to create a target for the
-Blinky application. We name the target ``nrf52_blinky``.
-
-.. code-block:: console
-
- $ newt target create rbnano2_blinky
- $ newt target set rbnano2_blinky app=apps/blinky
- $ newt target set rbnano2_blinky bsp=@apache-mynewt-core/hw/bsp/rb-nano2
- $ newt target set rbnano2_blinky build_profile=debug
-
-You can run the ``newt target show`` command to verify the target
-settings:
-
-.. code-block:: console
-
- $ newt target show
- targets/rbnano2_blinky
- app=apps/blinky
- bsp=@apache-mynewt-core/hw/bsp/rb-nano2
- build_profile=debug
- targets/rbnano2_boot
- app=@apache-mynewt-core/apps/boot
- bsp=@apache-mynewt-core/hw/bsp/rb-nano2
- build_profile=optimized
-
-Build the Target Executables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt build rbnano2_boot`` command to build the bootloader:
-
-.. code-block:: console
-
- $newt build rbnano2_boot
- Building target targets/rbnano2_boot
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_rsa.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec256.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/loader.c
- Compiling repos/apache-mynewt-core/crypto/mbedtls/src/aes.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_validate.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/image_ec.c
- Compiling repos/apache-mynewt-core/boot/bootutil/src/bootutil_misc.c
- Compiling repos/apache-mynewt-core/apps/boot/src/boot.c
-
- ...
-
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/rbnano2_boot/app/apps/boot/boot.elf
- Target successfully built: targets/rbnano2_boot
-
-Run the ``newt build rbnano2_blinky`` command to build the Blinky
-application:
-
-.. code-block:: console
-
- $newt build rbnano2_blinky
- Building target targets/rbnano2_blinky
- Assembling repos/apache-mynewt-core/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52_split.s
- Compiling repos/apache-mynewt-core/hw/drivers/uart/src/uart.c
- Compiling repos/apache-mynewt-core/hw/cmsis-core/src/cmsis_nvic.c
- Compiling repos/apache-mynewt-core/hw/bsp/rb-nano2/src/sbrk.c
- Compiling apps/blinky/src/main.c
-
- ...
-
- Archiving sys_sysinit.a
- Archiving util_mem.a
- Linking ~/dev/myproj/bin/targets/rbnano2_blinky/app/apps/blinky/blinky.elf
- Target successfully built: targets/rbnano2_blinky
-
-Sign and Create the Blinky Application Image
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt create-image rbnano2_blinky 1.0.0`` command to create and
-sign the application image. You may assign an arbitrary version (e.g.
-1.0.0) to the image.
-
-.. code-block:: console
-
- $newt create-image rbnano2_blinky 1.0.0
- App image succesfully generated: ~/dev/myproj/bin/targets/rbnano2_blinky/app/apps/blinky/blinky.img
-
-Connect to the Board
-~~~~~~~~~~~~~~~~~~~~
-
-Connect the RedBear Nano 2 USB to a USB port on your computer. You
-should see an orange LED light up on the board.
-
-Load the Bootloader
-~~~~~~~~~~~~~~~~~~~
-
-Run the ``newt load rbnano2_boot`` command to load the bootloader onto
-the board:
-
-.. code-block:: console
-
- $ newt load rbnano2_boot
- Loading bootloader
- $
-
-**Note:** On Windows platforms, if you get an
-``unable to find CMSIS-DAP device`` error, you will need to download and
-install the mbed Windows serial port driver from
-https://developer.mbed.org/handbook/Windows-serial-configuration. Follow
-the instructions from the site to install the driver. Here are some
-additional notes about the installation:
-
-1. The instructions indicate that the mbed Windows serial port driver is
- not required for Windows 10. If you are using Windows 10 and get the
- ``unable to find CMSIS-DAP device`` error, we recommend that you
- install the driver.
-2. If the driver installation fails, we recommend that you unplug the
- board, plug it back in, and retry the installation.
-
-Run the ``newt load rbnano2_boot`` command again.
-
-Clear the Write Protection on the Flash Memory The flash memory on
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-the RedBear Nano 2 comes write protected from the factory. If you get an
-error loading the bootloader and you are using a brand new chip, you
-need to clear the write protection from the debugger and then load the
-bootloader again. Run the ``newt debug rbnano2_blinky`` command and
-issue the following commands at the highlighted (gdb) prompts.
-
-**Note:** The output of the debug session below is for Mac OS and Linux
-platforms. On Windows, openocd and gdb are started in separate Windows
-Command Prompt terminals, and the terminals are automatically closed
-when you quit gdb. In addition, the output of openocd is logged to the
-openocd.log file in your project's base directory instead of the
-terminal.
-
-\`\`\`hl\_lines="8 9 11 14" $newt debug rbnano2\_blinky
-[~/dev/myproj/repos/apache-mynewt-core/hw/bsp/rb-nano2/rb-nano2\_debug.sh
-~/dev/myproj/repos/apache-mynewt-core/hw/bsp/rb-nano2
-~/dev/myproj/bin/targets/rbnano2\_blinky/app/apps/blinky/blinky] Open
-On-Chip Debugger 0.10.0-dev-snapshot (2017-03-28-11:24) Licensed under
-GNU GPL v2
-
-::
-
- ...
-
-(gdb) set {unsigned long}0x4001e504=2 (gdb) x/1wx 0x4001e504
-0x4001e504:0x00000002 (gdb) set {unsigned long}0x4001e50c=1 Info : SWD
-DPIDR 0x2ba01477 Error: Failed to read memory at 0x00009ef4 (gdb) x/32wx
-0x00 0x0:0xffffffff0xffffffff0xffffffff0xffffffff
-0x10:0xffffffff0xffffffff0xffffffff0xffffffff
-0x20:0xffffffff0xffffffff0xffffffff0xffffffff
-0x30:0xffffffff0xffffffff0xffffffff0xffffffff
-0x40:0xffffffff0xffffffff0xffffffff0xffffffff
-0x50:0xffffffff0xffffffff0xffffffff0xffffffff
-0x60:0xffffffff0xffffffff0xffffffff0xffffffff
-0x70:0xffffffff0xffffffff0xffffffff0xffffffff (gdb)
-``<br> ### Load the Blinky Application Image <br> Run the `newt load rbnano2_blinky` command to load the Blinky application image onto the board:``\ no-highlight
-$ newt load rbnano2\_blinky Loading app image into slot 1 \`\`\`
-
-You should see a blue LED on the board blink!
-
-Note: If the LED does not blink, try resetting your board.
diff --git a/docs/os/tutorials/tutorials.rst b/docs/os/tutorials/tutorials.rst
deleted file mode 100644
index 1ab08fb98..000000000
--- a/docs/os/tutorials/tutorials.rst
+++ /dev/null
@@ -1,99 +0,0 @@
-Tutorials
-==========
-
-.. toctree::
- :hidden:
-
- Project Blinky <blinky/blinky>
- Working with repositories <repo/add_repos>
- Project Slinky for Remote Comms <slinky/project-slinky>
- Bluetooth Low Energy <ble/ble_bare_bones>
-
-If the introduction to Mynewt has piqued your interest and you want to
-familiarize yourself with some of its functionality, this series of
-tutorials is for you. The lessons are aimed at the beginner.
-
-The full list of tutorials can be seen in the navigation bar on the
-left. New ones are being constantly added and will show up there
-automatically.
-
-Prerequisites:
-~~~~~~~~~~~~~~
-
-- You have installed Docker container of Newt tool and toolchains or
- you have installed them natively on your machine
-- You have created a new project space (directory structure) and
- populated it with the core code repository (apache-mynewt-core) or
- know how to as explained in `Creating Your First
- Project <../get_started/project_create>`__.
-- You have at least one of the supported development boards:
-
- - `Arduino Zero hardware <arduino_zero.html>`__
- - `Olimex/STM32F407ZGT6 Cortex-M4 hardware <olimex.html>`__
- - `nRF52 Development Kit from Nordic Semiconductor <nRF52.html>`__
-
-The Nordic nrf52 developer kit supports Bluetooth Low Energy. We are
-always looking to add new hardware to the list, so if you want to
-develop the required Board Support Package (bsp) and/or Hardware
-Abstraction Layer (HAL) for a new board, you can look
-`here <../core_os/porting/port_os/>`__ to get started.
-
-Tutorial categories:
-~~~~~~~~~~~~~~~~~~~~
-
-The tutorials fall into a few broad categories. Some examples in each
-category are listed below.
-
-- Making an LED Blink (the "Hello World" equivalent in the electronics
- world)
-
- - `Blinky on Arduino Zero hardware <arduino_zero.html>`__
- - `Blinky on Olimex/STM32F407ZGT6 Cortex-M4 hardware <olimex.html>`__
- - `Blinky on nRF52 Development Kit from Nordic
- Semiconductor <nRF52.html>`__ **Note:** This supports BLE.
- - `Blinky on Redbear Nano2 <rbnano2.html>`__
-
-- Navigating the Code and Adding Functionality
-
- - `Adding More Repositories to Your Project <repo/add_repos.html>`__
- - `Adding a Unit Test For a Package <unit_test.html>`__
-
-- Using Newtmgr
-
- - `Enabling Remote Communication With a Device Running Mynewt
- OS <project-slinky.html>`__
-
-- Bluetooth Low Energy
-
- - `Building a Bare Bones BLE Application <ble_bare_bones.html>`__
- - `Building a BLE iBeacon Application <ibeacon.html>`__
-
-- OS Fundamentals
-
- - `Events and Event Queues <event_queue.html>`__
- - `Task and Priority Management <tasks_lesson.html>`__
-
-- Remote Device Management
-
- - `Enabling Newt Manager in Any App <add_newtmgr.html>`__
- - `Upgrading an Image Over-The-Air <ota_upgrade_nrf52.html>`__
-
-- Sensors
-
- - `Enabling an Off-Board Sensor in an Existing
- Application <sensors/sensor_nrf52_bno055.html>`__
- - `Developing an Application for an Onboard
- Sensor <sensors/sensor_thingy_lis2dh12_onb.html>`__
- - `Enabling OIC Sensor Data
- Monitoring <sensors/sensor_oic_overview.html>`__
-
-- Tooling
-
- - `SEGGER RTT <segger_rtt.html>`__
- - `SEGGER SystemView <segger_sysview.html>`__
-
-**Send us an email on the dev@ mailing list if you have comments or
-suggestions!** If you haven't joined the mailing list, you will find the
-links `here <../../community.html>`__.
-
-
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services