doc: boards: arm: convert make to cmake

Unify documentation formatting and use zephyr-app-commands where
applicable.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This commit is contained in:
Marti Bolivar 2017-11-07 22:44:42 -05:00 committed by Anas Nashif
commit f0c95919b0
46 changed files with 760 additions and 1037 deletions

View file

@ -239,21 +239,6 @@ debian/ubuntu can be quite old, so you might have to build dfu-util from source.
Flashing an Application to 96Boards Carbon Flashing an Application to 96Boards Carbon
------------------------------------------ ------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial:
.. code-block:: console
$<zephyr_root_path>/samples/hello_world
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=96b_carbon
Connect the micro-USB cable to the USB OTG Carbon port and to your computer. Connect the micro-USB cable to the USB OTG Carbon port and to your computer.
The board should power ON. Force the board into DFU mode by keeping the BOOT0 The board should power ON. Force the board into DFU mode by keeping the BOOT0
switch pressed while pressing and releasing the RST switch. switch pressed while pressing and releasing the RST switch.
@ -286,11 +271,13 @@ You should see following confirmation on your Linux host:
usb 1-2.1: Manufacturer: STMicroelectronics usb 1-2.1: Manufacturer: STMicroelectronics
usb 1-2.1: SerialNumber: 3574364C3034 usb 1-2.1: SerialNumber: 3574364C3034
Flash a new application to the board: Then build and flash an application. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ sudo dfu-util -d [0483:df11] -a 0 -D outdir/96b_carbon/zephyr.bin -s 0x08000000 :board: 96b_carbon
:goals: build flash
Connect the micro-USB cable to the USB UART (FTDI) port and to your computer. Connect the micro-USB cable to the USB UART (FTDI) port and to your computer.
Run your favorite terminal program to listen for output. Run your favorite terminal program to listen for output.
@ -324,18 +311,14 @@ in general, see :ref:`build_an_application`.
2. Install the dfu-util flashing app, as described above. 2. Install the dfu-util flashing app, as described above.
3. Build the ``samples/bluetooth/ipsp`` application for 96b_carbon:: 3. Build and flash the ``samples/bluetooth/ipsp`` application for
96b_carbon. See the instructions above for how to put your board
into DFU mode if you haven't done this before:
$ cd <zephyr_root_path> .. zephyr-app-commands::
$ source zephyr-env.sh :zephyr-app: samples/bluetooth/ipsp
$ cd $ZEPHYR_BASE/samples/bluetooth/ipsp/ :board: 96b_carbon
$ make BOARD=96b_carbon :goals: build flash
4. Flash the compiled application using dfu-util. See the instructions
above for how to put your board into DFU mode if you haven't done
this before::
$ make BOARD=96b_carbon flash
5. Refer to the instructions in :ref:`bluetooth-ipsp-sample` for how 5. Refer to the instructions in :ref:`bluetooth-ipsp-sample` for how
to verify functionality. to verify functionality.

View file

@ -129,14 +129,12 @@ Programming and Debugging
Building Building
======== ========
Build the Zephyr kernel and application with: Here is an example for building the :ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: 96b_neonkey
$ source zephyr-env.sh :goals: build flash
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=96b_neonkey
Flashing Flashing
======== ========

View file

@ -267,37 +267,13 @@ and install a more recent version of pyOCD.
Flashing an Application to 96Boards Nitrogen Flashing an Application to 96Boards Nitrogen
============================================ ============================================
This example uses the :ref:`hello_world` sample with the Here is an example for the :ref:`hello_world` application. This
:ref:`nxp_opensda_pyocd` tools. Use the ``make flash`` build target to build requires installing the :ref:`nxp_opensda_pyocd` tools.
your Zephyr application, invoke the pyOCD flash tool and program your Zephyr
application to flash.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: 96b_nitrogen
$ . zephyr-env.sh :goals: build flash
$ cd samples/hello_world/
$ make BOARD=96b_nitrogen
You can either flash the board by using the ``make flash`` target:
.. code-block:: console
$ make flash
or you can invoke the pyocd commands directly, as described below.
Erase the flash memory in the nRF52832:
.. code-block:: console
$ pyocd-flashtool -d debug -t nrf52 -ce
Flash the application using the pyocd-flashtool tool:
.. code-block:: console
$ pyocd-flashtool -d debug -t nrf52 outdir/96b_nitrogen/zephyr.hex
Run your favorite terminal program to listen for output. Run your favorite terminal program to listen for output.
@ -319,23 +295,14 @@ terminal:
Debugging with GDB Debugging with GDB
================== ==================
To debug Zephyr with GDB launch the GDB server on a terminal: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application. This also requires pyOCD.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ pyocd-gdbserver :board: 96b_nitrogen
:maybe-skip-config:
and then launch GDB against the .elf file you built: :goals: debug
.. code-block:: console
$ arm-none-eabi-gdb outdir/96b_nitrogen/zephyr.elf
And finally connect GDB to the GDB Server:
.. code-block:: console
(gdb) target remote localhost:3333
.. _pyOCD: .. _pyOCD:
https://github.com/mbedmicro/pyOCD https://github.com/mbedmicro/pyOCD

View file

@ -169,44 +169,32 @@ To build the bossa tool, follow these steps:
Flashing an Application to Arduino Due Flashing an Application to Arduino Due
-------------------------------------- --------------------------------------
The sample application :ref:`hello_world` will be used in this tutorial, which can Applications for the ``arduino_due`` board configuration can be built
be found in :file:`$ZEPHYR_BASE/samples/hello_world`. and flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
#. To build the Zephyr kernel, enter: Here is an example for the :ref:`hello_world` application. After
building the application, press the Reset button before running the
flash command, so the board will boot into the SAM-BA bootloader and
be prepared to receive the new program.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: arduino_due
:goals: build flash
$ cd $ZEPHYR_BASE After flashing the application, run your favorite terminal program to
$ make -C samples/hello_world BOARD=arduino_due listen for output. For example, under Linux, the terminal should be
:code:`/dev/ttyACM0`. For example:
#. Connect the Arduino Due to your host computer using the programming port. .. code-block:: console
#. Press the Erase button for more than 220 ms. $ minicom -D /dev/ttyACM0 -o
#. Press the Reset button so the board will boot into the SAM-BA bootloader. The -o option tells minicom not to send the modem initialization
string.
#. To flash the kernel onto Arduino Due, assuming the bossa tool already Now press the Reset button and you should see "Hello World!" in your terminal.
exists. Using the command line version of bossa, enter:
.. code-block:: console
$ bossac -p <tty_device> -e -w -v -b outdir/arduino_due/zephyr.bin
Where :code:`<tty_device>` is where the Arduino Due can be found. For
example, under Linux, :code:`<tty_device>` should be :code:`ttyACM0`.
Note that the path :file:`/dev/` is omitted.
#. Run your favorite terminal program to listen for output. For example, under
Linux, the terminal should be :code:`/dev/ttyACM0`. For example:
.. code-block:: console
$ minicom -D /dev/ttyACM0 -o
The -o option tells minicom not to send the modem initialization
string.
#. Press the Reset button and you should see "Hello World!" in your terminal.
.. note:: .. note::
Make sure your terminal program is closed before flashing the binary image, Make sure your terminal program is closed before flashing the binary image,

View file

@ -140,12 +140,13 @@ the CCFG content, see :file:`arch/arm/soc/ti_simplelink/cc2650/soc.c`.
Building Building
======== ========
Building does not require anything more than Zephyr already provides. You can build an application in the usual way. Here is an example for
To build your current configuration and code: the :ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ make BOARD=cc2650_sensortag :board: cc2650_sensortag
:goals: build flash
Flashing Flashing
======== ========
@ -177,8 +178,8 @@ operation, then light up again upon completion.
Debugging Debugging
========= =========
Debugging can be done with OpenOCD 0.10, which is currently not supported Debugging can be done with OpenOCD 0.10, which is supported
by the latest Zephyr SDK version. A basic configuration file for the by the Zephyr SDK since v0.9.2. A basic configuration file for the
SensorTag board would be: SensorTag board would be:
.. code-block:: console .. code-block:: console

View file

@ -173,65 +173,53 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``disco_l475_iot1`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
Disco L475 IoT board includes an ST-LINK/V2-1 embedded debug tool interface. Disco L475 IoT board includes an ST-LINK/V2-1 embedded debug tool
This interface is not supported by the openocd version 0.9 included by the Zephyr SDK v0.9. interface. This interface is supported by the openocd version
Until we update the Zephyr SDK, use openocd v0.10.0 from the openocd-stm32 project on GitHub included in the Zephyr SDK since v0.9.2.
to get the minimum set of scripts needed to flash and debug STM32 development boards.
.. code-block:: console
$ git clone https://github.com/erwango/openocd-stm32.git
Then follow instructions in README.md
Flashing an application to Disco L475 IoT Flashing an application to Disco L475 IoT
----------------------------------------- -----------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Here is an example for the :ref:`hello_world` application.
To build the Zephyr kernel and application, enter: Connect the Disco L475 IoT to your host computer using the USB port, then
run a serial host program to connect with your Nucleo board. For example:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=disco_l475_iot1
Connect the Disco L475 IoT to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ cd <openocd-stm32_path>
$ stm32_flsh l4 $ZEPHYR_BASE/samples/hello_world/outdir/disco_l475_iot1/zephyr.bin
Run a serial host program to connect with your Nucleo board.
.. code-block:: console .. code-block:: console
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Then build and flash the application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: disco_l475_iot1
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
$ Hello World! arm $ Hello World! arm
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <openocd-stm32_path> :board: disco_l475_iot1
$ stm32_dbg l4 $ZEPHYR_BASE/samples/hello_world/outdir/disco_l475_iot1/zephyr.elf :maybe-skip-config:
:goals: debug
.. _Disco L475 IoT1 website: .. _Disco L475 IoT1 website:
http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/b-l475e-iot01a.html http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/b-l475e-iot01a.html

View file

@ -102,9 +102,8 @@ UART0 is connected to the board controller and is used for the console.
Programming and Debugging Programming and Debugging
************************* *************************
.. note:: .. note:
Before useing the kit the first time, you should update the J-Link firmware
Before using the kit the first time, you should update the J-Link firmware
from `J-Link-Downloads`_ from `J-Link-Downloads`_
Flashing Flashing
@ -124,12 +123,10 @@ Flashing an application to EFM32-STK3800
The sample application :ref:`hello_world` is used for this example. The sample application :ref:`hello_world` is used for this example.
Build the Zephyr kernel and application: Build the Zephyr kernel and application:
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: efm32wg_stk3800
$ . zephyr-env.sh :goals: build
$ cd samples/hello_world/
$ make BOARD=efm32wg_stk3800
Connect the EFM32WG-STK3800 to your host computer using the USB port and you Connect the EFM32WG-STK3800 to your host computer using the USB port and you
should see a USB connection which exposes a Mass Storage (STK3800) and a should see a USB connection which exposes a Mass Storage (STK3800) and a

View file

@ -198,29 +198,30 @@ communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the To use the pyOCD tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_pyocd` page using the `DAPLink FRDM-K64F Firmware`_. The :ref:`nxp_opensda_pyocd` page using the `DAPLink FRDM-K64F Firmware`_. The
pyOCD tools are the default for this board, therefore it is not necessary to pyOCD tools are the default for this board, therefore it is not necessary to
set ``OPENSDA_FW=daplink`` explicitly when you invoke ``make flash`` or ``make set ``OPENSDA_FW=daplink`` explicitly when using the default flash and debug
debug``. mechanisms.
With these mechanisms, applications for the ``frdm_k64f`` board
configuration can be built and flashed in the usual way (see
:ref:`build_an_application` and :ref:`application_run` for more
details).
To use the Segger J-Link tools with OpenSDA, follow the instructions in the To use the Segger J-Link tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_. :ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_.
The Segger J-Link tools are not the default for this board, therefore it is The Segger J-Link tools are not the default for this board, therefore it is
necessary to set ``OPENSDA_FW=jlink`` explicitly when you invoke ``make necessary to set ``OPENSDA_FW=jlink`` explicitly in the environment before
debug``. programming and debugging.
Flashing Flashing
======== ========
This example uses the :ref:`hello_world` sample with the This example uses the :ref:`hello_world` sample with the
:ref:`nxp_opensda_pyocd` tools. Use the ``make flash`` build target to build :ref:`nxp_opensda_pyocd` tools.
your Zephyr application, invoke the pyOCD flash tool and program your Zephyr
application to flash.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: frdm_k64f
$ . zephyr-env.sh :goals: flash
$ cd samples/hello_world/
$ make BOARD=frdm_k64f flash
Open a serial terminal (minicom, putty, etc.) with the following settings: Open a serial terminal (minicom, putty, etc.) with the following settings:
@ -239,18 +240,14 @@ the following message:
Debugging Debugging
========= =========
This example uses the :ref:`hello_world` sample with the You can debug an application in the usual way. Here is an example for the
:ref:`nxp_opensda_pyocd` tools. Use the ``make debug`` build target to build :ref:`hello_world` application.
your Zephyr application, invoke the pyOCD GDB server, attach a GDB client, and
program your Zephyr application to flash. It will leave you at a gdb prompt.
.. code-block:: console
$ cd <zephyr_root_path>
$ . zephyr-env.sh
$ cd samples/hello_world/
$ make BOARD=frdm_k64f debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: frdm_k64f
:maybe-skip-config:
:goals: debug
.. _FRDM-K64F Website: .. _FRDM-K64F Website:
http://www.nxp.com/products/software-and-tools/hardware-development-tools/freedom-development-boards/freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F http://www.nxp.com/products/software-and-tools/hardware-development-tools/freedom-development-boards/freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F

View file

@ -126,29 +126,29 @@ communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the To use the pyOCD tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_pyocd` page using the `DAPLink FRDM-KL25Z Firmware`_. The :ref:`nxp_opensda_pyocd` page using the `DAPLink FRDM-KL25Z Firmware`_. The
pyOCD tools are the default for this board, therefore it is not necessary to pyOCD tools are the default for this board, therefore it is not necessary to
set ``OPENSDA_FW=daplink`` explicitly when you invoke ``make flash`` or ``make set ``OPENSDA_FW=daplink`` explicitly when programming and debugging.
debug``.
To use the Segger J-Link tools with OpenSDA, follow the instructions in the With these mechanisms, applications for the ``frdm_kl25z`` board
:ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_. configuration can be built and flashed in the usual way (see
The Segger J-Link tools are not the default for this board, therefore it is :ref:`build_an_application` and :ref:`application_run` for more
necessary to set ``OPENSDA_FW=jlink`` explicitly when you invoke ``make details).
debug``.
To use the Segger J-Link tools with OpenSDA, follow the instructions
in the :ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA
V2.1 Firmware`_. The Segger J-Link tools are not the default for this
board, therefore it is necessary to set ``OPENSDA_FW=jlink``
explicitly in the environment before programming and debugging.
Flashing Flashing
======== ========
This example uses the :ref:`hello_world` sample with the This example uses the :ref:`hello_world` sample with the
:ref:`nxp_opensda_pyocd` tools. Use the ``make flash`` build target to build :ref:`nxp_opensda_pyocd` tools.
your Zephyr application, invoke the pyOCD flash tool and program your Zephyr
application to flash.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: frdm_kl25z
$ . zephyr-env.sh :goals: flash
$ cd samples/hello_world/
$ make BOARD=frdm_kl25z flash
Open a serial terminal (minicom, putty, etc.) with the following settings: Open a serial terminal (minicom, putty, etc.) with the following settings:
@ -167,18 +167,14 @@ the following message:
Debugging Debugging
========= =========
This example uses the :ref:`hello_world` sample with the You can debug an application in the usual way. Here is an example for the
:ref:`nxp_opensda_pyocd` tools. Use the ``make debug`` build target to build :ref:`hello_world` application.
your Zephyr application, invoke the pyOCD GDB server, attach a GDB client, and
program your Zephyr application to flash. It will leave you at a gdb prompt.
.. code-block:: console
$ cd <zephyr_root_path>
$ . zephyr-env.sh
$ cd samples/hello_world/
$ make BOARD=frdm_kl25z debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: frdm_kl25z
:maybe-skip-config:
:goals: debug
.. _FRDM-KL25Z Website: .. _FRDM-KL25Z Website:
http://www.nxp.com/products/software-and-tools/hardware-development-tools/freedom-development-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z?tid=vanFRDM-KL25Z http://www.nxp.com/products/software-and-tools/hardware-development-tools/freedom-development-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z?tid=vanFRDM-KL25Z

View file

@ -136,41 +136,43 @@ communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the To use the pyOCD tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_pyocd` page using the `DAPLink FRDM-KW41Z Firmware`_. The :ref:`nxp_opensda_pyocd` page using the `DAPLink FRDM-KW41Z Firmware`_. The
pyOCD tools are not the default for this board, therefore it is necessary to pyOCD tools are not the default for this board, therefore it is necessary to
set ``OPENSDA_FW=daplink`` explicitly when you invoke ``make flash`` or ``make set ``OPENSDA_FW=daplink`` explicitly when using the default flash and debug
debug``. mechanisms.
.. note:: .. note::
pyOCD added support for KW41Z recently and has not yet tagged a release, pyOCD added support for KW41Z after support for this board was added to
therefore you must build pyOCD from source based on the current master Zephyr, so you may need to build pyOCD from source based on the current
branch (f21d43d). master branch (f21d43d).
To use the Segger J-Link tools with OpenSDA, follow the instructions in the To use the Segger J-Link tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_. :ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_.
The Segger J-Link tools are the default for this board, therefore it is not The Segger J-Link tools are the default for this board, therefore it is not
necessary to set ``OPENSDA_FW=jlink`` explicitly when you invoke ``make necessary to set ``OPENSDA_FW=jlink`` explicitly in the environment before
debug``. programming and debugging.
With these mechanisms, applications for the ``frdm_kw41z`` board
configuration can be built and debugged in the usual way (see
:ref:`build_an_application` and :ref:`application_run` for more
details).
Flashing Flashing
======== ========
The Segger J-Link firmware does not support command line flashing, therefore The Segger J-Link firmware does not support command line flashing, therefore
the ``make flash`` build target is not supported. the usual ``flash`` build system target is not supported.
Debugging Debugging
========= =========
This example uses the :ref:`hello_world` sample with the This example uses the :ref:`hello_world` sample with the
:ref:`nxp_opensda_jlink` tools. Use the ``make debug`` build target to build :ref:`nxp_opensda_jlink` tools. Run the following to build
your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and
program your Zephyr application to flash. It will leave you at a gdb prompt. program your Zephyr application to flash. It will leave you at a gdb prompt.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: frdm_kw41z
$ . zephyr-env.sh :goals: debug
$ cd samples/hello_world/
$ make BOARD=frdm_kw41z DEBUG_SCRIPT=jlink.sh debug
.. _FRDM-KW41Z Website: .. _FRDM-KW41Z Website:
http://www.nxp.com/products/microcontrollers-and-processors/more-processors/application-specific-mcus-mpus/bluetooth-low-energy-ble/nxp-freedom-development-kit-for-kinetis-kw41z-31z-21z-mcus:FRDM-KW41Z http://www.nxp.com/products/microcontrollers-and-processors/more-processors/application-specific-mcus-mpus/bluetooth-low-energy-ble/nxp-freedom-development-kit-for-kinetis-kw41z-31z-21z-mcus:FRDM-KW41Z

View file

@ -157,14 +157,19 @@ serial communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the To use the pyOCD tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_pyocd` page using the `DAPLink Hexiwear Firmware`_. The pyOCD :ref:`nxp_opensda_pyocd` page using the `DAPLink Hexiwear Firmware`_. The pyOCD
tools are the default for this board, therefore it is not necessary to set tools are the default for this board, therefore it is not necessary to set
``OPENSDA_FW=daplink`` explicitly when you invoke ``make flash`` or ``make ``OPENSDA_FW=daplink`` explicitly when using the default flash and debug
debug``. mechanisms.
With these mechanisms, applications for the ``hexiwear_k64`` board
configuration can be built and flashed in the usual way (see
:ref:`build_an_application` and :ref:`application_run` for more
details).
To use the Segger J-Link tools with OpenSDA, follow the instructions in the To use the Segger J-Link tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_. :ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_.
The Segger J-Link tools are not the default for this board, therefore it is The Segger J-Link tools are not the default for this board, therefore it is
necessary to set ``OPENSDA_FW=jlink`` explicitly when you invoke ``make necessary to set ``OPENSDA_FW=jlink`` explicitly in the environment before
debug``. programming and debugging.
.. note:: .. note::
The OpenSDA adapter is shared between the K64 and the KW40Z via switches, The OpenSDA adapter is shared between the K64 and the KW40Z via switches,
@ -198,16 +203,12 @@ Flashing
======== ========
This example uses the :ref:`hello_world` sample with the This example uses the :ref:`hello_world` sample with the
:ref:`nxp_opensda_pyocd` tools. Use the ``make flash`` build target to build :ref:`nxp_opensda_pyocd` tools.
your Zephyr application, invoke the pyOCD flash tool and program your Zephyr
application to flash.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: hexiwear_k64
$ . zephyr-env.sh :goals: flash
$ cd samples/hello_world/
$ make BOARD=hexiwear_k64 flash
Open a serial terminal (minicom, putty, etc.) with the following settings: Open a serial terminal (minicom, putty, etc.) with the following settings:
@ -226,17 +227,14 @@ the following message:
Debugging Debugging
========= =========
This example uses the :ref:`hello_world` sample with the You can debug an application in the usual way. Here is an example for the
:ref:`nxp_opensda_pyocd` tools. Use the ``make debug`` build target to build :ref:`hello_world` application.
your Zephyr application, invoke the pyOCD GDB server, attach a GDB client, and
program your Zephyr application to flash. It will leave you at a gdb prompt.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <zephyr_root_path> :board: hexiwear_k64
$ . zephyr-env.sh :maybe-skip-config:
$ cd samples/hello_world/ :goals: debug
$ make BOARD=hexiwear_k64 debug
Using Bluetooth Using Bluetooth
*************** ***************
@ -257,15 +255,16 @@ host application to the K64.
Peripheral Heart Rate Sensor Peripheral Heart Rate Sensor
============================ ============================
Navigate to the Zephyr sample application and build it for the Hexiwear K64.
.. code-block:: console Navigate to the Zephyr ``samples/bluetooth/peripheral_hr`` sample
application, then build and flash it to the Hexiwear K64. Make sure
the OpenSDA switches on the docking station are configured for the
K64.
$ cd samples/bluetooth/peripheral_hr .. zephyr-app-commands::
$ make BOARD=hexiwear_k64 :zephyr-app: samples/bluetooth/peripheral_hr
:board: hexiwear_k64
Flash the application to the Hexiwear K64. Make sure the OpenSDA switches on :goals: build flash
the docking station are configured for the K64.
Reset the KW40Z and the K64 using the push buttons on the docking station. Reset the KW40Z and the K64 using the push buttons on the docking station.

View file

@ -86,14 +86,19 @@ serial communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the To use the pyOCD tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_pyocd` page using the `DAPLink Hexiwear Firmware`_. The pyOCD :ref:`nxp_opensda_pyocd` page using the `DAPLink Hexiwear Firmware`_. The pyOCD
tools are not the default for this board, therefore it is necessary to set tools are not the default for this board, therefore it is necessary to set
``OPENSDA_FW=daplink`` explicitly when you invoke ``make flash`` or ``make ``OPENSDA_FW=daplink`` explicitly in the environment when programming and
debug``. debugging.
To use the Segger J-Link tools with OpenSDA, follow the instructions in the To use the Segger J-Link tools with OpenSDA, follow the instructions in the
:ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_. :ref:`nxp_opensda_jlink` page using the `Segger J-Link OpenSDA V2.1 Firmware`_.
The Segger J-Link tools are the default for this board, therefore it is not The Segger J-Link tools are the default for this board, therefore it is not
necessary to set ``OPENSDA_FW=jlink`` explicitly when you invoke ``make necessary to set ``OPENSDA_FW=jlink`` explicitly when using the usual
debug``. programming and debugging mechanisms.
With these mechanisms, applications for the ``hexiwear_kw40z`` board
configuration can be built and flashed in the usual way (see
:ref:`build_an_application` and :ref:`application_run` for more
details).
Because `Segger RTT`_ is required for a console to KW40Z, the J-Link tools are Because `Segger RTT`_ is required for a console to KW40Z, the J-Link tools are
recommended. recommended.
@ -102,23 +107,20 @@ Flashing
======== ========
The Segger J-Link firmware does not support command line flashing, therefore The Segger J-Link firmware does not support command line flashing, therefore
the ``make flash`` build target is not supported. the usual ``flash`` build target is not supported.
Debugging Debugging
========= =========
This example uses the :ref:`hello_world` sample with the This example uses the :ref:`hello_world` sample with the
:ref:`nxp_opensda_jlink` tools. Use the ``make debug`` build target to build :ref:`nxp_opensda_jlink` tools. This builds the Zephyr application,
your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and invokes the J-Link GDB server, attaches a GDB client, and programs the
program your Zephyr application to flash. It will leave you at a gdb prompt. application to flash. It will leave you at a gdb prompt.
.. code-block:: console
$ cd <zephyr_root_path>
$ . zephyr-env.sh
$ cd samples/hello_world/
$ make BOARD=hexiwear_kw40z debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: hexiwear_kw40z
:goals: debug
In a second terminal, open telnet: In a second terminal, open telnet:

View file

@ -247,20 +247,12 @@ V2M MPS2 provides:
Flashing an application to V2M MPS2 Flashing an application to V2M MPS2
----------------------------------- -----------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Here is an example for the :ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ZEPHYR_BASE/samples/hello_world :board: mps2_an385
:goals: build
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd $ZEPHYR_BASE
$ . zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=mps2_an385
Connect the V2M MPS2 to your host computer using the USB port and you should Connect the V2M MPS2 to your host computer using the USB port and you should
see a USB connection which exposes a Mass Storage and a USB Serial Port. see a USB connection which exposes a Mass Storage and a USB Serial Port.

View file

@ -63,14 +63,16 @@ Building
Follow the :ref:`getting_started` instructions for Zephyr application Follow the :ref:`getting_started` instructions for Zephyr application
development. development.
To build for the MSP-EXP432P401R LaunchXL: For example, to build the :ref:`hello_world` application for the
MSP-EXP432P401R LaunchXL:
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: msp_exp432p401r_launchxl
:goals: build
$ make -C samples/hello_world BOARD=msp_exp432p401r_launchxl The resulting ``zephyr.elf`` binary in the build directory can be flashed onto
MSP-EXP432P401R LaunchXL using the command line utility mentioned below.
The resulting ``zephyr.elf`` binary can be flashed onto MSP-EXP432P401R LaunchXL
using the command line utility mentioned below.
Flashing Flashing
======== ========

View file

@ -91,49 +91,29 @@ Programming and Debugging
Flashing Flashing
======== ========
Follow the instructions in the :ref:`nordic_segger` page to install and configure Follow the instructions in the :ref:`nordic_segger` page to install
all the necessary software. and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
This tutorial uses the sample application Here is an example for the :ref:`hello_world` application.
shell :file:`$ZEPHYR_BASE/samples/subsys/shell/shell`, and uses the information that can be found in
:ref:`nordic_segger_flashing`.
#. To build the Zephyr kernel, enter: First, run your favorite terminal program to listen for output.
.. code-block:: console .. code-block:: console
$ cd $ZEPHYR_BASE $ minicom -D <tty_device> -b 115200
$ make -C samples/subsys/shell/shell BOARD=nrf51_pca10028
#. Connect the micro-USB cable to the nRF51 DK and to your computer. Replace :code:`<tty_device>` with the port where the board nRF51 DK
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
#. Erase the flash memory in the nRF51822: Then build and flash the application in the usual way.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ nrfjprog --eraseall -f nrf51 :board: nrf51_pca10028
:goals: build flash
#. Flash the application using the nrfjprog tool:
.. code-block:: console
$ nrfjprog --program outdir/zephyr.hex -f nrf51
#. Run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board
nRF51 DK can be found. For example, under Linux,
:code:`/dev/ttyACM0`.
The ``-b`` option sets baudrate ignoring the value
from config.
#. Press the Reset button and you should see the output of
shell application in your terminal.
Debugging Debugging
========= =========

View file

@ -95,6 +95,10 @@ More details
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nrf51_vbluno51`` board configuration can be
built and flashed in the usual way (see :ref:`build_an_application`
and :ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -102,23 +106,28 @@ The VBLUno51 board has on-board DAPLink (CMSIS-DAP) interface for flashing and d
You do not need any other programming device. You do not need any other programming device.
You only need to install pyOCD tool (https://pypi.python.org/pypi/pyOCD) You only need to install pyOCD tool (https://pypi.python.org/pypi/pyOCD)
This tutorial uses the blinky application :ref:`blinky-sample` This tutorial uses the blinky application :ref:`blinky-sample`.
See the :ref:`getting_started` for general information on setting up See the :ref:`getting_started` for general information on setting up
your development environment. your development environment. Then build and flash the application in
the usual way.
#. To build the Zephyr kernel along with the blinky sample app, enter: .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: nrf51_vbluno51
:goals: build flash
.. code-block:: console Debugging
=========
$ cd $ZEPHYR_BASE/samples/basic/blinky You can debug an application in the usual way. Here is an example for the
$ make BOARD=nrf51_vbluno51 :ref:`blinky-sample` application.
#. To build and flash the generated binary image to the board, enter: .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
.. code-block:: console :board: nrf51_vbluno51
:maybe-skip-config:
$ make BOARD=nrf51_vbluno51 flash :goals: debug
Testing the VBLUno51 with Zephyr: buttons, LEDs, UART, BLE Testing the VBLUno51 with Zephyr: buttons, LEDs, UART, BLE
********************************************************** **********************************************************

View file

@ -89,52 +89,37 @@ Push buttons
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nrf52840_pca10056`` board configuration can be
built and flashed in the usual way (see :ref:`build_an_application`
and :ref:`application_run` for more details); however, the standard
debugging targets are not currently available.
Flashing Flashing
======== ========
Follow the instructions in the :ref:`nordic_segger` page to install and configure Follow the instructions in the :ref:`nordic_segger` page to install
all the necessary software. and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
This tutorial uses the sample application Here is an example for the :ref:`hello_world` application.
shell :file:`$ZEPHYR_BASE/samples/subsys/shell/shell`, and uses the information that can be found in
:ref:`nordic_segger_flashing`.
#. To build the Zephyr kernel, enter: First, run your favorite terminal program to listen for output.
.. code-block:: console .. code-block:: console
$ cd $ZEPHYR_BASE $ minicom -D <tty_device> -b 115200
$ make -C samples/subsys/shell/shell BOARD=nrf52840_pca10056
#. Connect the micro-USB cable to the nRF52840 PDK and to your computer. Replace :code:`<tty_device>` with the port where the board nRF52 DK
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
#. Erase the flash memory in the nRF52840: Then build and flash the application in the usual way.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ nrfjprog --eraseall -f nrf52 :board: nrf52840_pca10056
:goals: build flash
#. Flash the application using the nrfjprog tool:
.. code-block:: console
$ nrfjprog --program outdir/zephyr.hex -f nrf52
#. Run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board
nRF52840 PDK can be found. For example, under Linux,
:code:`/dev/ttyACM0`.
The ``-b`` option sets baudrate ignoring the value
from config.
#. Press the Reset button and you should see the output of
shell application in your terminal.
Debugging Debugging
========= =========

View file

@ -64,22 +64,42 @@ It also regulates 5V from USB to 3.3V via the onboard LDO to power Nano v2.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nrf52_blenano2`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
Build the Zephyr kernel and BLE sample application: To flash an application, you'll need to connect your BLE Nano 2 with the
DAPLink board, then attach that to your computer via USB.
.. code-block:: console .. warning::
$ cd $ZEPHYR_BASE Be careful to mount the BLE Nano 2 correctly! The side of the board
$ . zephyr-env.sh with the VIN and GND pins should face **towards** the USB
$ make -C samples/bluetooth/beacon BOARD=nrf52_blenano2 connector.
- Mount your BLE Nano v2 onto the DAPLink USB dongle correctly. Now build and flash applications as usual. Here is an example for the
- Connect DAPLink USB dongle to your host computer. :ref:`hello_world` application.
- The PC will prompt a new mass storage disk.
- Copy the generated file zephyr.bin on folder samples/bluetooth/beacon/outdir/nrf52_blenano2 to the DAPLink drive. .. zephyr-app-commands::
- Open nRF Connect application to check advertising packets. :zephyr-app: samples/hello_world
:board: nrf52_blenano2
:goals: build flash
Debugging
=========
After mounting the BLE Nano 2 on its DAPLink board as described above,
you can debug an application in the usual way. Here is an example for
the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nrf52_blenano2
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -332,49 +332,29 @@ Programming and Debugging
Flashing Flashing
======== ========
Follow the instructions in the :ref:`nordic_segger` page to install and configure Follow the instructions in the :ref:`nordic_segger` page to install
all the necessary software. and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
This tutorial uses the sample application Here is an example for the :ref:`hello_world` application.
shell :file:`$ZEPHYR_BASE/samples/subsys/shell/shell`, and uses the information that can be found in
:ref:`nordic_segger_flashing`.
#. To build the Zephyr kernel, enter: First, run your favorite terminal program to listen for output.
.. code-block:: console .. code-block:: console
$ cd $ZEPHYR_BASE $ minicom -D <tty_device> -b 115200
$ make -C samples/subsys/shell/shell BOARD=nrf52_pca10040
#. Connect the micro-USB cable to the nRF52 DK and to your computer. Replace :code:`<tty_device>` with the port where the board nRF52 DK
can be found. For example, under Linux, :code:`/dev/ttyACM0`.
#. Erase the flash memory in the nRF52832: Then build and flash the application in the usual way.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ nrfjprog --eraseall -f nrf52 :board: nrf52840_pca10056
:goals: build flash
#. Flash the application using the nrfjprog tool:
.. code-block:: console
$ nrfjprog --program outdir/zephyr.hex -f nrf52
#. Run your favorite terminal program to listen for output.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board
nRF52 DK can be found. For example, under Linux,
:code:`/dev/ttyACM0`.
The ``-b`` option sets baudrate ignoring the value
from config.
#. Press the Reset button and you should see the output of
shell application in your terminal.
Debugging Debugging
========= =========

View file

@ -83,23 +83,16 @@ The VBLUno52 board has an on-board DAPLink (CMSIS-DAP) interface for flashing an
You do not need any other programming device. You do not need any other programming device.
You only need to install the pyOCD tool (https://pypi.python.org/pypi/pyOCD) You only need to install the pyOCD tool (https://pypi.python.org/pypi/pyOCD)
This tutorial uses the blinky application :ref:`blinky-sample`
See the :ref:`getting_started` for general information on setting up See the :ref:`getting_started` for general information on setting up
your development environment. your development environment.
#. To build the Zephyr kernel along with the blinky sample app, enter: You can build and flash applications in the usual way. Here is an
example for the :ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd $ZEPHYR_BASE/samples/basic/blinky :board: nrf52_vbluno52
$ make BOARD=nrf52_vbluno52 :goals: build flash
#. To build and flash the generated binary image to the board, enter:
.. code-block:: console
$ make BOARD=nrf52_vbluno52 flash
Testing the VBLUno52 with Zephyr: buttons, LEDs, UART, BLE Testing the VBLUno52 with Zephyr: buttons, LEDs, UART, BLE
********************************************************** **********************************************************

View file

@ -115,6 +115,10 @@ For mode details please refer to `STM32 Nucleo-64 board User Manual`_.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_f030r8`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -124,33 +128,26 @@ This interface is supported by the openocd version included in the Zephyr SDK.
Flashing an application to Nucleo F030R8 Flashing an application to Nucleo F030R8
---------------------------------------- ----------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial. Here is an example for the :ref:`blinky-sample` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
$ cd <zephyr_root_path> :board: nucleo_f030r8
$ source zephyr-env.sh :goals: build flash
$ cd $ZEPHYR_BASE/samples/basic/blinky
$ make BOARD=nucleo_f030r8
Connect the Nucleo F030R8 to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=nucleo_f030r8 flash
You will see the LED blinking every second. You will see the LED blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`blinky-sample` application.
.. code-block:: console
$ make BOARD=nucleo_f030r8 debug
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: nucleo_f030r8
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -115,6 +115,10 @@ For mode details please refer to `STM32 Nucleo-64 board User Manual`_.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_f091rc`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -124,33 +128,26 @@ This interface is supported by the openocd version included in the Zephyr SDK.
Flashing an application to Nucleo F091RC Flashing an application to Nucleo F091RC
---------------------------------------- ----------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial. Here is an example for the :ref:`blinky-sample` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
$ cd <zephyr_root_path> :board: nucleo_f091rc
$ source zephyr-env.sh :goals: build flash
$ cd $ZEPHYR_BASE/samples/basic/blinky
$ make BOARD=nucleo_f091rc
Connect the Nucleo F091RC to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=nucleo_f091rc flash
You will see the LED blinking every second. You will see the LED blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=nucleo_f091rc debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_f091rc
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -115,6 +115,10 @@ For mode details please refer to `STM32 Nucleo-64 board User Manual`_.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_f103rb`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -124,33 +128,26 @@ This interface is supported by the openocd version included in the Zephyr SDK.
Flashing an application to Nucleo F103RB Flashing an application to Nucleo F103RB
---------------------------------------- ----------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial. Here is an example for the :ref:`blinky-sample` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
$ cd <zephyr_root_path> :board: nucleo_f103rb
$ source zephyr-env.sh :goals: build flash
$ cd $ZEPHYR_BASE/samples/basic/blinky
$ make BOARD=nucleo_f103rb
Connect the Nucleo F103RB to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=nucleo_f103rb flash
You will see the LED blinking every second. You will see the LED blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`blinky-sample` application.
.. code-block:: console
$ make BOARD=nucleo_f103rb debug
.. zephyr-app-commands::
:zephyr-app: samples/basic-blinky
:board: nucleo_f103rb
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -119,6 +119,10 @@ For mode details please refer to `STM32 Nucleo-64 board User Manual`_.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_f334r8`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -128,45 +132,28 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to Nucleo F334R8 Flashing an application to Nucleo F334R8
---------------------------------------- ----------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial: Connect the Nucleo F334R8 to your host computer using the USB port,
then build and flash an application. Here is an example for the
:ref:`blinky-sample` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
$<zephyr_root_path>/samples/basic/blinky :board: nucleo_f334r8
:goals: build flash
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/basic/blinky
$ make BOARD=nucleo_f334r8
Connect the Nucleo F334R8 to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=nucleo_f334r8 flash
Run a serial host program to connect with your Nucleo board:
.. code-block:: console
$ minicom -D /dev/ttyACM0
You will see the LED blinking every second. You will see the LED blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for
the :ref:`blinky-sample` application.
.. code-block:: console
$ make BOARD=nucleo_f334r8 debug
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: nucleo_f334r8
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -142,6 +142,10 @@ Nucleo F401RE board has up to 3 I2Cs. The default I2C mapping for Zephyr is:
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_f401re`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -151,35 +155,22 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to Nucleo F401RE Flashing an application to Nucleo F401RE
---------------------------------------- ----------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Connect the Nucleo F401RE to your host computer using the USB port,
then run a serial host program to connect with your Nucleo board:
.. code-block:: console
$<zephyr_root_path>/samples/hello_world
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=nucleo_f401re
Connect the Nucleo F401RE to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=nucleo_f401re flash
Run a serial host program to connect with your Nucleo board:
.. code-block:: console .. code-block:: console
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Now build and flash an application. Here is an example for
:ref:`hello_world`.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_f401re
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
@ -189,12 +180,14 @@ You should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=nucleo_f411re debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_f401re
:maybe-skip-config:
:goals: debug
.. _Nucleo F401RE website: .. _Nucleo F401RE website:
http://www.st.com/en/evaluation-tools/nucleo-f401re.html http://www.st.com/en/evaluation-tools/nucleo-f401re.html

View file

@ -134,6 +134,10 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_f411re`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -143,27 +147,7 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to Nucleo F411RE Flashing an application to Nucleo F411RE
---------------------------------------- ----------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Here is an example for the :ref:`hello_world` application.
.. code-block:: console
$<zephyr_root_path>/samples/hello_world
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=nucleo_f411re
Connect the Nucleo F411RE to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=nucleo_f411re flash
Run a serial host program to connect with your Nucleo board. Run a serial host program to connect with your Nucleo board.
@ -171,22 +155,30 @@ Run a serial host program to connect with your Nucleo board.
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Build and flash the application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_f411re
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
$ Hello World! arm $ Hello World! arm
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=nucleo_f411re debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_f411re
:maybe-skip-config:
:goals: debug
.. _Nucleo F411RE website: .. _Nucleo F411RE website:
http://www.st.com/en/evaluation-tools/nucleo-f411re.html http://www.st.com/en/evaluation-tools/nucleo-f411re.html

View file

@ -168,50 +168,36 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_l432kc`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
Nucleo L432KC board includes an ST-LINK/V2-1 embedded debug tool interface. Nucleo L432KC board includes an ST-LINK/V2-1 embedded debug tool
This interface is not supported by the openocd version 0.9 included by the Zephyr SDK v0.9. interface. This interface is supported by the openocd version
Until we update the Zephyr SDK, use openocd v0.10.0 from the openocd-stm32 project on GitHub included in the Zephyr SDK since v0.9.2.
to get the minimum set of scripts needed to flash and debug STM32 development boards.
.. code-block:: console
$ git clone https://github.com/erwango/openocd-stm32.git
Then follow instructions in README.md
Flashing an application to Nucleo L432KC Flashing an application to Nucleo L432KC
---------------------------------------- ----------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Connect the Nucleo L432KC to your host computer using the USB port,
then run a serial host program to connect with your Nucleo board.
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=nucleo_l432kc
Connect the Nucleo L432KC to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ cd <openocd-stm32_path>
$ stm32_flsh l4 $ZEPHYR_BASE/samples/hello_world/outdir/nucleo_l432kc/zephyr.bin
Run a serial host program to connect with your Nucleo board.
.. code-block:: console .. code-block:: console
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Now build and flash an application. Here is an example for
:ref:`hello_world`.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_l432kc
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
@ -221,12 +207,14 @@ You should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <openocd-stm32_path> :board: nucleo_l432kc
$ stm32_dbg l4 $ZEPHYR_BASE/samples/hello_world/outdir/nucleo_l432kc/zephyr.elf :maybe-skip-config:
:goals: debug
.. _Nucleo L432KC website: .. _Nucleo L432KC website:
http://www.st.com/en/evaluation-tools/nucleo-l432kc.html http://www.st.com/en/evaluation-tools/nucleo-l432kc.html

View file

@ -181,42 +181,23 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``nucleo_l476rg`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
Nucleo L476RG board includes an ST-LINK/V2-1 embedded debug tool interface. Nucleo L476RG board includes an ST-LINK/V2-1 embedded debug tool
This interface is not supported by the openocd version 0.9 included by the Zephyr SDK v0.9. interface. This interface is supported by the openocd version
Until we update the Zephyr SDK, use openocd v0.10.0 from the openocd-stm32 project on GitHub included in the Zephyr SDK since v0.9.2.
to get the minimum set of scripts needed to flash and debug STM32 development boards.
.. code-block:: console
$ git clone https://github.com/erwango/openocd-stm32.git
Then follow instructions in README.md
Flashing an application to Nucleo L476RG Flashing an application to Nucleo L476RG
---------------------------------------- ----------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial:
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=nucleo_l476rg
Connect the Nucleo L476RG to your host computer using the USB port. Connect the Nucleo L476RG to your host computer using the USB port.
Then, enter the following command: Then build and flash an application. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ cd <openocd-stm32_path>
$ stm32_flsh l4 $ZEPHYR_BASE/samples/hello_world/outdir/nucleo_l476rg/zephyr.bin
Run a serial host program to connect with your Nucleo board. Run a serial host program to connect with your Nucleo board.
@ -224,22 +205,30 @@ Run a serial host program to connect with your Nucleo board.
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Then build and flash the application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_l476rg
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
$ Hello World! arm $ Hello World! arm
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <openocd-stm32_path> :board: nucleo_l476rg
$ stm32_dbg l4 $ZEPHYR_BASE/samples/hello_world/outdir/nucleo_l476rg/zephyr.elf :maybe-skip-config:
:goals: debug
.. _Nucleo L476RG website: .. _Nucleo L476RG website:
http://www.st.com/en/evaluation-tools/nucleo-l476rg.html http://www.st.com/en/evaluation-tools/nucleo-l476rg.html

View file

@ -326,26 +326,23 @@ The OLIMEX-STM32-E407 board does not include an embedded debug tool
interface. You will need to use ST tools or an external JTAG probe. interface. You will need to use ST tools or an external JTAG probe.
In the following examples a ST-Link V2 USB dongle is used. In the following examples a ST-Link V2 USB dongle is used.
If you have an external JTAG probe compliant with the default Zephyr OpenOCD
configuration, however, then applications for the ``olimex_stm32_e407`` board
configuration can be built and flashed in the usual way (see
:ref:`build_an_application` and :ref:`application_run` for more details).
Flashing an application to the Olimex-STM32-E407 Flashing an application to the Olimex-STM32-E407
================================================ ================================================
The sample application :ref:`hello_world` is being used in this tutorial. To
build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=olimex_stm32_e407
Connect the ST-Link USB dongle to your host computer and to the JTAG port of Connect the ST-Link USB dongle to your host computer and to the JTAG port of
the OLIMEX-STM32-E407 board. the OLIMEX-STM32-E407 board. Then build and flash an application.
Then, enter the following command:
.. code-block:: console Here is an example for the :ref:`hello_world` application.
$ make BOARD=olimex_stm32_e407 flash .. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: olimex_stm32_e407
:goals: build flash
Run a serial host program to connect with your board: Run a serial host program to connect with your board:
@ -363,12 +360,14 @@ After resetting the board, you should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: Provided that you have a JTAG probe, you can debug an application in the usual
way. Here is an example for the :ref:`hello_world` application.
.. code-block:: console
$ make BOARD=olimex_stm32_e407 debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: olimex_stm32_e407
:maybe-skip-config:
:goals: debug
.. _OLIMEX-STM32-E407 website: .. _OLIMEX-STM32-E407 website:
https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware

View file

@ -221,23 +221,17 @@ In the following examples a ST-Link V2 USB dongle is used.
Flashing an application to the Olimex-STM32-P405 Flashing an application to the Olimex-STM32-P405
================================================ ================================================
The sample application :ref:`hello_world` is being used in this tutorial. To The sample application :ref:`hello_world` is being used in this tutorial.
build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=olimex_stm32_p405
Connect the ST-Link USB dongle to your host computer and to the JTAG port of Connect the ST-Link USB dongle to your host computer and to the JTAG port of
the OLIMEX-STM32-P405 board. the OLIMEX-STM32-P405 board.
Then, enter the following command:
.. code-block:: console Now build and flash the application.
$ make BOARD=olimex_stm32_p405 flash .. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: olimex_stm32_p405
:goals: build flash
Run a serial host program to connect with your board: Run a serial host program to connect with your board:
@ -255,12 +249,14 @@ After resetting the board, you should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=olimex_stm32_p405 debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: olimex_stm32_p405
:maybe-skip-config:
:goals: debug
.. _OLIMEX-STM32-P405 website: .. _OLIMEX-STM32-P405 website:
https://www.olimex.com/Products/ARM/ST/STM32-P405/ https://www.olimex.com/Products/ARM/ST/STM32-P405/

View file

@ -367,16 +367,15 @@ Flashing an Application to OLIMEXINO-STM32
========================================== ==========================================
To upload an application to the OLIMEXINO-STM32 board a TTL(3.3V) To upload an application to the OLIMEXINO-STM32 board a TTL(3.3V)
serial adapter is required. This tutorial uses sample application serial adapter is required. This tutorial uses the
:ref:`button-sample` :ref:`button-sample` sample application.
#. To build the Zephyr kernel and application, enter: #. To build the Zephyr kernel and application, enter:
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/button
$ cd $<zephyr_root_path> :board: olimexino_stm32
$ source zephyr-env.sh :goals: build
$ make -C samples/basic/button BOARD=olimexino_stm32
#. Connect the serial cable to the UEXT lines of the UART #. Connect the serial cable to the UEXT lines of the UART
interface (pin #3=TX and pin #4=RX). interface (pin #3=TX and pin #4=RX).
@ -385,12 +384,12 @@ serial adapter is required. This tutorial uses sample application
#. Reset the board while holding the button (BUT). #. Reset the board while holding the button (BUT).
#. Flash the application using the stm32flash tool: #. Flash the application using the stm32flash tool. Start
by navigating to the build directory containing zephyr.bin.
.. code-block:: console .. code-block:: console
$ cd samples/basic/button $ stm32flash -w zephyr.bin -v -g 0x0 <tty_device>
$ stm32flash -w outdir/olimexino_stm32/zephyr.bin -v -g 0x0 <tty_device>
Replace :code:`<tty_device>` with the port where the board Replace :code:`<tty_device>` with the port where the board
OLIMEXINO-STM32 can be found. For example, under Linux, OLIMEXINO-STM32 can be found. For example, under Linux,

View file

@ -71,9 +71,10 @@ Programming and Debugging
Use this configuration to run basic Zephyr applications and kernel tests in the QEMU Use this configuration to run basic Zephyr applications and kernel tests in the QEMU
emulated environment, for example, with the :ref:`synchronization_sample`: emulated environment, for example, with the :ref:`synchronization_sample`:
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/synchronization
$ make -C samples/synchronization BOARD=qemu_cortex_m3 run :board: qemu_cortex_m3
:goals: run
This will build an image with the synchronization sample app, boot it using This will build an image with the synchronization sample app, boot it using
QEMU, and display the following console output: QEMU, and display the following console output:

View file

@ -82,10 +82,10 @@ Flashing
#. Build the Zephyr kernel and the :ref:`hello_world` sample application: #. Build the Zephyr kernel and the :ref:`hello_world` sample application:
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd $ZEPHYR_BASE/samples/hello_world/ :board: sam4s_xplained
$ make BOARD=sam4s_xplained :goals: build
#. Connect the SAM4S Xplained board to your host computer using the USB debug #. Connect the SAM4S Xplained board to your host computer using the USB debug
port. port.

View file

@ -83,11 +83,7 @@ Programming and Debugging
Flashing the Zephyr project onto SAM E70 MCU requires the `OpenOCD tool`_. Flashing the Zephyr project onto SAM E70 MCU requires the `OpenOCD tool`_.
Support for Atmel SAM E microcontroller series was added in OpenOCD release Support for Atmel SAM E microcontroller series was added in OpenOCD release
0.10.0. The current OpenOCD version available in the Zephyr SDK is 0.9 and 0.10.0, which was added in Zephyr SDK 0.9.2.
unfortunately it does not support Atmel SAM E microcontrollers. Since few, if
any major Linux distributions currently offer OpenOCD version 0.10.0 as a
package you will have to compile and install it yourself. Make sure to enable
CMSIS-DAP support as this is the debug interface used by the on board EDBG chip.
By default a factory new SAM E70 chip will boot SAM-BA boot loader located in By default a factory new SAM E70 chip will boot SAM-BA boot loader located in
the ROM, not the flashed image. This is determined by the value of GPNVM1 the ROM, not the flashed image. This is determined by the value of GPNVM1
@ -107,16 +103,6 @@ contents of the SAM E70 flash memory:
Flashing Flashing
======== ========
#. Build the Zephyr kernel and the application:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=sam_e70_xplained
#. Connect the SAM E70 Xplained board to your host computer using the USB debug
port.
#. Run your favorite terminal program to listen for output. Under Linux the #. Run your favorite terminal program to listen for output. Under Linux the
terminal should be :code:`/dev/ttyACM0`. For example: terminal should be :code:`/dev/ttyACM0`. For example:
@ -132,41 +118,35 @@ Flashing
- Parity: None - Parity: None
- Stop bits: 1 - Stop bits: 1
#. To flash the image, assuming the OpenOCD tool is already installed, enter: #. Connect the SAM E70 Xplained board to your host computer using the
USB debug port. Then build and flash the :ref:`hello_world`
application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ make BOARD=sam_e70_xplained flash :board: sam_e70_xplained
:goals: build flash
The command will also verify that the image was programmed correctly, reset
the board and run the Zephyr application.
You can flash the image using an external debug adapter such as J-Link or
ULINK, connected to the 20-pin JTAG header. Supply the name of the debug
adapter (e.g., ``jlink``) to the make command via an OPENOCD_INTERFACE
variable. OpenOCD will look for the appropriate interface configuration in an
``interface/$(OPENOCD_INTERFACE).cfg`` file on its internal search path.
.. code-block:: console
$ make BOARD=sam_e70_xplained OPENOCD_INTERFACE=jlink flash
You should see "Hello World!" in your terminal. You should see "Hello World!" in your terminal.
You can flash the image using an external debug adapter such as J-Link
or ULINK, connected to the 20-pin JTAG header. Supply the name of the
debug adapter (e.g., ``jlink``) via an OPENOCD_INTERFACE environment
variable. OpenOCD will look for the appropriate interface
configuration in an ``interface/$(OPENOCD_INTERFACE).cfg`` file on its
internal search path.
Debugging Debugging
========= =========
#. Connect the SAM E70 Xplained board to your host computer using the USB debug You can debug an application in the usual way. Here is an example for the
port. :ref:`hello_world` application.
#. Start GDB server on your host computer .. zephyr-app-commands::
:zephyr-app: samples/hello_world
.. code-block:: console :board: sam_e70_xplained
:maybe-skip-config:
$ openocd -f board/atmel_same70_xplained.cfg& :goals: debug
#. You can now use GDB remote debugging to connect to the target board. By
default GDB server will listen on port 3333.
References References
********** **********

View file

@ -119,48 +119,43 @@ At power-on, the board is in firmware-upgrade mode (also called DFU for
"Device Firmware Upgrade"), allowing the firmware to be updated through the USB. "Device Firmware Upgrade"), allowing the firmware to be updated through the USB.
This interface is supported by the openocd version included in Zephyr SDK. This interface is supported by the openocd version included in Zephyr SDK.
Applications for the ``stm3210c_eval`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing an application to STM3210C-EVAL Flashing an application to STM3210C-EVAL
---------------------------------------- ----------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial: Connect the STM3210C-EVAL to your host computer using the USB port, then build
and flash an application in the usual way.
.. code-block:: console Here is an example for the :ref:`blinky-sample` application.
$<zephyr_root_path>/samples/basic/blinky .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
To build the Zephyr kernel and application, enter: :board: stm3210c_eval
:goals: build flash
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/basic/blinky
$ make BOARD=stm3210c_eval
Connect the STM3210C-EVAL to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=stm3210c_eval flash
Run a serial host program to connect with your STM3210C-EVAL board:
.. code-block:: console
$ minicom -D /dev/ttyACM0
You will see the LED blinking every second. You will see the LED blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can run a serial host program to connect with your STM3210C-EVAL board. For
example, on Linux:
.. code-block:: console .. code-block:: console
$ make BOARD=stm3210c_eval debug $ minicom -D /dev/ttyACM0
You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm3210c_eval
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -115,6 +115,10 @@ Default Zephyr Peripheral Mapping:
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``stm32373c_eval`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -126,45 +130,26 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to STM32373C-EVAL Flashing an application to STM32373C-EVAL
----------------------------------------- -----------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial: Here is an example for the :ref:`blinky-sample` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
$<zephyr_root_path>/samples/basic/blinky :board: stm32373c_eval
:goals: build flash
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/basic/blinky
$ make BOARD=stm32373c_eval
Connect the STM32373C-EVAL to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=stm32373c_eval flash
Run a serial host program to connect with your STM32373C-EVAL board:
.. code-block:: console
$ minicom -D /dev/ttyACM0
You will see the LED blinking every second. You will see the LED blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`blinky-sample` application.
.. code-block:: console
$ make BOARD=stm32373c_eval debug
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: stm32373c_eval
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -94,24 +94,35 @@ The stm32_min_dev board configuration supports the following hardware features:
Other hardware features are not supported by the Zephyr kernel. Other hardware features are not supported by the Zephyr kernel.
Building and Flashing Zephyr onto stm32_min_dev
***********************************************
You can build any of the Zephyr samples with, Programming and Debugging
*************************
.. code-block:: console Applications for the ``stm32_min_dev`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
$ cd $<zephyr_root_path> Flashing
$ source zephyr-env.sh ========
$ make -C samples/basic/blinky BOARD=stm32_min_dev
Flashing the Zephyr kernel onto stm32_min_dev requires the popular ST-Link Here is an example for the :ref:`blinky-sample` application.
debugger/programmer. This port comes with support for doing just that with the
flash target.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: stm32_min_dev
:goals: build flash
$ make -C samples/basic/blinky BOARD=stm32_min_dev flash Debugging
=========
You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32_min_dev
:maybe-skip-config:
:goals: debug
.. _STM32F103x8: .. _STM32F103x8:
http://www.st.com/resource/en/datasheet/stm32f103c8.pdf http://www.st.com/resource/en/datasheet/stm32f103c8.pdf

View file

@ -153,33 +153,24 @@ Flashing
======== ========
STM32F3DISCOVERY Discovery kit includes a ST-LINK/V2 or ST-LINK/V2-B embedded STM32F3DISCOVERY Discovery kit includes a ST-LINK/V2 or ST-LINK/V2-B embedded
debug tool interface. This interface is supported by the openocd version debug tool interface.
included in Zephyr SDK.
Applications for the ``stm32f3_disco`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing an application to STM32F3DISCOVERY Flashing an application to STM32F3DISCOVERY
------------------------------------------- -------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: First, connect the STM32F3DISCOVERY Discovery kit to your host computer using
the USB port to prepare it for flashing. Then build and flash your application.
.. code-block:: console Here is an example for the :ref:`hello_world` application.
$<zephyr_root_path>/samples/hello_world .. zephyr-app-commands::
:zephyr-app: samples/hello_world
To build the Zephyr kernel and application, enter: :board: stm32f3_disco
:goals: build flash
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32f3_disco
Connect the STM32F3DISCOVERY Discovery kit to your host computer using the USB
ST-LINK port. Then, enter the following command:
.. code-block:: console
$ make BOARD=stm32f3_disco flash
Run a serial host program to connect with your board. For PCB version A or B a Run a serial host program to connect with your board. For PCB version A or B a
TTL(3.3V) serial adapter is required. For PCB version C and newer a Virtual Com TTL(3.3V) serial adapter is required. For PCB version C and newer a Virtual Com
@ -192,7 +183,7 @@ Port (VCP) is available on the USB ST-LINK port.
Replace <tty_device> with the port where the STM32F3DISCOVERY board can be Replace <tty_device> with the port where the STM32F3DISCOVERY board can be
found. For example, under Linux, /dev/ttyUSB0. found. For example, under Linux, /dev/ttyUSB0.
You should see the following message: You should see the following message on the console:
.. code-block:: console .. code-block:: console
@ -202,12 +193,13 @@ You should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=stm32f3_disco debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32f3_disco
:goals: debug
.. _STM32F3DISCOVERY website: .. _STM32F3DISCOVERY website:
http://www.st.com/en/evaluation-tools/stm32f3discovery.html http://www.st.com/en/evaluation-tools/stm32f3discovery.html

View file

@ -124,6 +124,10 @@ assigned to UART2. Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``stm32f411e_disco`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -134,39 +138,29 @@ Zephyr SDK.
Flashing an application to STM32F411E-DISCO Flashing an application to STM32F411E-DISCO
------------------------------------------- -------------------------------------------
The sample application :ref:`blinky-sample` is being used in this tutorial:
.. code-block:: console
$<zephyr_root_path>/samples/basic/blinky
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/basic/blinky/
$ make BOARD=stm32f411e_disco
Connect the STM32F411E-DISCO Discovery kit to your host computer using the Connect the STM32F411E-DISCO Discovery kit to your host computer using the
USB port. Then, enter the following command: USB port. Then build and flash an application.
.. code-block:: console Here is an example for the :ref:`blinky-sample` application.
$ make BOARD=stm32f411e_disco flash .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: stm32f411e_disco
:goals: build flash
You should see the orange led (LD3) blinking every second. You should see the orange led (LD3) blinking every second.
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug applications in the usual way. Here is an example for
the :ref:`blinky-sample` application.
.. code-block:: console
$ make BOARD=stm32f411e_disco debug
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: stm32f411e_disco
:maybe-skip-config:
:goals: debug
References References
********** **********

View file

@ -137,6 +137,10 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``stm32f412g_disco`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -146,35 +150,23 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to STM32F412G-DISCO Flashing an application to STM32F412G-DISCO
------------------------------------------- -------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Connect the STM32F412G-DISCO Discovery kit to your host computer using
the USB port, then run a serial host program to connect with your
.. code-block:: console board:
$<zephyr_root_path>/samples/hello_world
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32f412g_disco
Connect the STM32F412G-DISCO Discovery kit to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=stm32f412g_disco flash
Run a serial host program to connect with your board:
.. code-block:: console .. code-block:: console
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Then build and flash an application. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32f412g_disco
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
@ -184,12 +176,14 @@ You should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=stm32f412g_disco debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32f412g_disco
:maybe-skip-config:
:goals: debug
.. _32F412GDISCOVERY website: .. _32F412GDISCOVERY website:
http://www.st.com/en/evaluation-tools/32f412gdiscovery.html http://www.st.com/en/evaluation-tools/32f412gdiscovery.html

View file

@ -136,6 +136,10 @@ The default communication settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``stm32f429i_disc1`` board configuration can be built
and flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -145,27 +149,15 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to STM32F429I-DISC1 Flashing an application to STM32F429I-DISC1
------------------------------------------- -------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: First, connect the STM32F429I-DISC1 Discovery kit to your host computer using
the USB port to prepare it for flashing. Then build and flash your application.
.. code-block:: console Here is an example for the :ref:`hello_world` application.
$<zephyr_root_path>/samples/hello_world .. zephyr-app-commands::
:zephyr-app: samples/hello_world
To build the Zephyr kernel and application, enter: :board: stm32f429i_disc1
:goals: build flash
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32f429i_disc1
Connect the STM32F429I-DISC1 Discovery kit to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=stm32f429i_disc1 flash
Run a serial host program to connect with your board: Run a serial host program to connect with your board:
@ -183,12 +175,13 @@ Then, press the RESET button (The black one), you should see the following messa
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=stm32f429i_disc1 debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32f429i_disc1
:goals: debug
.. _STM32F429I-DISC1 website: .. _STM32F429I-DISC1 website:
http://www.st.com/en/evaluation-tools/32f429idiscovery.html http://www.st.com/en/evaluation-tools/32f429idiscovery.html

View file

@ -142,6 +142,10 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``stm32f469i_disco`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -151,27 +155,15 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to STM32F469I-DISCO Flashing an application to STM32F469I-DISCO
------------------------------------------- -------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: First, connect the STM32F469I-DISCO Discovery kit to your host computer using
the USB port to prepare it for flashing. Then build and flash your application.
.. code-block:: console Here is an example for the :ref:`hello_world` application.
$<zephyr_root_path>/samples/hello_world .. zephyr-app-commands::
:zephyr-app: samples/hello_world
To build the Zephyr kernel and application, enter: :board: stm32f469i_disco
:goals: build flash
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32f469i_disco
Connect the STM32F469I-DISCO Discovery kit to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=stm32f469i_disco flash
Run a serial host program to connect with your board: Run a serial host program to connect with your board:
@ -179,7 +171,7 @@ Run a serial host program to connect with your board:
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: You should see the following message on the console:
.. code-block:: console .. code-block:: console
@ -189,11 +181,13 @@ You should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ make BOARD=stm32f469i_disco debug :board: stm32f469i_disco
:goals: debug
.. _32F469IDISCOVERY website: .. _32F469IDISCOVERY website:

View file

@ -139,6 +139,10 @@ Default settings are 115200 8N1.
Programming and Debugging Programming and Debugging
************************* *************************
Applications for the ``stm32f4_disco`` board configuration can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Flashing Flashing
======== ========
@ -148,27 +152,7 @@ This interface is supported by the openocd version included in Zephyr SDK.
Flashing an application to STM32F4DISCOVERY Flashing an application to STM32F4DISCOVERY
------------------------------------------- -------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Here is an example for the :ref:`hello_world` application.
.. code-block:: console
$<zephyr_root_path>/samples/hello_world
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32f4_disco
Connect the STM32F4DISCOVERY Discovery kit to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ make BOARD=stm32f4_disco flash
Run a serial host program to connect with your board: Run a serial host program to connect with your board:
@ -176,7 +160,14 @@ Run a serial host program to connect with your board:
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Build and flash the application:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32f4_disco
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
@ -186,12 +177,14 @@ You should see the following message:
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console
$ make BOARD=stm32f4_disco debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32f4_disco
:maybe-skip-config:
:goals: debug
.. _STM32F4DISCOVERY website: .. _STM32F4DISCOVERY website:
http://www.st.com/en/evaluation-tools/stm32f4discovery.html http://www.st.com/en/evaluation-tools/stm32f4discovery.html

View file

@ -189,62 +189,50 @@ Programming and Debugging
Flashing Flashing
======== ========
STM32L496G Discovery board includes an ST-LINK/V2-1 embedded debug tool interface. STM32L496G Discovery board includes an ST-LINK/V2-1 embedded debug
This interface is not supported by the openocd version 0.9 included by the Zephyr SDK v0.9, tool interface. This interface is supported by openocd version
use openocd v0.10.0 from the openocd-stm32 project on GitHub to get the minimum set of scripts v0.10.0, which has been available since Zephyr SDK v0.9.2.
needed to flash and debug STM32 development boards.
.. code-block:: console
$ git clone https://github.com/erwango/openocd-stm32.git
Then follow instructions in README.md
Applications for the ``stm32l496g_disco`` board configuration can be
built and flashed in the usual way (see :ref:`build_an_application`
and :ref:`application_run` for more details).
Flashing an application to STM32L496G Discovery Flashing an application to STM32L496G Discovery
----------------------------------------------- -----------------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: Connect the STM32L496G Discovery to your host computer using the USB
port, then run a serial host program to connect with your Discovery
To build the Zephyr kernel and application, enter: board. For example:
.. code-block:: console
$ cd <zephyr_root_path>
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=stm32l496g_disco
Connect the STM32L496G Discovery to your host computer using the USB port.
Then, enter the following command:
.. code-block:: console
$ cd <openocd-stm32_path>
$ stm32_flsh l4 $ZEPHYR_BASE/samples/hello_world/outdir/stm32l496g_disco/zephyr.bin
Run a serial host program to connect with your Discovery board.
.. code-block:: console .. code-block:: console
$ minicom -D /dev/ttyACM0 $ minicom -D /dev/ttyACM0
You should see the following message: Then, build and flash in the usual way. Here is an example for the
:ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32l496g_disco
:goals: build flash
You should see the following message on the console:
.. code-block:: console .. code-block:: console
$ Hello World! arm $ Hello World! arm
Debugging Debugging
========= =========
Access gdb with the following make command: You can debug an application in the usual way. Here is an example for the
:ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ cd <openocd-stm32_path> :board: stm32l496g_disco
$ stm32_dbg l4 $ZEPHYR_BASE/samples/hello_world/outdir/stm32l496g_disco/zephyr.elf :maybe-skip-config:
:goals: debug
.. _STM32L496G Discovery website: .. _STM32L496G Discovery website:
http://www.st.com/en/evaluation-tools/32l496gdiscovery.html http://www.st.com/en/evaluation-tools/32l496gdiscovery.html

View file

@ -125,23 +125,20 @@ Flashing
======== ========
The Segger J-Link firmware does not support command line flashing, therefore The Segger J-Link firmware does not support command line flashing, therefore
the ``make flash`` build target is not supported. the usual ``flash`` build target is not supported.
Debugging Debugging
========= =========
This example uses the :ref:`hello_world` sample with the This example uses the :ref:`hello_world` sample with the
:ref:`nxp_opensda_jlink` tools. Use the ``make debug`` build target to build :ref:`nxp_opensda_jlink` tools. This builds the Zephyr application,
your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and invokes the J-Link GDB server, attaches a GDB client, and programs the
program your Zephyr application to flash. It will leave you at a gdb prompt. application to flash. It will leave you at a gdb prompt.
.. code-block:: console
$ cd <zephyr_root_path>
$ . zephyr-env.sh
$ cd samples/hello_world/
$ make BOARD=usb_kw24d512 debug
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: usb_kw24d512
:goals: debug
In a second terminal, open telnet: In a second terminal, open telnet:

View file

@ -231,20 +231,13 @@ to `CMSIS-DAP Website`_.
Flashing an application to V2M Beetle Flashing an application to V2M Beetle
------------------------------------- -------------------------------------
The sample application :ref:`hello_world` is being used in this tutorial: You can build applications in the usual way. Here is an example for
the :ref:`hello_world` application.
.. code-block:: console .. zephyr-app-commands::
:zephyr-app: samples/hello_world
$ZEPHYR_BASE/samples/hello_world :board: v2m_beetle
:goals: build flash
To build the Zephyr kernel and application, enter:
.. code-block:: console
$ cd $ZEPHYR_BASE
$ . zephyr-env.sh
$ cd $ZEPHYR_BASE/samples/hello_world/
$ make BOARD=v2m_beetle
Connect the V2M Beetle to your host computer using the USB port and you should Connect the V2M Beetle to your host computer using the USB port and you should
see a USB connection which exposes a Mass Storage (MBED) and a USB Serial Port. see a USB connection which exposes a Mass Storage (MBED) and a USB Serial Port.