-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
212 lines (165 loc) · 8.03 KB
/
Copy pathCMakeLists.txt
File metadata and controls
212 lines (165 loc) · 8.03 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
if(CONFIG_CMSIS_DSP)
set(CMSIS_DSP_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
zephyr_library()
zephyr_library_compile_options(-Ofast)
zephyr_include_directories(
${CMSIS_DSP_DIR}/Include
)
zephyr_library_include_directories(
${CMSIS_DSP_DIR}/PrivateInclude
)
if (NOT CONFIG_CPU_CORTEX_A)
zephyr_library_include_directories(${ZEPHYR_CMSIS_MODULE_DIR}/CMSIS/Core/Include)
else()
zephyr_library_compile_definitions(__GNUC_PYTHON__) # Disable dependency to CMSIS Core
endif()
zephyr_library_compile_definitions(ZEPHYR_INCLUDE_TOOLCHAIN_STDINT_H_)
# Global Feature Definitions
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_NEON ARM_MATH_NEON)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL ARM_MATH_NEON_EXPERIMENTAL)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_LOOPUNROLL ARM_MATH_LOOPUNROLL)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_ROUNDING ARM_MATH_ROUNDING)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_MATRIXCHECK ARM_MATH_MATRIX_CHECK)
zephyr_library_compile_definitions_ifndef(CONFIG_CMSIS_DSP_FLOAT16 DISABLEFLOAT16)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_AUTOVECTORIZE ARM_MATH_AUTOVECTORIZE)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_NE10_DSP_RIFFT_SCALING CMSIS_NE10_DSP_RIFFT_SCALING)
zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_CUSTOM_CONFIG ARM_DSP_CUSTOM_CONFIG)
zephyr_compile_definitions_ifndef(CONFIG_ARM __GNUC_PYTHON__)
if (CONFIG_CMSIS_DSP_NEON OR CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL)
zephyr_include_directories("${CMSIS_DSP_DIR}/ComputeLibrary/Include")
zephyr_library_include_directories("${CMSIS_DSP_DIR}/Ne10")
endif()
if (CONFIG_ARMV8_1_M_MVEI OR CONFIG_ARMV8_1_M_MVEF OR CONFIG_CMSIS_DSP_NEON OR CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL)
if (CONFIG_CMSIS_DSP_LAX_VECTOR_CONVERSIONS)
zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-flax-vector-conversions>)
zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=integer>)
else()
zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-fno-lax-vector-conversions>)
zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=none>)
endif()
endif()
# Basic math functions
if (CONFIG_CMSIS_DSP_BASICMATH)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/BasicMathFunctions/BasicMathFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/BasicMathFunctions/BasicMathFunctionsF16.c)
endif()
endif()
# Bayes functions
if (CONFIG_CMSIS_DSP_BAYES)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/BayesFunctions/BayesFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/BayesFunctions/BayesFunctionsF16.c)
endif()
endif()
# Common tables
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_common_tables.c
${CMSIS_DSP_DIR}/Source/CommonTables/arm_common_tables_f16.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_const_structs.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_const_structs_f16.c)
if (CONFIG_CMSIS_DSP_NEON OR CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL)
zephyr_library_sources(${CMSIS_DSP_DIR}/ComputeLibrary/Source/arm_cl_tables.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_neon_tables.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_neon_tables_f16.c)
endif()
if (CONFIG_ARMV8_1_M_MVEI OR CONFIG_ARMV8_1_M_MVEF)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_mve_tables.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_mve_tables_f16.c)
endif()
# Complex math functions
if (CONFIG_CMSIS_DSP_COMPLEXMATH)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/ComplexMathFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/ComplexMathFunctionsF16.c)
endif()
endif()
# Controller functions
if (CONFIG_CMSIS_DSP_CONTROLLER)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/ControllerFunctions.c)
endif()
# Distance functions
if (CONFIG_CMSIS_DSP_DISTANCE)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/DistanceFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/DistanceFunctionsF16.c)
endif()
endif()
# Fast math functions
if (CONFIG_CMSIS_DSP_FASTMATH)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/FastMathFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/FastMathFunctionsF16.c)
endif()
endif()
# Filtering functions
if (CONFIG_CMSIS_DSP_FILTERING)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/FilteringFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/FilteringFunctionsF16.c)
endif()
endif()
# Interpolation functions
if (CONFIG_CMSIS_DSP_INTERPOLATION)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/InterpolationFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/InterpolationFunctionsF16.c)
endif()
endif()
# Matrix functions
if (CONFIG_CMSIS_DSP_MATRIX)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/MatrixFunctions/MatrixFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/MatrixFunctions/MatrixFunctionsF16.c)
endif()
endif()
# Quaternion functions
if (CONFIG_CMSIS_DSP_QUATERNIONMATH)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/QuaternionMathFunctions.c)
endif()
# Statistics functions
if (CONFIG_CMSIS_DSP_STATISTICS)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/StatisticsFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/StatisticsFunctionsF16.c)
endif()
endif()
# Support functions
if (CONFIG_CMSIS_DSP_SUPPORT)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/SupportFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/SupportFunctionsF16.c)
endif()
endif()
# SVM Functions
if (CONFIG_CMSIS_DSP_SVM)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/SVMFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/SVMFunctionsF16.c)
endif()
endif()
# Transform functions
if (CONFIG_CMSIS_DSP_TRANSFORM)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/TransformFunctions.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/TransformFunctionsF16.c)
endif()
endif()
if (CONFIG_CMSIS_DSP_NEON OR CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/NE10_fft_float32.neonintrinsic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/NE10_fft_int32.neonintrinsic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/NE10_fft_int16.neonintrinsic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/NE10_rfft_float32.neonintrinsic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/CMSIS_NE10_fft_init.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/CMSIS_NE10_fft_generic_float32.neonintrisic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/CMSIS_NE10_fft_generic_int32.neonintrisic.c)
if (CONFIG_CMSIS_DSP_FLOAT16)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/NE10_fft_float16.neonintrinsic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/NE10_rfft_float16.neonintrinsic.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Ne10/CMSIS_NE10_fft_generic_float16.neonintrisic.c)
endif()
endif()
# Windows functions
if (CONFIG_CMSIS_DSP_WINDOW)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/WindowFunctions/WindowFunctions.c)
endif()
endif()