ubuntu 下编译安装openocd,及其找不到st | 您所在的位置:网站首页 › openocd源码安装 › ubuntu 下编译安装openocd,及其找不到st |
Ubuntu环境下openocd编译安装及bootloader下载
编译安装openocd
进入openocd-0.10.0 目录 (cd XX/bootloader/openocd-0.10.0)配置文件(./configure --enable-stlink)
如果提示ST-Link JTAG Programer yes 表示stlink配置完成。否则跳转到最后问题解决。 编译源代码( sudo make )输入密码后开始编译 安装openocd (sudo install )输入密码后开始安装 bootloader烧写 将st-link连接上飞控,再连接上电脑。打开命令行(ctrl alt t)openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase /home/zcb/bootloader/xxx.bin 0x08000000" -c "reset run" -c shutdown出现 adapter speed:2000kHz Shutdown command invoked 表示下载成功。 若出现找不到st-link,则为st-link接口未配置编译安装导致的。以下是解决方法。 问题解决 若出现st-link配置失败 打开命令行窗口(ctrl alt t),输入sudo apt-get install libudev-dev (输入密码后运行)
进入libusbx-1.0.17文件夹中 (cd XX/bootloader/libusbx-1.0.17) ./configure 配置sudo make 编译sudo install 安装返回openocd-0.10.0文件夹中重新配置即可。
|
CopyRight 2018-2019 实验室设备网 版权所有 |