2020-09-09 07:48 AM
Here is what I get:
STMicroelectronics ST-LINK GDB server. Version 5.6.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
Encountered Error when opening C:\ST\STM32CubeIDE_1.0.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
Solved! Go to Solution.
2020-09-10 08:35 AM
Thank you very much to everyone who gave me his answer. I very appreciate it. Yesterday after several tweaks I managed to stun my Windows. After reinstallation of it and installing STM32CubeIDE everything works.
2020-09-09 08:13 AM
The debugger uses STM32CubeProgrammerfor programming (flashing) the MCU. Looks like STM32CubeProgrammer cannot be found or the file is broken. You could check that by following the blue path in File Explorer. Try uninstalling, deleting all files under C:\ST\STM32CubeIDE_1.0.0\STM32CubeIDE\ and re-installing from scratch.
If you want more detailed analysis, you could in the Debug configuration Debugger tab enable "Log to file". This logs to a file but also increases verbosity level.
2020-09-09 08:18 AM
AV software?
2020-09-09 08:55 AM
Does CubeProgrammer work in the directory if you were to load the binary directly using command-line interface? It is installed in the path that you list above. Maybe make some basic checks?
As quick-fix are you able to use OpenOCD instead?
Let us know your findings. If the bundled CubeProg CLI does not run well stand-alone either, then maybe re-install CubeIDE. Since you upgrade all the way from 1.0.0, maybe you can install 1.4.0 in parallel and see if that works...
2020-09-09 09:37 AM
Already tried :(
2020-09-09 10:28 AM
Uninstalled, deleted ST folder and installed STM32CubeIDE 1.4.
As a result:
Target connection mode: Under reset
Hardware watchpoint supported by the target
COM frequency = 4000 kHz
ST-LINK Firmware version : V2J37M26
Device ID: 0x421
PC: 0x800020c
ST-LINK device status: HALT_MODE
ST-LINK detects target voltage = 3.27 V
ST-LINK device status: HALT_MODE
ST-LINK device initialization OK
Waiting for debugger connection...
Waiting for connection on port 61234...
Waiting for connection on port 61235...
Accepted connection on port 61234...
Debugger connected
Enter STM32_AppReset() function
NVIC_DFSR_REG = 0x00000008
NVIC_CFGFSR_REG = 0x00000000
Accepted connection on port 61235...
------ Switching to STM32CubeProgrammer -----
Encountered Error when opening C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin\STM32_Programmer_CLI.exe
------ Switching context -----
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
Stopping port 61235
2020-09-09 10:33 AM
With openOCD it doesn't work. Unfortunately.
2020-09-09 10:58 AM
Error message:
2020-09-09 11:12 AM
Part of the log file:
[2.001] write(): <316> Tx: $#00
[2.008] read(): <316> Rx: $qXfer:threads:read::0,bfb#fb
[2.008] write(): <316> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#f7
[2.014] read(): <316> Rx: $qRcmd,57726974654450203078322030784630#a4
[2.014] write(): <316> Tx: $4f2e4b2e0a#ef
[2.039] read(): <316> Rx: $qRcmd,52656164415020307832#29
[2.044] write(): <316> Tx: $4f2e4b2e3a307865303066666664300a#97
[2.087] read(): <316> Rx: $qXfer:threads:read::0,bfb#fb
[2.087] write(): <316> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#f7
[2.113] read(): <316> Rx: $qXfer:threads:read::0,bfb#fb
[2.113] write(): <316> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#f7
[2.121] read(): <316> Rx: $me00fffd0,20#86
[2.121] handlePacket(): Reading 0x20 bytes of memory from addr 0xe00fffd0
[2.125] write(): <316> Tx: $0000000000000000000000000000000011000000040000000a00000000000000#37
[2.130] read(): <316> Rx: $T1#85
[2.131] write(): <316> Tx: $OK#9a
[2.132] read(): <316> Rx: $T1#85
[2.132] write(): <316> Tx: $OK#9a
[2.144] read(): <316> Rx: $qRcmd,7265736574#37
[2.144] STM32_AppReset(): Enter STM32_AppReset() function
[2.150] STM32_AppReset(): NVIC_DFSR_REG = 0x00000008
[2.151] STM32_AppReset(): NVIC_CFGFSR_REG = 0x00000000
[2.152] write(): <316> Tx: $53544d3332205375636365737366756c6c7920636f6d706c65746564207265736574206f7065726174696f6e0a#59
[2.170] WaitConnection(): Accepted connection on port 61235...
[2.193] read(): <316> Rx: $vFlashErase:08000000,00004000#c6
[2.193] handleFlashPacket(): FlashErase skipped (Will be performed at flash done)
[2.193] write(): <316> Tx: $OK#9a
[2.221] read(): <316> Rx: $vFlashWrite:8000000:\x00\x00\x02 \x0d\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00]\x02\x00\x08]\x02\x00\x08\x00\x00\x00\x00]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00]\x02\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00]\x02\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00]\x02\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08]\x02\x00\x08#ad
[2.221] handleFlashPacket(): Flash write: Address= 0x8000000, Length=452
[2.221] write(): <316> Tx: $OK#9a
[2.228] read(): <316> Rx: $vFlashWrite:80001c4:\x10\xff\x05L}\x03x3\xff\x04K\x13\xff\x04H\xff\xff\x00\xff\x01}\x03}\x03p\x10\xff\x00\x00\x00 \x00\x00\x00\x00\xff\x02\x00\x08\x08\xff\x03K\x1b\xff\x03I\x03H\xff\xff\x00\xff\x08\xff\x00\x00\x00\x00\x04\x00\x00 \xff\x02\x00\x08\xff\xff\x00\xff\xff\xff\x00\x00\x0dH\xffF\xff\xff\x00\xff\x0cH\x0dI\x0dJ\x00}\x03\x02\xff\xffX\xffP\x043\xff\x18\xffB\xff\xff\x0aJ\x0aL\x00}\x03\x01\xff\x13`\x042\xffB\xff\xff\x00\xff\x11\xff\xff\xff\xff\xff\xff\xff\x00\x00\x02 \x00\x00\x00 \x00\x00\x00 \xff\x02\x00\x08\x00\x00\x00 \x1c\x00\x00 \xff\xff\x00\x00p\xff\x0dN\x0dL\xff\x1b\xff\x10\x00%\xffB\x09\xff\x0bN\x0cL\x00\xff\x18\xff\xff\x1b\xff\x10\x00%\xffB\x05\xffp\xffV\xff%0\xffG\x015\xff\xffV\xff%0\xffG\x015\xff\xff\xff\x02\x00\x08\xff\x02\x00\x08\xff\x02\x00\x08\xff\x02\x00\x08\xff\xff\x00\xff\xff\xff\x08\xff\xffFpG\xff\xff\x00\xff\xff\xff\x08\xff\xffFpG#bf
[2.228] handleFlashPacket(): Flash write: Address= 0x80001c4, Length=252
[2.228] write(): <316> Tx: $OK#9a
[2.231] read(): <316> Rx: $vFlashWrite:80002c0:\xff\x01\x00\x08#62
[2.231] handleFlashPacket(): Flash write: Address= 0x80002c0, Length=4
[2.231] write(): <316> Tx: $OK#9a
[2.234] read(): <316> Rx: $vFlashWrite:80002c4:\xff\x01\x00\x08#42
[2.234] handleFlashPacket(): Flash write: Address= 0x80002c4, Length=4
[2.234] write(): <316> Tx: $OK#9a
[2.236] read(): <316> Rx: $vFlashDone#ea
[2.236] handleFlashPacket(): Writing to C:\Users\nesher\AppData\Local\Temp\ST-LINK_GDB_server_a04948.srec
[2.241] spawnCubeProgrammer(): ------ Switching to STM32CubeProgrammer -----
[2.242] file_utils_spawn(): Spawning "C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin\STM32_Programmer_CLI.exe --connect port=SWD mode=UR reset=hwRst --download C:\Users\nesher\AppData\Local\Temp\ST-LINK_GDB_server_a04948.srec --verify --log C:\Users\nesher\AppData\Local\Temp\STM32CubeProgrammer_a04948.log"
[2.243] file_utils_spawn(): Return code -1
[2.243] spawnCubeProgrammer(): Encountered Error when opening C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin\STM32_Programmer_CLI.exe
[2.243] spawnCubeProgrammer(): ------ Switching context -----
[2.243] handleFlashPacket(): Error in STM32CubeProgrammer
[2.243] write(): <316> Tx: $E05#aa$E31#53
[2.250] read(): <316> Rx: $qXfer:threads:read::0,bfb#fb
[2.250] stop(): Stopping port 61235
2020-09-10 08:35 AM
Thank you very much to everyone who gave me his answer. I very appreciate it. Yesterday after several tweaks I managed to stun my Windows. After reinstallation of it and installing STM32CubeIDE everything works.