forked from Liquibit/LiQuiBit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
110 lines (98 loc) · 3.55 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
cmake_minimum_required(VERSION 3.18)
project("LiQuiBit")
if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/build")
endif()
if(CMAKE_EXTRA_GENERATOR)
set (GENERATOR "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
else()
set (GENERATOR "${CMAKE_GENERATOR}")
endif(CMAKE_EXTRA_GENERATOR)
set(SUB_IOT_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/Sub-IoT-Stack/stack")
set(BUILD_PUSH7_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/Push7-release")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_PUSH7_RELEASE})
execute_process(
WORKING_DIRECTORY ${BUILD_PUSH7_RELEASE}
COMMAND ${CMAKE_COMMAND} -G "${GENERATOR}"
-D PLATFORM=PUSH7
-D APP_PUSH7_BUTTON=y
-D MODULE_ALP_SERIAL_INTERFACE_ENABLED=n
-D FRAMEWORK_SCHEDULER_LP_MODE=1
-D FRAMEWORK_FS_FILE_COUNT=80
-D FRAMEWORK_FS_PERMANENT_STORAGE_SIZE=2800
-D FRAMEWORK_FS_VOLATILE_STORAGE_SIZE=154
-D FRAMEWORK_DEBUG_ENABLE_SWD=n
-D FRAMEWORK_FS_USER_FILE_COUNT=11
-D FRAMEWORK_SCHEDULER_MAX_TASKS=60
-D FRAMEWORK_DEBUG_ASSERT_REBOOT=y
-D CMAKE_BUILD_TYPE=Debug
${SUB_IOT_SOURCE}
)
add_custom_target(push7-release ALL
WORKING_DIRECTORY ${BUILD_PUSH7_RELEASE}
COMMAND ${CMAKE_MAKE_PROGRAM} -j push7_button.elf
)
set(BUILD_PUSH7_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/Push7-debug")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_PUSH7_DEBUG})
execute_process(
WORKING_DIRECTORY ${BUILD_PUSH7_DEBUG}
COMMAND ${CMAKE_COMMAND} -G "${GENERATOR}"
-D PLATFORM=PUSH7
-D APP_PUSH7_BUTTON=y
-D MODULE_ALP_SERIAL_INTERFACE_ENABLED=n
-D FRAMEWORK_SCHEDULER_LP_MODE=1
-D FRAMEWORK_FS_FILE_COUNT=80
-D FRAMEWORK_FS_PERMANENT_STORAGE_SIZE=2800
-D FRAMEWORK_FS_VOLATILE_STORAGE_SIZE=154
-D FRAMEWORK_DEBUG_ENABLE_SWD=n
-D FRAMEWORK_FS_USER_FILE_COUNT=11
-D FRAMEWORK_SCHEDULER_MAX_TASKS=60
-D FRAMEWORK_DEBUG_ASSERT_REBOOT=n
-D FRAMEWORK_LOG_OUTPUT_ON_RTT=n
-D FRAMEWORK_CONSOLE_ENABLED=y
-D PLATFORM_CONSOLE_UART=0
-D CMAKE_BUILD_TYPE=Debug
${SUB_IOT_SOURCE}
)
add_custom_target(push7-debug ALL
WORKING_DIRECTORY ${BUILD_PUSH7_DEBUG}
COMMAND ${CMAKE_MAKE_PROGRAM} -j push7_button.elf
)
set(BUILD_IOWAY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/IOWay-release")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_IOWAY_RELEASE})
execute_process(
WORKING_DIRECTORY ${BUILD_IOWAY_RELEASE}
COMMAND ${CMAKE_COMMAND} -G "${GENERATOR}"
-D PLATFORM=IOWAY_gateway
-D APP_GATEWAY=y
-D MODULE_ALP_SERIAL_INTERFACE_ENABLED=y
-D FRAMEWORK_SCHEDULER_LP_MODE=0
-D FRAMEWORK_DEBUG_ASSERT_REBOOT=y
-D CMAKE_BUILD_TYPE=Debug
${SUB_IOT_SOURCE}
)
add_custom_target(ioway-release ALL
WORKING_DIRECTORY ${BUILD_IOWAY_RELEASE}
COMMAND ${CMAKE_MAKE_PROGRAM} -j gateway.elf
)
set(BUILD_IOWAY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/IOWay-debug")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_IOWAY_DEBUG})
execute_process(
WORKING_DIRECTORY ${BUILD_IOWAY_DEBUG}
COMMAND ${CMAKE_COMMAND} -G "${GENERATOR}"
-D PLATFORM=IOWAY_gateway
-D APP_GATEWAY=y
-D MODULE_ALP_SERIAL_INTERFACE_ENABLED=y
-D FRAMEWORK_SCHEDULER_LP_MODE=0
-D FRAMEWORK_DEBUG_ASSERT_REBOOT=y
-D FRAMEWORK_LOG_OUTPUT_ON_RTT=n
-D FRAMEWORK_CONSOLE_ENABLED=y
-D PLATFORM_MODEM_INTERFACE_UART=0
-D PLATFORM_CONSOLE_UART=1
-D CMAKE_BUILD_TYPE=Debug
${SUB_IOT_SOURCE}
)
add_custom_target(ioway-debug ALL
WORKING_DIRECTORY ${BUILD_IOWAY_DEBUG}
COMMAND ${CMAKE_MAKE_PROGRAM} -j gateway.elf
)