|
1 | 1 | # Flash it
|
2 | 2 |
|
3 | 3 | Flashing is the process of moving our program into the microcontroller's (persistent) memory. Once
|
4 |
| -flashed, the microcontroller will executed the flashed program everytime it is powered on. |
| 4 | +flashed, the microcontroller will execute the flashed program every time it is powered on. |
5 | 5 |
|
6 | 6 | In this case, our `led-roulette` program will be the *only* program in the microcontroller memory.
|
7 | 7 | By this I mean that there's nothing else running on the microcontroller: no OS, no "daemon",
|
@@ -36,22 +36,22 @@ The program will block; leave that terminal open.
|
36 | 36 | Now it's a good time to explain what this command is actually doing.
|
37 | 37 |
|
38 | 38 | I mentioned that the F3 actually has two microcontrollers. One of them is used as a
|
39 |
| -programmer/debugger. The part of the board that's used as a programmer is called ST-LINK (that's how |
| 39 | +programmer/debugger. The part of the board that's used as a programmer is called ST-LINK (that's what |
40 | 40 | STMicroelectronics decided to call it). This ST-LINK is connected to the target microcontroller
|
41 | 41 | using a Serial Wire Debug (SWD) interface (this interface is an ARM standard so you'll run into it
|
42 | 42 | when dealing with other Cortex-M based microcontrollers). This SWD interface can be used to flash
|
43 | 43 | and debug a microcontroller. The ST-LINK is connected to the "USB ST-LINK" port and will appear as
|
44 |
| -an USB device when you connect the F3 to your laptop. |
| 44 | +a USB device when you connect the F3 to your laptop. |
45 | 45 |
|
46 | 46 | <p align="center">
|
47 | 47 | <img height=640 title="On-board ST-LINK" src="assets/st-link.png">
|
48 | 48 | </p>
|
49 | 49 |
|
50 | 50 |
|
51 |
| -As for OpenOCD. It's a software that provides some services like a *GDB server* on top of USB |
| 51 | +As for OpenOCD, it's software that provides some services like a *GDB server* on top of USB |
52 | 52 | devices that expose a debugging protocol like SWD or JTAG.
|
53 | 53 |
|
54 |
| -Onto the actual command: Those `.cfg` files we are using instruct OpenOCD to look for a ST-LINK USB |
| 54 | +Onto the actual command: those `.cfg` files we are using instruct OpenOCD to look for a ST-LINK USB |
55 | 55 | device (`interface/stlink-v2-1.cfg`) and to expect a STM32F3XX microcontroller
|
56 | 56 | (`target/stm32f3x.cfg`) to be connected to the ST-LINK.
|
57 | 57 |
|
|
0 commit comments