-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate-this-bsp
49 lines (41 loc) · 1.18 KB
/
create-this-bsp
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
#!/bin/bash
#
# This script creates the ucosii_net_zipfs Board Support Package (BSP).
BSP_TYPE=hal
BSP_DIR=.
SOPC_DIR=
SOPC_FILE=C:/Users/Jesse/Desktop/Year4/CPEN391/Exercise/1.3/NIOS_II_System_391_For_Students/nios_system.sopcinfo
NIOS2_BSP_ARGS=""
CPU_NAME=
# Don't run make if create-this-app script is called with --no-make arg
SKIP_MAKE=
while [ $# -gt 0 ]
do
case "$1" in
--no-make)
SKIP_MAKE=1
;;
*)
NIOS2_BSP_ARGS="$NIOS2_BSP_ARGS $1"
;;
esac
shift
done
# Run nios2-bsp utility to create a hal BSP in this directory
# for the system with a .sopc file in $SOPC_FILE.
# Deprecating $SOPC_DIR in 10.1. Multiple .sopcinfo files in a directory may exist.
if [ -z "$SOPC_FILE" ]; then
echo "WARNING: Use of a directory for locating a .sopcinfo file is deprecated in 10.1. Multiple .sopcinfo files may exist. You must specify the full .sopcinfo path."
cmd="nios2-bsp $BSP_TYPE $BSP_DIR $SOPC_DIR $NIOS2_BSP_ARGS $CPU_NAME"
else
cmd="nios2-bsp $BSP_TYPE $BSP_DIR $SOPC_FILE $NIOS2_BSP_ARGS $CPU_NAME"
fi
echo "create-this-bsp: Running \"$cmd\""
$cmd || {
echo "$cmd failed"
exit 1
}
if [ -z "$SKIP_MAKE" ]; then
echo "create-this-bsp: Running make"
make
fi