Hi there o/
I´m having issues with flashing and debugging my Nucleo-STM32F446RE with the PIO extention on VSCode. Its connected via USB and the current stlink driver is installed.
First of all, the platformio.ini:
[env:nucleo_f446re]
platform = ststm32
board = nucleo_f446re
upload_protocol = stlink
debug_tool = stlink
framework = cmsis
so, building shows no errors. not even a yellow warning. At first, flashing was successfull, but after i tried different settings in the ini-file (because debugging failed), its now failing to. It shows following error:
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\nucleo_f446re\firmware.elf
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Error: init mode failed (unable to connect to the target)
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked
Debugg error:
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = stlink
PlatformIO: Initializing remote target...
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 2000 kHz
Info : STLINK V2J38M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.247151
Error: init mode failed (unable to connect to the target)
soo… Does anyone know how to fix this? ._.