-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
77 lines (67 loc) · 3.46 KB
/
CMakeLists.txt
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
74
75
76
77
cmake_minimum_required(VERSION 3.19.2)
project(OBC_SOFTWARE C CXX ASM)
set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/src/config/default/ATSAMV71Q21B.ld)
add_definitions(-DARM_MATH_CM7 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__FPU_PRESENT=1)
SET(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-gc-sections,--print-memory-usage -T ${LINKER_SCRIPT}")
find_package(etl CONFIG REQUIRED)
find_package(logger CONFIG REQUIRED COMPONENTS log_common)
find_package(ecss-services CONFIG REQUIRED COMPONENTS common)
include_directories(.)
include_directories(inc)
include_directories(inc/Platform)
include_directories(inc/FreeRTOSTasks)
include_directories(inc/Platform/Parameters)
include_directories(src)
include_directories(src/config)
include_directories(src/config/default)
include_directories(src/config/default/osal)
include_directories(src/config/default/peripheral/clk)
include_directories(src/config/default/peripheral/efc)
include_directories(src/config/default/peripheral/nvic)
include_directories(src/config/default/peripheral/pio)
include_directories(src/config/default/peripheral/rtc)
include_directories(src/config/default/peripheral/systick)
include_directories(src/config/default/peripheral/twihs/master)
include_directories(src/config/default/system)
include_directories(src/config/default/system/cache)
include_directories(src/config/default/system/debug)
include_directories(src/config/default/system/int)
include_directories(src/config/default/system/time)
include_directories(src/config/default/system/time/src)
include_directories(lib/FreeRTOS)
include_directories(lib/FreeRTOS/Source)
include_directories(lib/FreeRTOS/Source/include)
include_directories(lib/FreeRTOS/Source/portable)
include_directories(lib/FreeRTOS/Source/portable/GCC)
include_directories(lib/FreeRTOS/Source/portable/GCC/SAM)
include_directories(lib/FreeRTOS/Source/portable/GCC/SAM/CM7)
include_directories(lib/FreeRTOS/Source/portable/MemMang)
include_directories(src/packs)
include_directories(src/packs/ATSAMV71Q21B_DFP)
include_directories(src/packs/ATSAMV71Q21B_DFP/component)
include_directories(src/packs/ATSAMV71Q21B_DFP/instance)
include_directories(src/packs/ATSAMV71Q21B_DFP/pio)
include_directories(src/packs/CMSIS)
include_directories(src/packs/CMSIS/CMSIS)
include_directories(src/packs/CMSIS/CMSIS/Core)
include_directories(src/packs/CMSIS/CMSIS/Core/Include)
include_directories(AutoGenerated.X)
include_directories(AutoGenerated.X/dist)
include_directories(AutoGenerated.X/dist/default)
include_directories(AutoGenerated.X/dist/default/production)
include_directories(AutoGenerated.X/nbproject)
include_directories(AutoGenerated.X/nbproject/private)
include_directories(/opt/microchip/mplabx/v5.45/packs/arm/CMSIS/5.4.0/CMSIS/Core/Include/)
include_directories(lib/SEGGER/RTT)
include_directories(lib/SEGGER/Config)
include_directories(lib/atsam-component-drivers/MCP9808/inc)
include_directories(lib/cross-platform-software)
add_subdirectory(lib/cross-platform-software)
file(GLOB_RECURSE DRIVER_SOURCES "lib/atsam-component-drivers/MCP9808/*.cpp")
file(GLOB_RECURSE SOURCES "src/*.c" "src/*.cpp" "lib/SEGGER/RTT/*.c" "AutoGenerated.X/*.c")
file(GLOB_RECURSE FREERTOS_SOURCES "lib/FreeRTOS/*.c")
add_executable(${PROJECT_NAME}.elf ${SOURCES} ${LINKER_SCRIPT} ${FREERTOS_SOURCES} ${DRIVER_SOURCES})
target_link_libraries(${PROJECT_NAME}.elf PRIVATE common common_cross etl log_common)
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS_INIT} -Wl,-Map=${PROJECT_BINARY_DIR}/${PROJECT_NAME}.map")
add_compile_definitions(LOGLEVEL_TRACE)