-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
70 lines (56 loc) · 2.01 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
cmake_minimum_required(VERSION 3.12)
# Set project name
set(PROJECT_NAME "hardware_test_sample")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/toolchain.cmake")
option(CONNECTED_FACTORY "if device can connect to the cloud in the factory" ON)
if(CONNECTED_FACTORY)
add_compile_definitions(CONFIG_CONNECTED_FACTORY=1)
endif(CONNECTED_FACTORY)
project(${PROJECT_NAME} C ASM)
include_directories(include
${twilio-microvisor-hal-stm32u5_INCLUDE_DIRS})
set(INCLUDED_HAL_FILES
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal.c
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_cortex.c
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_gpio.c
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_rcc.c
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_rcc_ex.c
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_tim.c
Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_tim_ex.c
Drivers/CMSIS/Device/ST/STM32U5xx/Source/Templates/system_stm32u5xx_ns.c
Drivers/CMSIS/Device/ST/STM32U5xx/Source/Templates/gcc/startup_stm32u585xx.s
)
# Load the HAL
add_subdirectory(twilio-microvisor-hal-stm32u5)
# Build the STM32 middleware
add_library(ST_Code STATIC
ST_Code/Core/Src/syscalls.c
ST_Code/CMSIS_RTOS_V2/cmsis_os2.c
)
target_include_directories(ST_Code PUBLIC
ST_Code/Core/Inc
)
target_link_libraries(ST_Code LINK_PUBLIC
twilio-microvisor-hal-stm32u5
FreeRTOS
)
# Build FreeRTOS
add_library(FreeRTOS STATIC
#FreeRTOS-Kernel/croutine.c
FreeRTOS-Kernel/event_groups.c
FreeRTOS-Kernel/list.c
FreeRTOS-Kernel/queue.c
FreeRTOS-Kernel/stream_buffer.c
FreeRTOS-Kernel/tasks.c
FreeRTOS-Kernel/timers.c
FreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c
FreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c
FreeRTOS-Kernel/portable/MemMang/heap_4.c
)
target_include_directories(FreeRTOS PUBLIC
Config/
FreeRTOS-Kernel/include
FreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure
)
# Load the application
add_subdirectory(HardwareTest)