zephyr/samples/basic/blinky
Martí Bolívar 3b7918360a doc: blinky: touch up README
The devicetree link is rendering as "Devicetree Guide" instead of
"devicetree". Fix that.

My guess is that most users won't care about the details of the
requirements, and rather just want to know if their board is supported
or not. So move the error you'll see on unsupported boards before the
details about how to add support (which involve a pretty significant
learning curve).

Also mention overlays as a way to get this working.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
..
src dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY 2020-05-06 05:25:41 -05:00
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
README.rst doc: blinky: touch up README 2020-05-06 17:25:49 +02:00
prj.conf
sample.yaml

README.rst

.. _blinky-sample:

Blinky sample
#############

Overview
********

Blinky is a simple application which blinks an LED forever.

The source code shows how to configure GPIO pins as outputs, then turn them on
and off.

.. _blinky-sample-requirements:

Requirements
************

You will see this error if you try to build Blinky for an unsupported board:

.. code-block:: none

   Unsupported board: led0 devicetree alias is not defined

The board must have an LED connected via a GPIO pin. These are called "User
LEDs" on many of Zephyr's :ref:`boards`. The LED must be configured using the
``led0`` :ref:`devicetree <dt-guide>` alias. This is usually done in the
:ref:`BOARD.dts file <devicetree-in-out-files>` or a :ref:`devicetree overlay
<set-devicetree-overlays>`.

Building and Running
********************

Build and flash Blinky as follows, changing ``reel_board`` for your board:

.. zephyr-app-commands::
   :zephyr-app: samples/basic/blinky
   :board: reel_board
   :goals: build flash
   :compact:

After flashing, the LED starts to blink. Blinky does not print to the console.