]> git.proxmox.com Git - rustc.git/blame - src/doc/embedded-book/src/intro/install/verify.md
New upstream version 1.45.0+dfsg1
[rustc.git] / src / doc / embedded-book / src / intro / install / verify.md
CommitLineData
9fa01778
XL
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 micro 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 circled in red.
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
f9f354fc 20$ openocd -f interface/stlink.cfg -f target/stm32f3x.cfg
9fa01778
XL
21```
22
23You should get the following output and the program should block the console:
24
25``` text
26Open On-Chip Debugger 0.10.0
27Licensed under GNU GPL v2
28For bug reports, read
29 http://openocd.org/doc/doxygen/bugs.html
30Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
31adapter speed: 1000 kHz
32adapter_nsrst_delay: 100
33Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
34none separate
35Info : Unable to match requested speed 1000 kHz, using 950 kHz
36Info : Unable to match requested speed 1000 kHz, using 950 kHz
37Info : clock speed 950 kHz
38Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
39Info : using stlink api v2
40Info : Target voltage: 2.919881
41Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
42```
43
44The contents may not match exactly but you should get the last line about
45breakpoints and watchpoints. If you got it then terminate the OpenOCD process
46and move to the [next section].
47
416331ca 48[next section]: ../../start/index.md
9fa01778
XL
49
50If you didn't get the "breakpoints" line then try the following command.
51
52``` console
53$ openocd -f interface/stlink-v2.cfg -f target/stm32f3x.cfg
54```
55
56If that command works that means you got an old hardware revision of the
57discovery board. That won't be a problem but commit that fact to memory as
58you'll need to configure things a bit differently later on. You can move to the
59[next section].
60
61If neither command worked as a normal user then try to run them with root
62permission (e.g. `sudo openocd ..`). If the commands do work with root
48663c56 63permission then check that the [udev rules] have been correctly set.
9fa01778
XL
64
65[udev rules]: linux.md#udev-rules
66
67If you have reached this point and OpenOCD is not working please open [an issue]
68and we'll help you out!
69
70[an issue]: https://github.com/rust-embedded/book/issues