This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists_bsp.txt
56 lines (49 loc) · 1.73 KB
/
CMakeLists_bsp.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
# Copyright (C) 2018-2019 Adolfo E. García
#
# This file is part of STG-8nn-Scaffold.
#
# STG-8nn-Scaffold is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# STG-8nn-Scaffold is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with STG-8nn-Scaffold. If not, see <https://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.20)
if(DEFINED SCAFFOLD_DIR)
set(BSP_DIR ${SCAFFOLD_DIR}/bsp)
else()
set(BSP_DIR bsp)
endif()
set(BSP_INCLUDE ${BSP_DIR}/common/include)
set(BSP_SOURCES
${BSP_DIR}/common/include/bsp.h
${BSP_DIR}/common/include/bsp_qpc.h
${BSP_DIR}/common/include/canard_build_config.h
${BSP_DIR}/common/src/bsp_common.c
)
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
if(DEFINED SCAFFOLD_DIR)
include(${SCAFFOLD_DIR}/CMakeLists_bsp_stg.txt)
include(${SCAFFOLD_DIR}/CMakeLists_cmsis5.txt)
include(${SCAFFOLD_DIR}/CMakeLists_stm32cube.txt)
else()
include(CMakeLists_bsp_stg.txt)
include(CMakeLists_cmsis5.txt)
include(CMakeLists_stm32cube.txt)
endif()
list(APPEND BSP_INCLUDE ${CMSIS5_INCLUDE})
list(APPEND BSP_SOURCES ${STM32CUBE_SOURCES})
list(APPEND BSP_INCLUDE ${STM32CUBE_INCLUDE})
else()
if(DEFINED SCAFFOLD_DIR)
include(${SCAFFOLD_DIR}/CMakeLists_bsp_tester.txt)
else()
include(CMakeLists_bsp_tester.txt)
endif()
endif()