Skip to content

Commit

Permalink
stlink-v2-1.cfg to stlink.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
pythcoiner committed Feb 15, 2024
1 parent 9fce2cd commit a1b4ad0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
9 changes: 4 additions & 5 deletions f3discovery/src/03-setup/verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,29 @@ Two *red* LEDs should turn on right after connecting the USB cable to the board.
> somewhere else use the `-s /path/to/scripts/` option to specify your install directory.
``` console
openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
openocd -f interface/stlink.cfg -f target/stm32f3x.cfg
```

or

``` console
openocd -f interface/stlink.cfg -f target/stm32f3x.cfg
openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
```


### Windows

Below the references to `C:\OpenOCD` is the directory where OpenOCD is installed.

``` console
openocd -s C:\OpenOCD\share\scripts -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
openocd -s C:\OpenOCD\share\scripts -f interface/stlink.cfg -f target/stm32f3x.cfg
```

> **NOTE** cygwin users have reported problems with the -s flag. If you run into
> that problem you can add `C:\OpenOCD\share\scripts\` directory to the parameters.
cygwin users:
``` console
openocd -f C:\OpenOCD\share\scripts\interface\stlink-v2-1.cfg -f C:\OpenOCD\share\scripts\target\stm32f3x.cfg
openocd -f C:\OpenOCD\share\scripts\interface\stlink.cfg -f C:\OpenOCD\share\scripts\target\stm32f3x.cfg
```

### All
Expand Down
8 changes: 4 additions & 4 deletions f3discovery/src/05-led-roulette/flash-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Make sure the F3 is connected to your computer and run the following commands in
## For *nix & MacOS:
``` console
cd /tmp
openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
openocd -f interface/stlink.cfg -f target/stm32f3x.cfg
```

## For Windows **Note**: substitute `C:` for the actual OpenOCD path:
```
cd %TEMP%
openocd -s C:\share\scripts -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
openocd -s C:\share\scripts -f interface/stlink.cfg -f target/stm32f3x.cfg
```

> **NOTE** Older revisions of the board need to pass slightly different arguments to
Expand Down Expand Up @@ -51,12 +51,12 @@ As for OpenOCD, it's software that provides some services like a *GDB server* on
devices that expose a debugging protocol like SWD or JTAG.

Onto the actual command: those `.cfg` files we are using instruct OpenOCD to look for a ST-LINK USB
device (`interface/stlink-v2-1.cfg`) and to expect a STM32F3XX microcontroller
device (`interface/stlink.cfg`) and to expect a STM32F3XX microcontroller
(`target/stm32f3x.cfg`) to be connected to the ST-LINK.

The OpenOCD output looks like this:
``` console
$ openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
$ openocd -f interface/stlink.cfg -f target/stm32f3x.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
Expand Down
4 changes: 2 additions & 2 deletions f3discovery/src/appendix/1-general-troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Linux:
If that works, you can use [these instructions] to make OpenOCD work without
root privilege.
- You might be using the wrong interface configuration for your ST-LINK.
Try `interface/stlink-v2.cfg` instead of `interface/stlink-v2-1.cfg`.
Try `interface/stlink-v2.cfg` or `interface/stlink-v2-1.cfg` instead of `interface/stlink.cfg`.

[these instructions]: ../../03-setup/linux.md#udev-rules

Expand Down Expand Up @@ -169,7 +169,7 @@ Solution B

All:
- Send configuration details to OpenOCD when starting it up so that it uses a different port from the default for any of the processes.
- For example, to do its telnet features on 4441 instead of the default 4444, you would run `openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg -c "telnet_port 4441"`
- For example, to do its telnet features on 4441 instead of the default 4444, you would run `openocd -f interface/stlink.cfg -f target/stm32f3x.cfg -c "telnet_port 4441"`
- More details on OpenOCD's Configuration Stage can be found in their [official docs online](http://openocd.org/doc/html/Server-Configuration.html).


Expand Down

0 comments on commit a1b4ad0

Please sign in to comment.