Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

调试 STM32F767

说明

  • 本页记录在 Ubuntu 环境中安装 stlink 并处理动态库加载问题的过程.
  • 适合作为 STM32 调试链路与 st-info 环境排障的快速参考.

ubuntu下, 安装stlink驱动

git clone https://github.com/stlink-org/stlink.git

mkdir build && cd build

# sudo apt install libusb-1.0-0-dev

cmake ..

make -j4

sudo make install

sudo systemctl restart udev

st-info --version

如果报错:
    error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory

解决:

    ldd /usr/local/bin/st-info

    发现:
        libstlink.so.1 => not found
    但是, /usr/local/lib/libstlink.so.1, 是存在的

    执行:
        sudo ldconfig
    目的是更新动态链接库缓存, 便于搜索动态库, 问题解决了
    这个可以自定义动态库的路径, 比如 /etc/ld.so.conf