OpenOCD child process termination: Wrong device detected
The problem is solved.

It is fixed by going to the Run Configurations, Debugger tab, Debugger tab, Mode Setup, Reset Mode: Change to Software system reset.

The underlying problem is that my STLink is V2, not V2.1 and this does not have an hardware reset.