build configuration for trenz te0720-1cfa
This commit is contained in:
34
cmake/scripts/te0720-1cfa/make-debug-cfg.sh
Normal file
34
cmake/scripts/te0720-1cfa/make-debug-cfg.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
counter=0
|
||||
cfg_script_name="cmake-build-cfg.py"
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f ${cfg_script_name} ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "${cfg_script_name} not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/te0720-1cfa"
|
||||
build_generator="make"
|
||||
build_dir="build-Debug-te0720-1cfa"
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
python="py"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
python="python3"
|
||||
fi
|
||||
|
||||
echo "Running command (without the leading +):"
|
||||
set -x # Print command
|
||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
||||
-l"${build_dir}"
|
||||
# set +x
|
49
cmake/scripts/te0720-1cfa/win-env-te0720-1cfa.sh
Normal file
49
cmake/scripts/te0720-1cfa/win-env-te0720-1cfa.sh
Normal file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
# Run with: source q7s-env-win-sh [OPTIONS]
|
||||
function help () {
|
||||
echo "source q7s-env-win-sh [options] -t|--toolchain=<toolchain path> -s|--sysroot=<sysroot path>"
|
||||
}
|
||||
|
||||
TOOLCHAIN_PATH="/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
|
||||
SYSROOT="/c/Users/${USER}/eive-software/sysroots-petalinux-2019-2/cortexa9t2hf-neon-xilinx-linux-gnueabi"
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-t=*|--toolchain=*)
|
||||
TOOLCHAIN_PATH="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-s=*|--sysroot=*)
|
||||
SYSROOT="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
help
|
||||
shift
|
||||
;;
|
||||
-*|--*)
|
||||
echo "Unknown option $i"
|
||||
help
|
||||
return
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -d "$TOOLCHAIN_PATH" ]; then
|
||||
export PATH=$PATH:"/c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
|
||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||
echo "Set toolchain path to /c/Xilinx/Vitis/2019.2/gnu/aarch32/nt/gcc-arm-linux-gnueabi/bin"
|
||||
else
|
||||
echo "Toolchain path $TOOLCHAIN_PATH does not exist"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -d "$SYSROOT" ]; then
|
||||
export ZYNQ_7020_SYSROOT=$SYSROOT
|
||||
echo "Set sysroot path to $SYSROOT"
|
||||
else
|
||||
echo "Sysroot path $SYSROOT does not exist"
|
||||
return
|
||||
fi
|
Reference in New Issue
Block a user