From bd9d38b5bdb83d12b820cb50385a94de91d8e3e9 Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Sun, 12 Nov 2017 10:13:07 +0100 Subject: [PATCH] samples: boards: Convert doc to CMake Convert doc of samples/boards to CMake. Signed-off-by: Carles Cufi --- .../environmental_sensing/README.rst | 20 ++++++++++--------- samples/boards/microbit/display/README.rst | 9 +++++---- samples/boards/microbit/pong/README.rst | 8 +++++--- samples/boards/microbit/sound/README.rst | 9 +++++---- samples/boards/nrf52/power_mgr/README.rst | 15 +++++--------- .../quark_se_c1000/power_mgr/README.rst | 8 +++++--- 6 files changed, 36 insertions(+), 33 deletions(-) diff --git a/samples/boards/arduino_101/environmental_sensing/README.rst b/samples/boards/arduino_101/environmental_sensing/README.rst index 899c792d189..7fb3afc3d53 100644 --- a/samples/boards/arduino_101/environmental_sensing/README.rst +++ b/samples/boards/arduino_101/environmental_sensing/README.rst @@ -106,17 +106,19 @@ Before using the environmental sensing sample, the Arduino 101 board needs to be flashed with the firmware for its nRF51 Bluetooth LE controller. To do this, follow the steps in :ref:`bluetooth_firmware_arduino_101`. -The sample provide a single :file:`Makefile` that builds both images, simple run -make in the top level directory of the application and flash either using JTAG -or using DFU. (DFU is preferred). +Build and flash each of the images either using JTAG or DFU (DFU is preferred): -The sample can be found here: :file:`samples/boards/arduino_101/environmental_sensing` in the -Zephyr project tree. +.. zephyr-app-commands:: + :zephyr-app: samples/boards/arduino_101/environmental_sensing/ap + :board: arduino_101 + :goals: build flash + :compact: -.. code-block:: console - - $ make - $ make flash # for flashing with JTAG +.. zephyr-app-commands:: + :zephyr-app: samples/boards/arduino_101/environmental_sensing/sensor + :board: arduino_101_sss + :goals: build flash + :compact: Running ======== diff --git a/samples/boards/microbit/display/README.rst b/samples/boards/microbit/display/README.rst index a40dc4b984c..c296d5f47ac 100644 --- a/samples/boards/microbit/display/README.rst +++ b/samples/boards/microbit/display/README.rst @@ -14,10 +14,11 @@ Building This project outputs various things on the BBC micro:bit display. It can be built as follows: -.. code-block:: console - - $ cd samples/boards/microbit/display - $ make +.. zephyr-app-commands:: + :zephyr-app: samples/boards/microbit/display + :board: bbc_microbit + :goals: build + :compact: Sample Output ============= diff --git a/samples/boards/microbit/pong/README.rst b/samples/boards/microbit/pong/README.rst index 4dae9854bb7..cd03322a1fe 100644 --- a/samples/boards/microbit/pong/README.rst +++ b/samples/boards/microbit/pong/README.rst @@ -25,7 +25,9 @@ generate beeps whenever the ball hits a wall or the paddle. Building ******** -.. code-block:: console +.. zephyr-app-commands:: + :zephyr-app: samples/boards/microbit/pong + :board: bbc_microbit + :goals: build + :compact: - $ cd samples/boards/microbit/pong - $ make diff --git a/samples/boards/microbit/sound/README.rst b/samples/boards/microbit/sound/README.rst index 14d377b31a7..e629540341f 100644 --- a/samples/boards/microbit/sound/README.rst +++ b/samples/boards/microbit/sound/README.rst @@ -19,10 +19,11 @@ Building The sample can be built as follows: -.. code-block:: console - - $ cd samples/boards/microbit/sound - $ make +.. zephyr-app-commands:: + :zephyr-app: samples/boards/microbit/sound + :board: bbc_microbit + :goals: build + :compact: Sample Output ============= diff --git a/samples/boards/nrf52/power_mgr/README.rst b/samples/boards/nrf52/power_mgr/README.rst index 29fc47ec32f..9c41e991e0d 100644 --- a/samples/boards/nrf52/power_mgr/README.rst +++ b/samples/boards/nrf52/power_mgr/README.rst @@ -36,17 +36,12 @@ This application uses nrf52 DK board for the demo. Building, Flashing and Running ****************************** -Building -.. code-block:: console - make BOARD=nrf52_pca10040 - -Flashing (Use nrfjprog for flashing):- -.. code-block:: console - - nrfjprog --eraseall -f nrf52 - nrfjprog --program -f nrf52 - nrfjprog --reset -f nrf52 +.. zephyr-app-commands:: + :zephyr-app: samples/boards/nrf52/power_mgr + :board: nrf52_pca10040 + :goals: build flash + :compact: Running: diff --git a/samples/boards/quark_se_c1000/power_mgr/README.rst b/samples/boards/quark_se_c1000/power_mgr/README.rst index 9a9022203e5..526fdebcb7f 100644 --- a/samples/boards/quark_se_c1000/power_mgr/README.rst +++ b/samples/boards/quark_se_c1000/power_mgr/README.rst @@ -37,9 +37,11 @@ the board. Building and Running ******************** -.. code-block:: console - - make BOARD= +.. zephyr-app-commands:: + :zephyr-app: samples/boards/quark_se_c1000/power_mgr + :board: + :goals: build + :compact: Sample Output =============