cancel
Showing results for 
Search instead for 
Did you mean: 

Can't debug - no such file or directory

leamrl
Associate

Hello,

I recently bought a NUCLEO-F412ZG and shortly downloaded STM32CubeIDE.

However, I only tried to debug and launch the generated program, without changing anything, and came across this error message :

leamrl_0-1720533244736.png

Checked the path, all is good. I can't seem to compile any project.

Here are the logs from st-link_gdbserver_log.txt :

[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.000] initConfigParams(): +log-file "C:\Users\xxx\Documents\STM32\First\Debug\st-link_gdbserver_log.txt"
[0.000] initConfigParams(): +log-level 31
[0.009] initConfigParams(): +port-number 61234
[0.009] initConfigParams(): +verbose true
[0.009] initConfigParams(): refresh-delay 15
[0.009] initConfigParams(): +verify true
[0.009] initConfigParams(): +swd true
[0.009] initConfigParams(): swo-port 61234
[0.009] initConfigParams(): cpu-clock 8000000
[0.009] initConfigParams(): swo-clock-div 128
[0.009] initConfigParams(): +initialize-reset true
[0.009] initConfigParams(): debuggers false
[0.009] initConfigParams(): serial-number ""
[0.009] initConfigParams(): +apid 0
[0.009] initConfigParams(): attach false
[0.009] initConfigParams(): shared false
[0.009] initConfigParams(): erase-all false
[0.009] initConfigParams(): memory-map ""
[0.009] initConfigParams(): ext-memory-loaders false
[0.009] initConfigParams(): extload_init (null)
[0.009] initConfigParams(): extload (null)
[0.009] initConfigParams(): +stm32cubeprogrammer-path "C:\ST\STM32CubeIDE_1.15.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.201.202404072231\tools\bin"
[0.009] initConfigParams(): temp-path ""
[0.009] initConfigParams(): preserve-temps false
[0.009] initConfigParams(): frequency 0
[0.009] initConfigParams(): licenses false
[0.009] initConfigParams(): ignore-rest false
[0.009] initConfigParams(): version false
[0.009] initConfigParams(): help false
[0.009] initConfigParams(): Configuration flags end
[0.010] init(): STMicroelectronics ST-LINK GDB server. Version 7.7.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.
[0.077] openDevice(): COM frequency = 4000 kHz
[0.077] openDevice(): Target connection mode: Under reset
[0.085] readFromTarget(): Reading ROM table for AP 0 @0xe00fffd0
[0.088] reset_hw_wtchpt_module(): Hardware watchpoint supported by the target
[0.091] initContext(): ST-LINK Firmware version : V2J45M30
[0.092] initContext(): Device ID: 0x441
[0.092] initContext(): PC: 0x800893c
[0.092] Device_GetStatus(): ST-LINK device status: HALT_MODE
[0.092] initContext(): ST-LINK detects target voltage = 3.24 V
[0.093] initContext(): ST-LINK device status: HALT_MODE
[0.093] initServerContext(): ST-LINK device initialization OK
[0.093] pollAndNotifyRun(): Stm32Device, pollAndNotify running...
[0.095] updateState(): SwvSrv state change: 0 -> 1
[0.095] WaitConnection(): Waiting for connection on port 61234...
[0.095] WaitConnection(): Waiting for connection on port 61235...
[2.142] stop(): Stopping port 61234
[2.172] WaitConnection(): Received stop for port 61234, not accepting new connections.
[2.172] deInit(): GdbSrv, deInit entry.
[2.172] deInit(): GdbSessionManager, deInit entry.
[2.282] deInit(): GdbSessionManager, deInit exit
[2.282] deInit(): SwvSrv deInit entry
[2.282] stop(): Stopping port 61235
[2.391] WaitConnection(): Received stop for port 61235, not accepting new connections.
[2.391] deInit(): SwvSrv deInit exit
[2.391] closeDevice(): Stm32Device, closeDevice() entry
[2.502] pollAndNotifyRun(): Stm32Device, pollAndNotify stopped
[2.507] closeDevice(): Stm32Device, closeDevice() exit
[2.507] deInit(): Stm32Device, deInit success
[2.507] deInit(): GdbSrv, deInit exit.

 

I tried other ports and rebooting, same error message and logs.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Does the file exist?

If the build didn't complete there will be no output files to debug.

Watch for spaces or odd characters in files names and directory paths. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

Does the file exist?

If the build didn't complete there will be no output files to debug.

Watch for spaces or odd characters in files names and directory paths. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist III

Do you have a folder name with a space in it; eg, "first example" or "first project" ... ?

:thinking_face:

Spaces in file names (including folder names) are best avoided!

https://www.avrfreaks.net/s/topic/a5C3l000000UXElEAO/t141557?comment=P-1144660 

https://www.avrfreaks.net/s/topic/a5C3l000000UY8vEAG/t145039?comment=P-1182240

 

And the answer was odd characters :)) I have a "é" in my session name. Tried it in C:/ and it worked. Thank you very much !