forked from eclipse-4diac/4diac-forte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_esp32_isobus_datapanel.sh
executable file
·73 lines (65 loc) · 2.62 KB
/
setup_esp32_isobus_datapanel.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
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
67
68
69
70
71
72
73
#!/bin/bash
echo "----------------------------------------------------------------------------"
echo " Automatically set up development environment for POSIX-platform"
echo "----------------------------------------------------------------------------"
echo ""
echo " Includes 64bit-datatypes, float-datatypes, Ethernet-Interface,"
echo " ASN1-encoding, ..."
echo ""
echo " To include tests set directories for boost-test-framework and "
echo " set FORTE_TESTS-option to 'ON'"
echo ""
echo "----------------------------------------------------------------------------"
export forte_bin_dir="bin/esp32"
export FORTE_BUILDSUPPORT_DIRECTORY="${PWD}/buildsupport"
#set to boost-include directory
export forte_boost_test_inc_dirs=""
#set to boost-library directory
export forte_boost_test_lib_dirs=""
if [ ! -d "$forte_bin_dir" ]; then
mkdir -p "$forte_bin_dir"
fi
if [ -d "$forte_bin_dir" ]; then
echo "For building forte go to $forte_bin_dir and execute \"make\""
echo "forte can be found at ${forte_bin_dir}/src"
echo "forte_tests can be found at ${forte_bin_dir}/tests"
cd "./$forte_bin_dir"
cmake -G "Unix Makefiles" \
-DCMAKE_TOOLCHAIN_FILE="${FORTE_BUILDSUPPORT_DIRECTORY}/toolchains/toolchain-esp32-datapanel.cmake" \
-DCMAKE_C_FLAGS_DEBUG="-g ${CMAKE_C_FLAGS}" \
-DCMAKE_C_FLAGS_MINSIZEREL="-Os -DNDEBUG ${CMAKE_C_FLAGS}" \
-DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG ${CMAKE_C_FLAGS}" \
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG ${CMAKE_C_FLAGS}" \
-DCMAKE_CXX_FLAGS_DEBUG="-g ${CMAKE_CXX_FLAGS}" \
-DCMAKE_CXX_FLAGS_MINSIZEREL="-Os -DNDEBUG ${CMAKE_CXX_FLAGS}" \
-DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG ${CMAKE_CXX_FLAGS}" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG ${CMAKE_CXX_FLAGS}" \
-DFORTE_LINKED_STRINGDICT=OFF \
-DESP32_SDK_CONFIG_DIR="../../../Application/build/config/" \
-DFORTE_FREERTOS_ALLOC="SPIRAM" \
-DFORTE_FREERTOS_MINIMAL_STACK_SIZE=15000 \
-DFORTE_BUILD_EXECUTABLE=OFF \
-DFORTE_BUILD_STATIC_LIBRARY=ON \
-DFORTE_MODULE_ISOBUS=ON \
-DFORTE_IO=ON \
-DFORTE_IO_COMMON_IO=ON \
-DFORTE_MODULE_ESP32=ON \
-DFORTE_MODULE_signalprocessing=ON \
-DFORTE_MODULE_DATAPANEL=ON \
-DFORTE_MODULE_BLINKMARINE=ON \
-DCMAKE_BUILD_TYPE=MINSIZEREL \
-DFORTE_LOGLEVEL=LOGINFO \
-DFORTE_COM_ETH=ON \
-DFORTE_COM_FBDK=ON \
-DFORTE_COM_LOCAL=ON \
-DFORTE_SUPPORT_BOOT_FILE=ON \
-DFORTE_BootfileLocation="/data/test_FORTE_PC.fboot" \
-DFORTE_TESTS=OFF \
-DFORTE_MODULE_IEC61131=ON \
-DFORTE_MODULE_CONVERT=ON \
-DFORTE_MODULE_UTILS=ON \
../../
else
echo "unable to create ${forte_bin_dir}"
exit 1
fi