码迷,mamicode.com
首页 > 系统相关 > 详细

openocd shell脚本

时间:2019-03-29 20:39:46      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:timeout   bsp   boa   file   open   expect   kill   usr   grep   

openocd.sh

 

#! /usr/bin/expect
set timeout 30
spawn su
expect "密码:"
send "123456\r"
send "./killopenocd.sh\r"
send "openocd --file ./board/ek-lm3s8962.cfg\r"
interact

 

killopenocd.sh

#! /bin/bash
kill -9 `ps -ef|grep ‘openocd --file‘|grep -v grep|awk ‘{print $2}‘`

openocd shell脚本

标签:timeout   bsp   boa   file   open   expect   kill   usr   grep   

原文地址:https://www.cnblogs.com/arci/p/10623729.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!