cancel
Showing results for 
Search instead for 
Did you mean: 

Where do I configure the GDB server log level

PHolt.1
Senior III

I have found that on one Cube installation is it 31 and on another it mysteriously changed to 1.

https://peter-ftp.co.uk/screenshots/20210421153074214.jpg

The change may have been triggered by me changing between STLINK V2 and STLINK V3 and trying different options to make V3 work reliably (it doesn't but I will make a separate post on that).

I have been all around the program but can't find it. Presumably it is in some script file, which is generated by the form in the attached image.

6 REPLIES 6
Markus GIRDLAND
ST Employee

Hello!

Do you mean where you activate the gdb server log? That's in the debug configuration "Log to file".

Or if you meant how to activate the ST-LINK gdbserver to add commands such as "verbose"? In that case you can find it at:

C:\ST\STM32CubeIDE_1.6.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.6.0.202101291314\tools\bin

If I misunderstand anything about the question please let me know!

PHolt.1
Senior III

Thank you! I found the (not same) path on my PC and there is a file called config.txt. The relevant line is wholly commented out:

###############################################################

# -l <Log-Level>   : Logging level between 0 & 31

#     0      Disables logging

#     >=1     Enables logging of error messages

#     >=2     Adds warning messages

#     >=4     Adds communication specific messages

#     >=8     Adds all information messages

#     >=16     Adds all HW specific messages

###############################################################

#-l 31

so it must be using some default value. Weird how it got commented out. I changed it to 4 but it still says 31 (on this PC). So it must be using some other value. In the same directory is a batch file st link gdbserver.bat which contains

@echo off

cmd /K "ST-LINK_gdbserver.exe -c config.txt || echo GDB server exited"

The Console output says

STMicroelectronics ST-LINK GDB server. Version 5.8.0

Copyright (c) 2020, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    Logging Level       : 31

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Enabled

    SWD Debug         : Enabled

Target connection mode: Attach

Reading ROM table for AP 0 @0xe00fffd0

Hardware watchpoint supported by the target 

Failed to set com freq, status 0

COM frequency = 24000 kHz

ST-LINK Firmware version : V3J7M2B4S1

Device ID: 0x419

PC: 0x0

ST-LINK device status: RUN_MODE

ST-LINK detects target voltage = 3.28 V

ST-LINK device status: RUN_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

Try halt...

ST-LINK device status: HALT_MODE

Enter STM32_AppReset() function 

NVIC_DFSR_REG = 0x00000008

NVIC_CFGFSR_REG = 0x00000000

Accepted connection on port 61235...

I wonder what the "Failed to set com freq, status 0" means. Anyway, this is the PC on which it is running ok.

PHolt.1
Senior III

I find my stuff under

C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.6.0.202101291314\tools\bin

even though Cube IDE is v1.6.1

but editing the config.txt file there does nothing.

PHolt.1
Senior III

This is the output from the PC with log level =1

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

and this is the config.txt file section (btw found at

C:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.6.0.202101291314\tools\bin )

###############################################################

# -l <Log-Level>   : Logging level between 0 & 31

#     0      Disables logging

#     >=1     Enables logging of error messages

#     >=2     Adds warning messages

#     >=4     Adds communication specific messages

#     >=8     Adds all information messages

#     >=16     Adds all HW specific messages

###############################################################

-l 31

###############################################################

# -p <Port-Number>  : TCP-Listen Port-Number.

###############################################################

-p 61234

###############################################################

# -v         : Enables verbose mode

###############################################################

-v

BUT maybe this refers to a completely different log, not the logging level to the Cube IDE Console.

PHolt.1
Senior III

0693W00000AMz5aQAD.jpgWould anybody have an answer to this? Where is the logging level configured?

PHolt.1
Senior III

Is there nobody here familiar with Cube IDE and STLINK V3?

This is supposed to be a ST support site, no?