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}'`

相关文章:

  • 2021-04-27
  • 2021-11-02
猜你喜欢
  • 2021-12-31
  • 2021-09-07
  • 2021-11-30
  • 2021-12-30
  • 2021-11-13
相关资源
相似解决方案