STM32CubeIDE + NUCLEO-STM32G4 : can't program FLASH. Is this related to STLINK-V3?
I am trying to carry out a project with a NUCLEO-STM32G431 board.
With STM32CubeProgrammer I can program the MCU without problem.
But with STLM32CubeIDE I cannot program the flash.
STM32CubeIDE 1.8 freshly installed (as I could not achieve anything I reinstalled everything).
I create a new project: File / New / STM32 project ...
Without touching anything I compile it without problem. Then I try Debug, which creates the debug configuration and runs it.
(during the first tests the software of the STLINK-V3 was updated)
I get the message:
Error in final launch sequence:
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
localhost:61234: Le système a tenté de joindre un lecteur à un répertoire stocké sur un lecteur joint.
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
localhost:61234: Le système a tenté de joindre un lecteur à un répertoire stocké sur un lecteur joint.
localhost:61234: Le système a tenté de joindre un lecteur à un répertoire stocké sur un lecteur joint.The debugger log file:
[0.000] initConfigParams(): Configuration flags start
[0.000] initConfigParams(): external-init false
[0.000] initConfigParams(): pend-halt-timeout (null)
[0.000] initConfigParams(): halt false
[0.000] initConfigParams(): config-file ""
[0.000] initConfigParams(): persistent false
[0.001] initConfigParams(): +log-file "G:\STM32_CubeIDE\AdAstraCubeWs\G431\Debug\st-link_gdbserver_log.txt"
[0.001] initConfigParams(): +log-level 31
[0.001] initConfigParams(): +port-number 61234
[0.001] initConfigParams(): +verbose true
[0.001] initConfigParams(): refresh-delay 15
[0.001] initConfigParams(): +verify true
[0.001] initConfigParams(): +swd true
[0.001] initConfigParams(): swo-port 61234
[0.001] initConfigParams(): cpu-clock 8000000
[0.001] initConfigParams(): swo-clock-div 128
[0.001] initConfigParams(): +initialize-reset true
[0.001] initConfigParams(): debuggers false
[0.001] initConfigParams(): serial-number ""
[0.001] initConfigParams(): +apid 0
[0.001] initConfigParams(): attach false
[0.001] initConfigParams(): shared false
[0.001] initConfigParams(): erase-all false
[0.001] initConfigParams(): memory-map ""
[0.001] initConfigParams(): ext-memory-loaders false
[0.001] initConfigParams(): extload ""
[0.001] initConfigParams(): +stm32cubeprogrammer-path "C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin"
[0.001] initConfigParams(): temp-path ""
[0.001] initConfigParams(): preserve-temps false
[0.001] initConfigParams(): frequency -1
[0.001] initConfigParams(): licenses false
[0.001] initConfigParams(): ignore-rest false
[0.001] initConfigParams(): version false
[0.001] initConfigParams(): help false
[0.001] initConfigParams(): Configuration flags end
[0.003] init(): STMicroelectronics ST-LINK GDB server. Version 6.0.0
Copyright (c) 2021, STMicroelectronics. All rights reserved.
[0.019] openDevice(): COM frequency = 24000 kHz
[0.019] openDevice(): Target connection mode: Under reset
[0.030] readFromTarget(): Reading ROM table for AP 0 @0xe00fffd0
[0.034] reset_hw_wtchpt_module(): Hardware watchpoint supported by the target
[0.038] initContext(): ST-LINK Firmware version : V3J9M3
[0.039] initContext(): Device ID: 0x468
[0.039] initContext(): PC: 0x800022c
[0.040] Device_GetStatus(): ST-LINK device status: HALT_MODE
[0.041] initContext(): ST-LINK detects target voltage = 3.30 V
[0.041] initContext(): ST-LINK device status: HALT_MODE
[0.042] initServerContext(): ST-LINK device initialization OK
[0.042] pollAndNotifyRun(): Stm32Device, pollAndNotify running...
[0.046] updateState(): SwvSrv state change: 0 -> 1
[0.046] WaitConnection(): Waiting for connection on port 61234...
[0.046] WaitConnection(): Waiting for connection on port 61235...
[18.354] WaitConnection(): Accepted connection on port 61234...
[18.355] WaitConnection(): Waiting for connection on port 61234...
[18.355] run(): GDB session thread running
[18.355] handleSessionEvent(): GdbSessionManager, session started: 1
[18.356] run(): GDB session terminated: Client connection lost
[18.356] handleSessionEvent(): GdbSessionManager, session terminated: 1
[18.356] handleSessionEvent(): GdbSrv, master session terminated, signal dispose
[18.356] stop(): Stopping port 61234
[18.386] cleanup(): Cleanup session: 1
[18.386] ~GdbSession(): GDB session disposed: 1
[18.464] WaitConnection(): Received stop for port 61234, not accepting new connections.
[18.464] deInit(): GdbSrv, deInit entry.
[18.464] deInit(): GdbSessionManager, deInit entry.
[18.496] deInit(): GdbSessionManager, deInit exit
[18.496] deInit(): SwvSrv deInit entry
[18.496] stop(): Stopping port 61235
[18.497] stop(): Stopping port 61234
[18.604] WaitConnection(): Received stop for port 61235, not accepting new connections.
[18.604] deInit(): SwvSrv deInit exit
[18.604] closeDevice(): Stm32Device, closeDevice() entry
[18.711] pollAndNotifyRun(): Stm32Device, pollAndNotify stopped
[18.719] closeDevice(): Stm32Device, closeDevice() exit
[18.719] deInit(): Stm32Device, deInit success
[18.719] deInit(): GdbSrv, deInit exit.Same thing with NUCLEO-STM32G491
My other NUCLEO boards with STLINK-V2-1 have no problem
With TrueSTUDIO it's even more curious:
With NUCLEO-STM32G431 no problem
With NUCLEO-STM32G491 the FLASH is not programmed, but I can debug the program flashed by STM32CubeProgrammer !!!!
See joined TrueSTUDIO debugger log files
Has anyone had this problem or can suggest a solution?
Thank you
