From 9373225a13fafc36052477121ab9877c7cc75da8 Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Mon, 28 Jan 2019 18:10:29 +0100
Subject: [PATCH] boards/nrf52xx: add flashing and stdio sections in doc

---
 boards/nrf52840dk/doc.txt | 29 +++++++++++++++++++++++++++++
 boards/nrf52dk/doc.txt    | 30 ++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)

diff --git a/boards/nrf52840dk/doc.txt b/boards/nrf52840dk/doc.txt
index 3129f87482..29e51439bb 100644
--- a/boards/nrf52840dk/doc.txt
+++ b/boards/nrf52840dk/doc.txt
@@ -13,4 +13,33 @@ this, RIOT provides a little tool in `dist/tools/nrf52_resetpin_cfg`.
 Simply compile, flash, and run that tool on your board, and the reset pin should
 work for the time being.
 
+## Flash the board
+
+By default, the board is flashed with via the on-board Segger JLink adapter.
+
+To flash the board, use `BOARD=nrf52840dk` with the `make` command.<br/>
+Example with `hello-world` application:
+```
+    make BOARD=nrf52840dk -C examples/hello-world flash
+```
+
+OpenOCD can also be used. For the moment, the latest stable version of OpenOCD
+(0.10) doesn't contain any support for nrf52 but versions built against the
+actual development version can be used.
+
+To flash the board with OpenOCD, use the `PROGRAMMER` variable:
+```
+    PROGRAMMER=openocd make BOARD=nrf52840dk -C examples/hello-world flash
+```
+
+## Accessing STDIO via UART
+
+The STDIO is directly accessible via the USB port. On a Linux host, it's
+generally mapped to `/dev/ttyACM0`.
+
+Use the `term` target to connect to the board serial port<br/>
+```
+    make BOARD=nrf52840dk -C examples/hello-world term
+```
+
  */
diff --git a/boards/nrf52dk/doc.txt b/boards/nrf52dk/doc.txt
index b32c08d7e5..4e42d21094 100644
--- a/boards/nrf52dk/doc.txt
+++ b/boards/nrf52dk/doc.txt
@@ -104,4 +104,34 @@ work for the time being.
 There are two pins for current measurement on board. Don't connect these pins
 to GND!. The left pin is at 3.3V level and the right pin is connected to V33.
 Divide the measured voltage between this pins by 22 to get the current.
+
+
+## Flash the board
+
+By default, the board is flashed with via the on-board Segger JLink adapter.
+
+To flash the board, use `BOARD=nrf52dk` with the `make` command.<br/>
+Example with `hello-world` application:
+```
+    make BOARD=nrf52dk -C examples/hello-world flash
+```
+
+OpenOCD can also be used. For the moment, the latest stable version of OpenOCD
+(0.10) doesn't contain any support for nrf52 but versions built against the
+actual development version can be used.
+
+To flash the board with OpenOCD, use the `PROGRAMMER` variable:
+```
+    PROGRAMMER=openocd make BOARD=nrf52dk -C examples/hello-world flash
+```
+
+## Accessing STDIO via UART
+
+The STDIO is directly accessible via the USB port. On a Linux host, it's
+generally mapped to `/dev/ttyACM0`.
+
+Use the `term` target to connect to the board serial port<br/>
+```
+    make BOARD=nrf52dk -C examples/hello-world term
+```
  */
-- 
GitLab