Advertisement

Ubuntu安装STLINK

阅读量:

STLINK is open source software to program and debug ST’s STM32 Discovery kits. Those kits have an onboard chip that translates USB commands sent by the host PC into JTAG/SWD commands. This chip is called STLINK, (yes, isn’t that confusing? suggest a better name!) and comes in 2 versions (STLINK v1 and v2). From a software point of view, those versions differ only in the transport layer used to communicate (v1 uses SCSI passthru commands, while v2 uses raw USB). From a user point of view, they are identical.

Before continuing, the following dependencies must be met:

  • 1.libusb-1.0
  • 1.1:sudo apt-get install libusb-dev
  • 1.2:sudo apt-get install libusb-1.0-0-dev
  • 2.cmake
  • 2.1:sudo add-apt-repository ppa:george-edison55/cmake-3.x
  • 2.2:sudo apt-get update
  • 2.3:sudo apt-get install cmake

STLINK should run on any system meeting the above constraints.

The STLINK software source code is retrieved using:

复制代码
    $>:3:git clone https://github.com/texane/stlink.git

Everything can be built from the top directory:

复制代码
    $> 4:cd stlink
复制代码
    $: 5:make
复制代码
    $> 6:cd build/Release && make install DESTDIR=_install
复制代码
    7:将st-flash复制到/usr/bin下就可使用sudo st-flash write test.bin 0x8000000下载程序了
复制代码
    It includes:
  • a communication library (libstlink.a),
    • a GDB server (st-util),
    • a flash manipulation tool (st-flash).
    • a programmer and chip information tool (st-info)

全部评论 (0)

还没有任何评论哟~