在ubuntu上面的stlink驱动的安装:
依赖包的安装:
sudo apt-get install libusb-1.0
sudo apt-get install cmake
sudo apt-get install libgtk-3-dev
下载源码
git clone https://github.com/texane/stlink.git
编译
1.cd stlink
2.make release
3.make debug
4.cd build
5.cmake -DCMAKE_BUILD_TYPE=Debug ..
6.make
7.cd release
8.sudo make install
9.cd .. (回到stlink目录下)
10.sudo cp etc/udev/rules.d/49-stlinkv2.rules /etc/udev/rules.d/
11.udevadm control –reload-rules
12.udevadm trigger
13./opt/bin添加到环境变量中
sudo vim ~/.bashrc在文件末尾添加:
export PATH=$PATH:/opt/bin/
测试
重启后打开终端:
运行st-info –version命令
会看到类似如下提示:
v1.2.0-166-g77acc50