-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_cmake_debug.sh
executable file
·41 lines (34 loc) · 1.26 KB
/
run_cmake_debug.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
# Set environment variables, if not set by parameter
if [ -z ${BUILD_CONFIG+x} ]
then
# Build type not set, set RELEASE as default
BUILD_CONFIG=Debug
fi
if [ -z ${ARM_TOOLCHAIN+x} ]
then
# Build type not set, set RELEASE as default
ARM_TOOLCHAIN="F:/Programs/STM32CubeIDE/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.5.0.202011040924/tools/"
fi
if [ -z ${STM32_FW_F3=+x} ]
then
# Build type not set, set RELEASE as default
STM32_FW_F3=="C:/Users/Clemens/STM32Cube/Repository/STM32CubeF3"
fi
if [ -z ${STM32_CHIP+x} ]
then
# Build type not set, set RELEASE as default
STM32_CHIP="STM32F303CCT6"
fi
#For F4
#DIR_STM32_CUBE="C:/Users/Clemens/STM32Cube/Repository/STM32Cube_FW_F4_V1.24.0"
#STM32_CHIP="STM32F429ZIT6"
echo "ARM Toolchain path is " $ARM_TOOLCHAIN
echo "Build Type is " $BUILD_CONFIG
echo "STM32_CHIP " $STM32_CHIP
echo "STM32F3 firmware is " $STM32_FW_F3
# Create out of source build directory
mkdir bin_debug
pushd bin_debug
# Just run CMake. Make sure that both CMake and make are available in the environment vars.
cmake -DSTM32_CUBE_F3_PATH=$STM32_FW_F3 -DSTM32_TOOLCHAIN_PATH=$ARM_TOOLCHAIN -DCMAKE_BUILD_TYPE=$BUILD_CONFIG -G "Eclipse CDT4 - Unix Makefiles" ../src
popd