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?

3 REPLIES 3
AScha.3
Chief III

Now i have on my new Siduction Linux PC the new IDE 1.17.0 installed , install without errors.

Fine, then downloaded the Cube packages for the cpus i use, F0, F1, F3, H7 . ok.

Then try a simple test, made empty program for a H7S3...and bad surprise:

- compiler starts with "make j8 all " , but 3 minutes happens nothing !!! then 5 secs or so...ready. no errors.

Very strange....

Then try debug: again , 3 minutes happens nothing (!), then:

AScha3_0-1736618841004.png

Then tried importing a working F303 program, made on same PC, but with (old) MX Linux and IDE 1.13.1, but exactly same result ...

AScha3_2-1736619850888.png

 

In these 3 minutes it makes 100% cpu load on one core (of 8, so about 13% ), so some heavy action...for nothing.

AScha3_1-1736619718339.png

 

 

Maybe it cannot access something, but without any error message - how to find out, whats wrong?

btw , i have also : libncurses.so.6.5   .

So this IDE version is for the trash.

Maybe i delete it and try generic Linux install version, 1.16.1 . Hope, this version will be working ...

If you feel a post has answered your question, please click "Accept as Solution".

I only downloaded the IDE recently, so I did not try out an earlier version. Did it work for you with version 1.16?

Im just downloading ...

+

you could try the generic linux install for 1.17 , because my old IDE here didnt work as "debian" version, but the generic working fine.

-> so we get more info, about: whats working or not.

If you feel a post has answered your question, please click "Accept as Solution".