cancel
Showing results for 
Search instead for 
Did you mean: 

After updating CubeIDE to version 1.4.0 (Linux), the debugger does not work.

AKova.2
Associate II

0693W000003BtojQAC.pngAfter updating CubeIDE to version 1.4.0 (Linux), the debugger does not work.

A window appears

 "ST-LINK firmware verification"

in which there is a message - "STLink server is required to launch the debug session".

How to fix it?

29 REPLIES 29
AKova.2
Associate II

Downloaded libstlinkusbdriver.so copied to lib folder.

Run:

ST-LINK_gdbserver -p 61234 -l 1 -d -s -cp /opt/st/stm32cubeide_1.4.0/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_1.4.0.202007081208/tools/bin - m 0 -k

Result:

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

Failed to bind to port 61234, error code -1: Address already in use

Failure starting GDB server: TCP port 61234 not available.

AKova.2
Associate II

As it turned out

libstlinkusbdriver.so is in the folder

/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_1.4.0.202007081208/tools/bin/native/

Copied it to lib folder.

Result:

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...

And everything is frozen.

The green LED on the debugger came on.

After reconnecting, the result is the same.

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

Failed to bind to port 61234, error code -1: Address already in use

Failure starting GDB server: TCP port 61234 not available.

In the program itself, no changes. When trying to debug, the same message.

"STLink server is required to launch the debug session".

LaurentL
ST Employee

You must install v1.4.0 with cubeide installer to have the STLink server installed correctly.

If you update from v1.3.0, the stlink server won't be installed, only plugins will be updated to v1.4.0

AKova.2
Associate II

In the three posts above, I told you what happens when i install version 1.4.0 downloaded from the official site and updated to version 1.4.2.

Everything after version 1.3.0 does not work.

The program simply does not see the STLink server, although it is present in the system. But it does not even start manually because it does not see the libstlinkusbdriver.so file, which is also present. Why? I don’t understand. I reinstalled Linux many times, tried to change the kernel, tried to run the installer (and program) with root rights ... everything is confusing.

LaurentL
ST Employee

You are talking about 2 different software, stlinkserver and stlink gdb server.

stlinkserver is installed in its own (outside cubeIde) and is now needed for cubeIde 1.4.0.

stlink gdb server is installed in plugins of CubeIde and can have different version in cubeIde updates.

Do as KnarfB wrote and report your install log as he did.

You should have stlinkserver v1.3.0-4 and cubeide 1.4.0.

Pasting again its install log:

  1. $ sudo '/home/frank/Downloads/st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.deb_bundle.sh'
  2. Creating directory st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.deb_bundle.sh.root
  3. Verifying archive integrity... All good.
  4. Uncompressing STM32CubeIDE installer 100%
  5. STMicroelectronics Software License Agreement
  6. ...
  7. License accepted.
  8. (Reading database ... 440631 files and directories currently installed.)
  9. Preparing to unpack st-stlink-server-1.3.0-4-linux-amd64.deb ...
  10. stlink-server: no process found
  11. Unpacking st-stlink-server (1.3.0-4) over (1.2.0-3) ...
  12. Preparing to unpack st-stlink-udev-rules-1.0.2-3-linux-all.deb ...
  13. Unpacking st-stlink-udev-rules (1.0.2-3) over (1.0.2-2) ...
  14. Selecting previously unselected package st-stm32cubeide-1.4.0.
  15. Preparing to unpack st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.deb ...
  16. Unpacking st-stm32cubeide-1.4.0 (1.4.0-7511-20200720-0928-1) ...
  17. Setting up st-stlink-server (1.3.0-4) ...
  18. Setting up st-stlink-udev-rules (1.0.2-3) ...
  19. Setting up st-stm32cubeide-1.4.0 (1.4.0-7511-20200720-0928-1) ...
  20. /
  21. Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
  22. Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
  23. Processing triggers for mime-support (3.60ubuntu1) ...
  24. Do you want to install Segger J-Link udev rules? [Y/n] n
  25. STM32CubeIDE installed successfully

Maybe this manjaro linux distrib has issues, I don't know.

Yes, the problem is in the installation. STLink-Server is not installed, but because the installer reports that STLink-Server is already installed on the system (????).

But how is this possible? The program was installed on a freshly installed ("clean") Linux.

 install log:

$ sudo sh /home/alex/st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.sh 

Creating directory st-stm32cubeide_1.4.0_7511_20200720_0928_amd64.sh.root

Verifying archive integrity... All good.

Uncompressing STM32CubeIDE 1.4.0 installer 100%  

STMicroelectronics Software License Agreement

........

...........

I ACCEPT (y) / I DO NOT ACCEPT (N) [N/y] y

License accepted.

STM32CubeIDE install dir? [/opt/st/stm32cubeide_1.4.0] /home/alex/MyPrograms/st/stm32cubeide_1.4.0

Installing STM32CubeIDE into /home/alex/MyPrograms/st/stm32cubeide_1.4.0 ...

Java cacerts symlinked to /etc/ssl/certs/java/cacerts

Creating directory root

Verifying archive integrity... All good.

Uncompressing STM udev rules installer 100%  

Package installed.

Creating directory root

Verifying archive integrity... All good.

Uncompressing STM STLink-Server installer 100%  

stlink-server v1.3.0-4 (2020-01-29-14:16) installation started.

Already installed version is newer or equal: line 63:

NOT downgrading. Aborting stlink-server installation.

Do you want to install Segger J-Link udev rules? [Y/n] y

Important - Read carefully:

.........................

..........................

I ACCEPT (y) / I DO NOT ACCEPT (N) [N/y] y

License accepted.

Creating directory makeself_dir_rPmjhT

Verifying archive integrity... All good.

Uncompressing SEGGER J-Link udev rules installer 100%  

STM32CubeIDE installed successfully

OK, so maybe try to uninstall stlinkserver and cubeide as KnarfB wrote:

$ sudo apt remove 'st-stm32cubeide*' 'st-stlink*'

and redo the cubeIde install to see if it still sees stlinkserver already installed.

Manjaro is based on Arch Linux, these commands don't work.

I cannot find the stlink-server installed on the system to uninstall it.

The program folder contains the uninstall.sh file.

I run it:

sudo sh /home/alex/MyPrograms/st/stm32cubeide_1.4.0/uninstall.sh

Uninstall SEGGER J-Link udev rules? [N/y] y

Uninstall ST-LINK udev rules? [N/y] y

Uninstall stlink-server? [N/y] y

Remove STM32CubeIDE desktop shortcut [N/y] y

Removing STM32CubeIDE...

When i reinstall the program, the  install log is the same ...:persevering_face:

AKova.2
Associate II

The problem was solved.

I downloaded the stlink server from the official site. Using "debtab" I converted the deb package into an Arch package and installed it. Then I installed the ncurses5 package which was missing. And only after that it worked. Hooray.

Many thanks to everyone who tried to help me. Good luck to everyone.

Breakthecake
Associate II

interesting what Akova2 wrote. I use Mac OS 10.15.6 and do not understand everything, mainly "converting the deb package into an Arch package…". Does anybody have an idea how to solve the problem on Mac?

Thanks for any help!

Have a good day.