I am a beginner in programming and I have installed 'STM32CubeMX' and 'System Workbench for STM32', and I am working with an STM32F0 Discovery Kit, with STM32F051 microcontroller and (according to the user guide) an integrated ST-LINK/V2 debugging tool. This is connected to my PC with a USB cable.
I have decided to start small with a simple project involving a timer flashing an LED.
The timer TIM3 is configured using CubeMX, and the code is generated, opened and built in System Workbench with no errors or warnings.
I then follow the instructions on the following URL to start Debugging my code:
https://www.openstm32.org/Creating%2Bdebug%2Bconfiguration
I leave all items to their default values (as they are automatically pre-populated) and then press Debug. A second later a message box appears saying:
OpenOCD child process termination
Reason:
Wrong device detected, check the board connected
Further details as follows:
Wrong device detected, check the board connected
Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48)
Licensed under GNU GPL v2
For bug reports, read http://openocd.org/doc/doxygen/bugs.html
none separate
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 24000 kHz
adapter_nsrst_delay: 100
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 24000 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.889362
Info : Unable to match requested speed 24000 kHz, using 4000 kHz
Info : Stlink adapter speed set to 4000 kHz
Info : STM32F051R8Tx.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x00000000
Warn : Cannot identify target as a STM32 family.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
So therefore, I'm a bit stuck! Any help would be appreciated!
User contributions licensed under CC BY-SA 3.0