make flash 报错解决。

环境:ubuntu16.04 &&STM32

ROS:kinetic 

在ROS与STM32通信烧录的过程遇到如下报错。

st-flash --reset write main.bin 0x8000000
st-flash: error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory
Makefile.include:128: recipe for target 'flash' failed
make: *** [flash] Error 127

dhy@Deng:~/stm32_project/src/stm32f103rc_rosserial$ make flash
st-flash --reset write main.bin 0x8000000
st-flash: error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory
Makefile.include:128: recipe for target 'flash' failed
make: *** [flash] Error 127

解决方案:

export LD_LIBRARY_PATH=/usr/local/lib

然后

make flash

正常烧录。

 执行效果如下:

st-flash --reset write main.bin 0x8000000
st-flash 1.4.0-47-gae717b9
2018-08-16T16:25:41 INFO usb.c: -- exit_dfu_mode
2018-08-16T16:25:41 INFO common.c: Loading device parameters....
2018-08-16T16:25:41 INFO common.c: Device connected is: F1 High-density device, id 0x10036414
2018-08-16T16:25:41 INFO common.c: SRAM size: 0x10000 bytes (64 KiB), Flash: 0x80000 bytes (512 KiB) in pages of 2048 bytes
2018-08-16T16:25:41 INFO common.c: Attempting to write 47084 (0xb7ec) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x0800b000 erased
2018-08-16T16:25:42 INFO common.c: Finished erasing 23 pages of 2048 (0x800) bytes
2018-08-16T16:25:42 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2018-08-16T16:25:42 INFO flash_loader.c: Successfully loaded flash loader in sram
 23/23 pages written
2018-08-16T16:25:46 INFO common.c: Starting verification of write complete
2018-08-16T16:25:47 INFO common.c: Flash written and verified! jolly good!

 截图如下:

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值