It seems that in my Nucleo board the embedded debug interface (the USB) is broken. How do I connect an external ST-LINK/v2 to the board to be able to flash SW and debug? The debugger should also power the board.
how do you recognize that the ST-LINK/V2 is not working anymore?
Please verify that both CN2 jumpers on the board are ON (closed).
Was the configuration of solder bridges somehow modified?
You can connect with an external programmer to pins PA13 (SWDIO) and PA14 (SWCLK).
They are both connected to the Morpho connector CN7.
Then you need to connect also VDD and GND.
The reset signal is not mandatory, but useful in some cases (low-power modes for instance).
Be sure to remove SB12 (If ST-Link/V2 is not powered it holds the controller under reset, this will remove the connection. You can observe the reset signal's state using oscilloscope if you have access to it).
Also, download and read the UM1724: STM32 Nucleo-64 boards thoroughly. ;-)
I hope it helps.
It didn't work from the beginning.
In the beginning I couldn't connect to the board at all, and if I tried, there were errors and I couldn't connect to the embedded st-link either. Right after disconnecting and reconnecting the USB cable I managed to connect to the embedded st-link and update the firmware. After that I could connect to the board too, but still, hitting a breakpoint causes loosing the connection. Also ST-link (application) thinks that the processor is F072RB when it's 070RB.
How about if I connected the SWDIO to CN7 pin 13 (PA13), SWCLK to CN7 pin 15 (PA14), NRST to CN7 pin 14 (RESET), VDD to CN7 pin 16 (+3.3V) and GND to CN7 pin 20 (GND)? Also jumpers from CN2 are removed.
Aha, it does the same thing with ST-LINK/v2.
If I select the "Connect Under Reset" I get the second error pop-up.
This is how it looks with embedded debug interface (USB) with updated firmware.
So the external st-link was no solution.
I got it to "somewhat work", but when the execution hits a break point, it looks like the debugger stops, but the processor doesn't. After a couple of seconds some messages about system still running and the debugger still waiting for the system to stop. Also some data, that is supposed to be updated later after the breakpoint, seems to have changed and when the debugger is stopped, the location si quite somewhere else.
Any ideas, what's going on?
I'm using the embedded st-link, OpenOCD, and gdb through Eclipse. On Windows 10.
Retrieving data ...