cancel
Showing results for 
Search instead for 
Did you mean: 

"Could not determine GDB version" in STM32CubeIDE on Kali Linux

D4n13l
Visitor

Initially I downloaded the Debian version of the IDE. Now I am using the generic Linux version. In both versions I could build the project, but in neither one of them could I run the program. I kept getting the error: Could not determine GDB version.

D4n13l_1-1736607106878.png

I tried to see where is the cross-compiler in use: Project -> Properties -> C/C++ Build -> Environment. Here the PATH variable is different from the system's PATH variable, having the following value:

 

 

 

/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin:/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.make.linux64_2.2.0.202409170845/tools/bin:/home/daniello92/.local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/daniello92/.dotnet/tools:/snap/bin

 

 

 

I supposed that the cross-compiler is taken from the PATH, so I went ahead and tested the GDB found in the PATH:

 

 

 

$ /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb ~/STM32CubeIDE/ProjectX/Debug/wave.elf

/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.3.20021019' not found (required by /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb)
/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.1.20000708' not found (required by /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb)
/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.6.20061217' not found (required by /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb)
/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.0.19991023' not found (required by /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb)
/opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libtinfo.so.5: version `NCURSES_TINFO_5.0.19991023' not found (required by /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/arm-none-eabi-gdb)

 

 

 

From the output I concluded, that I have a problem with libncurses package. On my Linux I have libncurses.so.6.5 and the lower versions point to this one:

 

 

 

$ ls -l /usr/lib/x86_64-linux-gnu/libncurses*   

-rw-r--r-- 1 root root 162380 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncurses++.a
-rw-r--r-- 1 root root 162380 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncurses++w.a
-rw-r--r-- 1 root root 323124 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncurses.a
-rw-r--r-- 1 root root     31 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncurses.so
lrwxrwxrwx 1 root root     17 Jan  2 21:29 /usr/lib/x86_64-linux-gnu/libncurses.so.5 -> libncurses.so.6.5
lrwxrwxrwx 1 root root     17 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncurses.so.6 -> libncurses.so.6.5
-rw-r--r-- 1 root root 169984 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncurses.so.6.5
-rw-r--r-- 1 root root 442286 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncursesw.a
-rw-r--r-- 1 root root     32 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncursesw.so
lrwxrwxrwx 1 root root     18 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncursesw.so.6 -> libncursesw.so.6.5
-rw-r--r-- 1 root root 235520 Oct 29 06:36 /usr/lib/x86_64-linux-gnu/libncursesw.so.6.5

 

 

 

I did not know how to resolve the issue, so I downloaded a newer version of the Arm GNU Toolchain. This worked in the terminal:

 

 

 

$ arm-none-eabi-gdb ~/STM32CubeIDE/ProjectX/Debug/wave.elf

GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.10) 10.2.90.20210621-git
Copyright (C) 2021 Free Software Foundation, Inc.                                                                       
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ~/STM32CubeIDE/ProjectX/Debug/wave.elf...
(gdb) 

 

 

 

I tried 2 methods to make the IDE use this version.

First:

 

 

 

$ cd /opt/st/stm32cubeide_1.17.0/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.1.0.202410170702/tools/bin/
$ mv arm-none-eabi-gdb arm-none-eabi-gdb_bck
$ mv arm-none-eabi-gcc arm-none-eabi-gcc_bck
$ mv arm-none-eabi-g++ arm-none-eabi-g++_bck
$ ln -s /usr/bin/arm-none-eabi-g++ .
$ ln -s /usr/bin/arm-none-eabi-gcc .
$ ln -s /usr/bin/arm-none-eabi-gdb .

 

 

 

Second:

Changed the order in the IDE PATH variable, making /usr/bin the first.

 

Neither one of these solutions worked. Do you have any idea why? What could I do to flash my STM board?

0 REPLIES 0