restructured build system support
This commit is contained in:
27
cmake/scripts/RPi/create_cmake_debug_cfg.sh
Normal file
27
cmake/scripts/RPi/create_cmake_debug_cfg.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f "cmake_build_config.py" ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "cmake_build_config.py not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/raspberrypi"
|
||||
build_generator=""
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
build_generator="MinGW Makefiles"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
build_generator="Unix Makefiles"
|
||||
fi
|
||||
|
||||
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}"
|
27
cmake/scripts/RPi/create_cmake_release_cfg.sh
Normal file
27
cmake/scripts/RPi/create_cmake_release_cfg.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f "cmake_build_config.py" ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "cmake_build_config.py not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/raspberrypi"
|
||||
build_generator=""
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
build_generator="MinGW Makefiles"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
build_generator="Unix Makefiles"
|
||||
fi
|
||||
|
||||
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}"
|
27
cmake/scripts/RPi/create_cmake_relwithdeb_cfg.sh
Normal file
27
cmake/scripts/RPi/create_cmake_relwithdeb_cfg.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f "cmake_build_config.py" ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "cmake_build_config.py not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/raspberrypi"
|
||||
build_generator=""
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
build_generator="MinGW Makefiles"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
build_generator="Unix Makefiles"
|
||||
fi
|
||||
|
||||
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb" -t "${tgt_bsp}"
|
27
cmake/scripts/RPi/create_cmake_size_cfg.sh
Normal file
27
cmake/scripts/RPi/create_cmake_size_cfg.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
counter=0
|
||||
while [ ${counter} -lt 5 ]
|
||||
do
|
||||
cd ..
|
||||
if [ -f "cmake_build_config.py" ];then
|
||||
break
|
||||
fi
|
||||
counter=$((counter=counter + 1))
|
||||
done
|
||||
|
||||
if [ "${counter}" -ge 5 ];then
|
||||
echo "cmake_build_config.py not found in upper directories!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
os_fsfw="linux"
|
||||
tgt_bsp="arm/raspberrypi"
|
||||
build_generator=""
|
||||
if [ "${OS}" = "Windows_NT" ]; then
|
||||
build_generator="MinGW Makefiles"
|
||||
# Could be other OS but this works for now.
|
||||
else
|
||||
build_generator="Unix Makefiles"
|
||||
fi
|
||||
|
||||
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "size" -t "${tgt_bsp}"
|
24
cmake/scripts/RPi/rpi_path_helper.sh
Normal file
24
cmake/scripts/RPi/rpi_path_helper.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# This script can be used to set the path to the cross-compile toolchain
|
||||
# A default path is set if the path is not supplied via command line
|
||||
if [ $# -eq 1 ];then
|
||||
export PATH=$PATH:"$1"
|
||||
else
|
||||
# TODO: make version configurable via shell argument
|
||||
export PATH=$PATH:"/opt/cross-pi-gcc/bin"
|
||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||
export RASPBERRY_VERSION="4"
|
||||
export RASPBIAN_ROOTFS="${HOME}/raspberrypi/rootfs"
|
||||
fi
|
||||
|
||||
# It is also recommended to set up a custom shell script to perform the
|
||||
# sysroot synchronization so that any software is built with the library and
|
||||
# headers of the Raspberry Pi. This can for example be dome with the rsync
|
||||
# command.
|
||||
# The following command can be used, <ip-address> and the local
|
||||
# <rootfs-path> need to be set accordingly.
|
||||
|
||||
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
|
||||
|
||||
# It is recommended to use $HOME/raspberrypi/rootfs as the rootfs path,
|
||||
# so the default RASPBIAN_ROOTFS variable set in the CMakeLists.txt is correct.
|
22
cmake/scripts/RPi/rpi_path_helper_win.sh
Normal file
22
cmake/scripts/RPi/rpi_path_helper_win.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# This script can be used to set the path to the cross-compile toolchain
|
||||
# A default path is set if the path is not supplied via command line
|
||||
if [ $# -eq 1 ];then
|
||||
export PATH=$PATH:"$1"
|
||||
else
|
||||
# TODO: make version configurable via shell argument
|
||||
export PATH=$PATH:"/c/SysGCC/raspberry/bin"
|
||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
||||
export RASPBERRY_VERSION="4"
|
||||
export RASPBIAN_ROOTFS="/c/Users/<UserName>/raspberrypi/rootfs"
|
||||
fi
|
||||
|
||||
# It is also recommended to set up a custom shell script to perform the
|
||||
# sysroot synchronization so that any software is built with the library and
|
||||
# headers of the Raspberry Pi. This can for example be dome with the rsync
|
||||
# command.
|
||||
# The following command can be used, <ip-address> and the local
|
||||
# <rootfs-path> need to be set accordingly.
|
||||
|
||||
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
|
||||
|
Reference in New Issue
Block a user