-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.sh
executable file
·90 lines (81 loc) · 2.06 KB
/
configure.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
thisPath=$(realpath "$0")
thisDirPath=$(dirname "$thisPath")
source "${thisDirPath}/shell/util.sh"
if [ -z "${GCC_ARM_NONE_EABI_BIN_PATH}" ]
then
echoerr environment variable GCC_ARM_NONE_EABI_BIN_PATH is empty
ungracefulExit
else
echo "- found environment var GCC_ARM_NONE_EABI_BIN_PATH"
fi
out=$(${GCC_ARM_NONE_EABI_BIN_PATH}/arm-none-eabi-gcc --help 2>&1 1>/dev/null)
if [ $? != 0 ]
then
echoerr "${out}"
echoerr most likely GCC_ARM_NONE_EABI_BIN_PATH is not correct
ungracefulExit
else
echo "- found arm-none-eabi-gcc"
echoWTab "$(${GCC_ARM_NONE_EABI_BIN_PATH}/arm-none-eabi-gcc --version)"
fi
out=$(${GCC_ARM_NONE_EABI_BIN_PATH}/arm-none-eabi-gdb --help 2>&1 1>/dev/null)
if [ $? != 0 ]
then
echoerr "${out}"
echoerr most likely GCC_ARM_NONE_EABI_BIN_PATH is not correct
ungracefulExit
else
echo "- found arm-none-eabi-gdb"
fi
out=$(make --help 2>&1 1>/dev/null)
if [ $? != 0 ]
then
echoerr "${out}"
echoerr most likely make is not installed
ungracefulExit
else
echo "- found make"
echoWTab "$(make --version)"
fi
out=$(cmake --help 2>&1 1>/dev/null)
if [ $? != 0 ]
then
echoerr "${out}"
echoerr most likely cmake is not installed
ungracefulExit
else
echo "- found cmake"
echoWTab "$(cmake --version)"
fi
files=$(find ${thisDirPath}/0_base/misc/FreeRTOS -type f)
if [ -z "${files}" ]
then
echoerr FreeRTOS files not found. update submodules
ungracefulExit
else
echo "- found FreeRTOS files"
fi
files=$(find "${thisDirPath}/shell" -type f)
for file in ${files}
do
if [ ! -x "${file}" ]
then
echoerr "${file} does not have execute permission"
ungracefulExit
else
echo "- found execute permission for ${file}"
fi
done
out=$(qemu-system-arm --help 2>&1 1>/dev/null)
if [ $? != 0 ]
then
echoerr "${out}"
echoerr you are good to compile but can not run with qemu.
echoerr most likely you dont have qemu installed or it is not in path.
ungracefulExit
else
echo "- found qemu"
echoWTab "$(qemu-system-arm --version)"
fi
echo
echo SUCCESS!!