]> git.proxmox.com Git - rustc.git/blame_incremental - src/doc/embedded-book/src/intro/install/verify.md
bump version to 1.81.0+dfsg1-2~bpo12+pve1
[rustc.git] / src / doc / embedded-book / src / intro / install / verify.md
... / ...
CommitLineData
1# Verify Installation
2
3In this section we check that some of the required tools / drivers have been
4correctly installed and configured.
5
6Connect your laptop / PC to the discovery board using a Mini-USB USB cable. The
7discovery board has two USB connectors; use the one labeled "USB ST-LINK" that
8sits on the center of the edge of the board.
9
10Also check that the ST-LINK header is populated. See the picture below; the
11ST-LINK header is highlighted.
12
13<p align="center">
14<img title="Connected discovery board" src="../../assets/verify.jpeg">
15</p>
16
17Now run the following command:
18
19``` console
20openocd -f interface/stlink.cfg -f target/stm32f3x.cfg
21```
22
23> **NOTE**: Old versions of openocd, including the 0.10.0 release from 2017, do
24> not contain the new (and preferable) `interface/stlink.cfg` file; instead you
25> may need to use `interface/stlink-v2.cfg` or `interface/stlink-v2-1.cfg`.
26
27You should get the following output and the program should block the console:
28
29``` text
30Open On-Chip Debugger 0.10.0
31Licensed under GNU GPL v2
32For bug reports, read
33 http://openocd.org/doc/doxygen/bugs.html
34Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
35adapter speed: 1000 kHz
36adapter_nsrst_delay: 100
37Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
38none separate
39Info : Unable to match requested speed 1000 kHz, using 950 kHz
40Info : Unable to match requested speed 1000 kHz, using 950 kHz
41Info : clock speed 950 kHz
42Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
43Info : using stlink api v2
44Info : Target voltage: 2.919881
45Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
46```
47
48The contents may not match exactly but you should get the last line about
49breakpoints and watchpoints. If you got it then terminate the OpenOCD process
50and move to the [next section].
51
52[next section]: ../../start/index.md
53
54If you didn't get the "breakpoints" line then try one of the following commands.
55
56``` console
57openocd -f interface/stlink-v2.cfg -f target/stm32f3x.cfg
58```
59
60``` console
61openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
62```
63
64If one of those commands works it means you got an old hardware revision of the
65discovery board. That won't be a problem but commit that fact to memory as
66you'll need to configure things a bit differently later on. You can move to the
67[next section].
68
69If none of the commands work as a normal user then try to run them with root
70permission (e.g. `sudo openocd ..`). If the commands do work with root
71permission then check that the [udev rules] have been correctly set.
72
73[udev rules]: linux.md#udev-rules
74
75If you have reached this point and OpenOCD is not working please open [an issue]
76and we'll help you out!
77
78[an issue]: https://github.com/rust-embedded/book/issues