Skip to content

Commit f84b669

Browse files
committed
Convert to keyboard-driven Xilinx chip flasher
1 parent 755bab7 commit f84b669

File tree

7 files changed

+88
-87
lines changed

7 files changed

+88
-87
lines changed

install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
set -o errexit
24
set -o xtrace
35

@@ -31,8 +33,7 @@ mkdir Guzunty
3133
sudo make install
3234
)
3335

34-
# update tingbot-python to get backlight support
35-
sudo pip install tingbot-python==0.5.0
36+
sudo cp tingbot-flasher.service /lib/systemd/system
37+
sudo systemctl enable tingbot-flasher.service
3638

37-
sudo raspi-config --expand-rootfs
3839
sudo shutdown -r now

install2.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

restart

Lines changed: 0 additions & 5 deletions
This file was deleted.

startup

Lines changed: 0 additions & 24 deletions
This file was deleted.

tbflash

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
3+
cd "$(dirname "$(realpath "$0")")"
4+
5+
while true; do
6+
clear
7+
echo ""
8+
echo ""
9+
echo ""
10+
echo " _ _ _ _ "
11+
echo " | | (_) | | | | "
12+
echo " | |_ _ _ __ __ _| |__ ___ | |_ "
13+
echo " | __| | '_ \ / _ | '_ \ / _ \| __| "
14+
echo " | |_| | | | | (_| | |_) | (_) | |_ "
15+
echo " \__|_|_| |_|\__, |_.__/ \___/ \__| "
16+
echo " __/ | "
17+
echo " |___/ "
18+
echo ""
19+
echo ""
20+
echo " Tingbot's Xilinx chip flashing program"
21+
echo ""
22+
echo " Version 1.0"
23+
echo ""
24+
echo " Press return to start flashing a Xilinx chip."
25+
echo ""
26+
echo ""
27+
echo ""
28+
echo ""
29+
30+
read -s
31+
32+
sudo gz_load /home/pi/Guzunty/Pi/src/gz_lcd/gz_lcd.xsvf
33+
34+
return_code=$?
35+
36+
if [[ $return_code -ne 0 ]]; then
37+
echo ""
38+
echo ""
39+
echo ""
40+
echo ""
41+
echo " XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX"
42+
echo ""
43+
echo " Failed to flash Xilinx chip."
44+
echo ""
45+
echo " XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX"
46+
echo ""
47+
echo " Please check the chip is correctly connected and try again."
48+
echo ""
49+
echo " Press return to continue."
50+
echo ""
51+
echo ""
52+
echo ""
53+
else
54+
echo ""
55+
echo ""
56+
echo ""
57+
echo ""
58+
echo " Success!"
59+
echo ""
60+
echo " Press return to continue."
61+
echo ""
62+
echo ""
63+
echo ""
64+
fi
65+
66+
read -s
67+
done;
68+
69+
sudo shutdown -r now

test_routine.tingapp/main.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

tingbot-flasher.service

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Unit]
2+
Description=Tingbot flasher
3+
After=getty.target
4+
Conflicts=getty@tty1.service
5+
6+
[Service]
7+
Type=oneshot
8+
RemainAfterExit=yes
9+
ExecStart=/usr/bin/tbflash
10+
StandardInput=tty-force
11+
StandardOutput=inherit
12+
StandardError=inherit
13+
14+
[Install]
15+
WantedBy=graphical.target

0 commit comments

Comments
 (0)