在ubuntu24.02下arm-none-eabi-gdb无法运行。
在STLINK驱动、OPENOCD配置正确的情况下,在STM32CUBEIDE中开启openocd调试或者直接使用命令arm-none-eabi-gdb ./xxx.elf
调试会得出如下错误
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.3.20021019' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.1.20000708' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.6.20061217' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5: version `NCURSES_5.0.19991023' not found (required by arm-none-eabi-gdb)
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libtinfo.so.5: version `NCURSES_TINFO_5.0.19991023' not found (required by arm-none-eabi-gdb)
或者
arm-none-eabi-gdb: /lib/x86_64-linux-gnu/libncurses.so.5 not found
这是因为ubuntu24.02没有libncurses5导致,apt也无法直接下载ubuntu24版本的,摸索结果是只能下载以前版本的。
前往 https://pkgs.org/ 搜索libncurses5下载安装
对应软件包及前置软件包下载地址,推荐用终端安装可以看到安装失败原因 sudo dpkg -i xxx.deb
https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/libtinfo5_6.2-0ubuntu2_amd64.deb.html
https://ubuntu.pkgs.org/22.04/ubuntu-updates-universe-amd64/libncurses5_6.3-2ubuntu0.1_amd64.deb.html
安装之后无法烧录与无法调试的问题可以解决