-
Notifications
You must be signed in to change notification settings - Fork 1
/
lao-kernels-tirex.sh
45 lines (31 loc) · 1.33 KB
/
lao-kernels-tirex.sh
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
#!/bin/sh
#
# Temporary wrapper for open64 / LAO / Tirex pipe
#
## Only for lao_kernels
# Generate tirex files
for s in src/*.c ; do echo "Generationg `basename $s .c`.tirex" ; ~/work/tools/devimage/st200tools/bin/st200cc -O1 -CG:LAO_optim=0 -I inc -X $s ; done
# Generate assembly files
for t in *.tirex ; do echo "Generating `basename $t .tirex`.s" ; ~/work/lao/build-st200/ECL/st200-lao $t -o `basename $t .tirex`.s ; done
# Generate executable file
echo "Generating executable file"
echo "~/work/tools/devimage/st200tools/bin/st200cc -mcore=st231 *.s -o $1.exe"
~/work/tools/devimage/st200tools/bin/st200cc -mcore=st231 *.s -o $1.exe
# Run file
echo "Running executable"
echo "~/work/tools/devimage/st200tools/bin/st200-runner $1.exe"
~/work/tools/devimage/st200tools/bin/st200-runner $1.exe
# Alternative: run file with trace
# ~/work/tools/devimage/st200tools/bin/st200-runner $1.exe -ttrace
exit 0
toolroot=/work1/fbouchez/tools/devimage/st200tools/bin
file=$1
tirex=`basename $file .c`.tirex
echo "Compiling $file into $tirex using open64"
$toolroot/st200cc -O1 -CG:LAO_optim=0 -o $tirex $*
assembly=`basename $file .c`.s
echo "Compiling $tirex into $assembly"
/work1/fbouchez/lao/build-st200/ECL/st200-lao -o $assembly $tirex
object=`basename $file .c`.o
echo "Compiling $assembly into $object"
$toolroot/st200cc -c -o $object $assembly