【问题标题】:Failing to enable stlink in openOCD无法在 openOCD 中启用 stlink
【发布时间】:2017-04-22 21:48:40
【问题描述】:

我正在尝试通过配置 openOCD 来启用 stlink。它是说它找不到我的 libusb-1.x 文件,即使它是通过安装 openOCD 安装的,因为它是一个依赖项。我不知道该怎么办

这是错误:

checking for LIBUSB1... no
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as        
a fallback; consider installing libusb-1.x instead
checking for LIBUSB0... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for LIBFTDI... no
checking for LIBFTDI... no
checking for LIBJAYLINK... no
configure: error: libusb-1.x is required for the ST-Link JTAG Programmer

这是我的输入:

./configure --enable-stlink

我能做些什么来解决这个问题?

谢谢

【问题讨论】:

    标签: microcontroller openocd


    【解决方案1】:

    您可以尝试通过以下方式安装 libusb

    sudo apt-get install libusb-1.0-0-dev

    【讨论】:

      【解决方案2】:

      首先,安装缺少的依赖项,然后配置 openOCD,同时启用维护者模式和 FTDI 支持。

      通过这样做,您仍然可以将 STM32 uC 与 ST-Link 和 FTDI 连接,但您将失去 JTAG 支持,但对于非硬核的东西来说没关系。

      sudo apt-get install libusb-1.0.0-dev
      ./configure --enable-maintainer-mode --enable-ftdi
      

      【讨论】:

        【解决方案3】:

        就我而言,我必须安装pkg-config,它突然没有安装在我的系统中。 然后这个错误就消失了。

        sudo apt install pkg-config
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2018-07-28
          • 2018-03-02
          • 2021-06-06
          • 1970-01-01
          • 1970-01-01
          • 2017-04-27
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多