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