-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathburn
49 lines (48 loc) · 990 Bytes
/
burn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
st-flash write build/combo.bin 0x08000000 2>.tmp | tee .tmp2
echo "_________"
if grep "unknown chip" .tmp
then
echo "
**************************
* ERROR: Did not burn!! *
* No module detected *
**************************
"
elif grep "ERROR" .tmp
then
echo "
*****************************
* ERROR: Did not burn!! *
* Flip power on at the same *
* time you ./burn *
*****************************
"
elif grep "== -1" .tmp2
then
echo "
**************************
* ERROR: Did not burn!! *
**************************
"
elif grep "failed" .tmp
then
echo "
***************************
* ERROR: No st-link found *
***************************
"
elif grep "Flash written and verified! jolly good!" .tmp
then
echo "
Success!!
"
else
cat .tmp
cat .tmp2
echo "
***********************
Not sure what happened?
unknown response
***********************
"
fi