diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2017-05-11 11:36:52 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2017-05-11 11:36:52 +0200 |
commit | 8665bdbf682bdff02576a6f4393f09bc56572043 (patch) | |
tree | 54b1f51c0b3e5f5dd577720a9cd54e28be19d97f /launch-openocd | |
parent | eabbd037f5f605a9ecf06185cd62594eb4564bce (diff) | |
download | radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.tar.gz radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.tar.bz2 radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.tar.xz radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.zip |
wip
Diffstat (limited to 'launch-openocd')
-rwxr-xr-x | launch-openocd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/launch-openocd b/launch-openocd new file mode 100755 index 0000000..18b30b2 --- /dev/null +++ b/launch-openocd @@ -0,0 +1,16 @@ +#!/bin/sh + +stlinkv2=$(lsusb -d 0483:374b | wc -l) +olimex=$(lsusb -d 15ba:002a | wc -l) + +DEVICE= +if [ $stlinkv2 -gt 0 ] +then + DEVICE=stlinkv2 +elif [ $olimex -gt 0 ] +then + DEVICE=olimex-arm-usb-tiny-h +fi + +export DEVICE +exec openocd -f openocd.cfg |