-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecurse.sh
More file actions
38 lines (31 loc) · 926 Bytes
/
recurse.sh
File metadata and controls
38 lines (31 loc) · 926 Bytes
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
#testing a canvas for recursive functions
#!/bin/bash
set -e
ESDK=${EPIPHANY_HOME}
ELIBS="-L ${ESDK}/tools/host/lib"
EINCS="-I ${ESDK}/tools/host/include"
ELDF=/home/ylav/dev/parallella/buildroot/esdk.2015.1/bsps/current/internal.ldf
SCRIPT=$(readlink -f "$0")
EXEPATH=$(dirname "$SCRIPT")
cd $EXEPATH
CROSS_PREFIX=
case $(uname -p) in
arm*)
# Use native arm compiler (no cross prefix)
CROSS_PREFIX=
;;
*)
# Use cross compiler
CROSS_PREFIX="arm-linux-gnueabihf-"
;;
esac
# Build DEVICE side program
#e-gcc --help=optimizers gives you hints ; -m1reg-r63 -msmall16 -mfp-mode=int
#src/innertile.S
echo !$1!
e-gcc -T ${ELDF} -O0 -mshort-calls -mfp-mode=int -m1reg-r63 $1 $2 $3 $4 $5 $6 $7 $8 $9 src/recurse.c -o recurse.elf -le-lib
echo !$1!
# Convert ebinary to SREC file
# -S: remove unused sections
# -g: remove debug sections
e-objcopy --srec-forceS3 --output-target srec -S recurse.elf recurse.srec