aboutsummaryrefslogtreecommitdiff
path: root/stmhal/README.md
diff options
context:
space:
mode:
authorChristopher Arndt2016-03-08 08:42:30 +0100
committerDamien George2016-03-09 13:26:23 +0000
commit07554486eeb73665b1bf61ee9af32e4a6e7e458a (patch)
treedec1d52f1570fc6aed6abc6581c3de2348a37693 /stmhal/README.md
parent6b80ebe32ef57cc3bef1b6309433354181867611 (diff)
stmhal: Add makefile target to deploy stmhal build via ST-LINK.
Diffstat (limited to 'stmhal/README.md')
-rw-r--r--stmhal/README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/stmhal/README.md b/stmhal/README.md
index 18912cf8d..457aaf996 100644
--- a/stmhal/README.md
+++ b/stmhal/README.md
@@ -57,6 +57,31 @@ Or using `dfu-util` directly:
$ sudo dfu-util -a 0 -d 0483:df11 -D build-PYBV11/firmware.dfu
+
+### Flashing the Firmware with stlink
+
+ST Discovery or Nucleo boards have a builtin programmer called ST-LINK. With
+these boards and using Linux or OS X, you have the option to upload the
+`stmhal` firmware using the `st-flash` utility from the
+[stlink](https://github.com/texane/stlink) project. To do so, connect the board
+with a mini USB cable to its ST-LINK USB port and then use the make target
+`deploy-stlink`. For example, if you have the STM32F4DISCOVERY board, you can
+run:
+
+ $ make BOARD=STM32F4DISC deploy-stlink
+
+The `st-flash` program should detect the USB connection to the board
+automatically. If not, run `lsusb` to determine its USB bus and device number
+and set the `STLINK_DEVICE` environment variable accordingly, using the format
+`<USB_BUS>:<USB_ADDR>`. Example:
+
+ $ lsusb
+ [...]
+ Bus 002 Device 035: ID 0483:3748 STMicroelectronics ST-LINK/V2
+ $ export STLINK_DEVICE="002:0035"
+ $ make BOARD=STM32F4DISC deploy-stlink
+
+
Accessing the board
-------------------