-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-all.sh
More file actions
executable file
·66 lines (56 loc) · 1.45 KB
/
generate-all.sh
File metadata and controls
executable file
·66 lines (56 loc) · 1.45 KB
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
#!/bin/bash
# This script generates all the runtime sources and turns them into Alire crates.
#
# It takes an optional --version argument which is set as the version field
# in the generated alire.toml files.
#
# Note that any existing "install" folder should be deleted before calling
# this script, otherwise the runtime generation will fail (bb-runtimes will
# refuse to overwrite existing runtimes).
#
# Examples:
# ./generate-all.sh
# ./generate-all.sh --version 1.2.3
set -e
ARGUMENT_LIST=(
"version"
)
# read arguments
opts=$(getopt \
--longoptions "$(printf "%s:," "${ARGUMENT_LIST[@]}")" \
--name "$(basename "$0")" \
--options "" \
-- "$@"
)
eval set --$opts
while [[ $# -gt 0 ]]; do
case "$1" in
--version)
version=$2
shift 2
;;
*)
break
;;
esac
done
echo "Generating runtimes"
python build-rts.py \
--rts-src-descriptor=bb-runtimes/gnat_rts_sources/lib/gnat/rts-sources.json \
--force \
stm32f407
for target in stm32f407; do
for profile in light light-tasking embedded; do
echo "Crateifying ${profile}-${target,,}"
if [[ -z $version ]]; then
python crateify.py \
--runtime-dir=install/${profile}-${target,,} \
--profile=${profile}
else
python crateify.py \
--runtime-dir=install/${profile}-${target,,} \
--profile=${profile} \
--version=$version
fi
done
done