I installed the ST-Link GDB server from the ST webpage (link)
ST created "ST-Link Server" (link) which bridges the architecture gap and enables us to comfortably monitor and debug the "running binary" (arm
architecture) on our workstation PC (x86
or x86_64
architercture) using the "GDB" debugger.
To install the "ST-Link Server" I first download it's .zip
file that I can get on the bottom of the page that i linked in the previous paragraph:
Then I uncompress it and run the .msi
file that can be found in the compressed file structure. Note that installation wizard will install a command line tool stlinkserver.exe
inside the folder:
/mnt/c/Program\ Files\ \(x86\)/STMicroelectronics/stlink_server/
So I move inside and prompt for help:
ziga@EN3310278:~$ cd /mnt/c/Program\ Files\ \(x86\)/STMicroelectronics/stlink_server/
ziga@EN3310278:stlink_server$ ./stlinkserver.exe --help
stlink-server
--help | -h display this help
--version | -v display STLinkserver version
--port | -p set tcp listening port
--debug | -d set debug level <0-5> (incremental, 0: Error, 1:Info, 2:Warning, 3:STlink, 4:Debug, 5:Usb)
--auto-exit | -a exit() when there is no more client
--log_output | -l redirect log output to file <name>
There are very little parameters listed! Weird... Also useless... This seemed weird to me so I investigated further.
"ST-Link Server" has a nice documentation "UM2576" (link). But in the documentation there are more parameters listed than stlinkserver.exe
returns to us.
At this point I was so confused that I tried executing one parameter i.e. -g
listed in the "UM2576" and application really failed to recognize the parameter:
ziga@EN3310278:stlink_server$ ./stlinkserver.exe -g
stlinkserver.exe: unknown option -- g
Info : default port : 7184
Info : 127.0.0.1:7184
Info : ctrl_handler 0
Ctrl-C event
What is going on with ST? Why doesn't the "ST-Link GDB server" work? How do you use it? I am really confused... And most importantly... I can not connect to my board?
Should I just throw in the towel and use J-Link or OpenOCD???
ST-link server and ST-link GDB server are two different pieces of software.
ST-link server is a tool for sharing a debug adaptor between multiple programs, for example an IDE debugger and command-line programmer. It owns the USB connection and other programs connect to it over sockets.
ST-link GDB server is the server portion of the GNU debugger, configured to use an ST-link adaptor.
If you read the documentation for one and install the other I would expect the arguments not to match up!