1
- # Copyright (c) 2020 ARM Limited. All rights reserved.
1
+ # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
- if ( "SCL" IN_LIST MBED_TARGET_LABELS )
5
- add_subdirectory (COMPONENT_SCL EXCLUDE_FROM_ALL )
6
- endif ( )
4
+ add_subdirectory ( COMPONENT_SCL EXCLUDE_FROM_ALL )
5
+ add_subdirectory (COMPONENT_WHD EXCLUDE_FROM_ALL )
6
+ add_subdirectory ( common/COMPONENT_WHD EXCLUDE_FROM_ALL )
7
7
8
- if ("WHD" IN_LIST MBED_TARGET_LABELS )
9
- add_subdirectory (COMPONENT_WHD EXCLUDE_FROM_ALL )
10
- add_subdirectory (common/COMPONENT_WHD EXCLUDE_FROM_ALL )
11
- endif ()
8
+ add_library (mbed-cat1a INTERFACE )
12
9
13
- if ("CAT1A" IN_LIST MBED_TARGET_LABELS )
14
- target_include_directories (mbed-core
15
- INTERFACE
16
- psoc6pdl/devices/COMPONENT_CAT1A/include
17
- psoc6pdl/devices/COMPONENT_CAT1A/include/ip
18
- )
19
- endif ()
10
+ target_include_directories (mbed-cat1a
11
+ INTERFACE
12
+ psoc6pdl/devices/COMPONENT_CAT1A/include
13
+ psoc6pdl/devices/COMPONENT_CAT1A/include/ip
14
+ )
20
15
21
- if ("CY8CKIT064B0S2_4343W" IN_LIST MBED_TARGET_LABELS )
22
- add_subdirectory (TARGET_CY8CKIT064B0S2_4343W )
23
- elseif ("CY8CKIT_062S2_43012" IN_LIST MBED_TARGET_LABELS )
24
- add_subdirectory (TARGET_CY8CKIT_062S2_43012 )
25
- elseif ("CY8CKIT_062_BLE" IN_LIST MBED_TARGET_LABELS )
26
- add_subdirectory (TARGET_CY8CKIT_062_BLE )
27
- elseif ("CY8CKIT_062_WIFI_BT" IN_LIST MBED_TARGET_LABELS )
28
- add_subdirectory (TARGET_CY8CKIT_062_WIFI_BT )
29
- elseif ("CY8CPROTO_062S3_4343W" IN_LIST MBED_TARGET_LABELS )
30
- add_subdirectory (TARGET_CY8CPROTO_062S3_4343W )
31
- elseif ("CY8CPROTO_062_4343W" IN_LIST MBED_TARGET_LABELS )
32
- add_subdirectory (TARGET_CY8CPROTO_062_4343W )
33
- elseif ("CYSBSYSKIT_01" IN_LIST MBED_TARGET_LABELS )
34
- add_subdirectory (TARGET_CYSBSYSKIT_01 )
35
- elseif ("CYTFM_064B0S2_4343W" IN_LIST MBED_TARGET_LABELS )
36
- add_subdirectory (TARGET_CYTFM_064B0S2_4343W )
37
- elseif ("CYW9P62S1_43012EVB_01" IN_LIST MBED_TARGET_LABELS )
38
- add_subdirectory (TARGET_CYW9P62S1_43012EVB_01 )
39
- elseif ("CYW9P62S1_43438EVB_01" IN_LIST MBED_TARGET_LABELS )
40
- add_subdirectory (TARGET_CYW9P62S1_43438EVB_01 )
41
- endif ()
16
+ add_subdirectory (TARGET_CY8CKIT064B0S2_4343W EXCLUDE_FROM_ALL )
17
+ add_subdirectory (TARGET_CY8CKIT_062S2_43012 EXCLUDE_FROM_ALL )
18
+ add_subdirectory (TARGET_CY8CKIT_062_BLE EXCLUDE_FROM_ALL )
19
+ add_subdirectory (TARGET_CY8CKIT_062_WIFI_BT EXCLUDE_FROM_ALL )
20
+ add_subdirectory (TARGET_CY8CPROTO_062S3_4343W EXCLUDE_FROM_ALL )
21
+ add_subdirectory (TARGET_CY8CPROTO_062_4343W EXCLUDE_FROM_ALL )
22
+ add_subdirectory (TARGET_CYSBSYSKIT_01 EXCLUDE_FROM_ALL )
23
+ add_subdirectory (TARGET_CYTFM_064B0S2_4343W EXCLUDE_FROM_ALL )
24
+ add_subdirectory (TARGET_CYW9P62S1_43012EVB_01 EXCLUDE_FROM_ALL )
25
+ add_subdirectory (TARGET_CYW9P62S1_43438EVB_01 EXCLUDE_FROM_ALL )
42
26
43
27
add_subdirectory (psoc6csp/abstraction/rtos EXCLUDE_FROM_ALL )
44
28
45
- if ("CM0P_BLESS" IN_LIST MBED_TARGET_LABELS )
46
- target_sources (mbed-core
47
- INTERFACE
48
- psoc6cm0p/COMPONENT_CM0P_BLESS/psoc6_cm0p_bless.c
49
- )
50
- endif ()
51
-
52
- if ("CM0P_CRYPTO" IN_LIST MBED_TARGET_LABELS )
53
- target_sources (mbed-core
54
- INTERFACE
55
- psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_01_cm0p_crypto.c
56
- psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_02_cm0p_crypto.c
57
- psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_03_cm0p_crypto.c
58
- psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_04_cm0p_crypto.c
59
- )
60
- endif ()
29
+ add_library (mbed-cm0p-bless INTERFACE )
30
+ target_sources (mbed-cm0p-bless
31
+ INTERFACE
32
+ psoc6cm0p/COMPONENT_CM0P_BLESS/psoc6_cm0p_bless.c
33
+ )
61
34
62
- if ("CM0P_SECURE" IN_LIST MBED_TARGET_LABELS )
63
- target_sources (mbed-core
64
- INTERFACE
65
- psoc6cm0p/COMPONENT_CM0P_SECURE/psoc6_02_cm0p_secure.c
66
- psoc6cm0p/COMPONENT_CM0P_SECURE/psoc6_03_cm0p_secure.c
67
- )
68
- endif ()
35
+ add_library (mbed-cm0p-crypto INTERFACE )
36
+ target_sources (mbed-cm0p-crypto
37
+ INTERFACE
38
+ psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_01_cm0p_crypto.c
39
+ psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_02_cm0p_crypto.c
40
+ psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_03_cm0p_crypto.c
41
+ psoc6cm0p/COMPONENT_CM0P_CRYPTO/psoc6_04_cm0p_crypto.c
42
+ )
69
43
70
- if ("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS )
71
- target_sources (mbed-core
72
- INTERFACE
73
- psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_01_cm0p_sleep.c
74
- psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_02_cm0p_sleep.c
75
- psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_03_cm0p_sleep.c
76
- psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_04_cm0p_sleep.c
77
- )
78
- endif ()
44
+ add_library (mbed-cm0p-secure INTERFACE )
45
+ target_sources (mbed-cm0p-secure
46
+ INTERFACE
47
+ psoc6cm0p/COMPONENT_CM0P_SECURE/psoc6_02_cm0p_secure.c
48
+ psoc6cm0p/COMPONENT_CM0P_SECURE/psoc6_03_cm0p_secure.c
49
+ )
79
50
80
- if ("UDB_SDIO_P12" IN_LIST MBED_TARGET_LABELS )
81
- target_include_directories (mbed-core
82
- INTERFACE
83
- common/udb-sdio-whd/COMPONENT_UDB_SDIO_P12
84
- )
51
+ add_library (mbed-cm0p-sleep INTERFACE )
52
+ target_sources (mbed-cm0p-sleep
53
+ INTERFACE
54
+ psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_01_cm0p_sleep.c
55
+ psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_02_cm0p_sleep.c
56
+ psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_03_cm0p_sleep.c
57
+ psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_04_cm0p_sleep.c
58
+ )
85
59
86
- target_sources (mbed-core
87
- INTERFACE
88
- common/udb-sdio-whd/COMPONENT_UDB_SDIO_P12/SDIO_HOST_cfg.c
89
- )
90
- elseif ( "UDB_SDIO_P2" IN_LIST MBED_TARGET_LABELS )
91
- target_include_directories (mbed-core
92
- INTERFACE
93
- common/udb-sdio-whd/COMPONENT_UDB_SDIO_P2
94
- )
60
+ add_library (mbed-udb-sdio-p12 INTERFACE )
61
+ target_include_directories ( mbed-udb-sdio-p12
62
+ INTERFACE
63
+ common/udb-sdio-whd/COMPONENT_UDB_SDIO_P12
64
+ )
65
+ target_sources (mbed-udb-sdio-p12
66
+ INTERFACE
67
+ common/udb-sdio-whd/COMPONENT_UDB_SDIO_P12/SDIO_HOST_cfg.c
68
+ )
95
69
96
- target_sources (mbed-core
97
- INTERFACE
98
- common/udb-sdio-whd/COMPONENT_UDB_SDIO_P2/SDIO_HOST_cfg.c
99
- )
100
- elseif ( "UDB_SDIO_P9" IN_LIST MBED_TARGET_LABELS )
101
- target_include_directories (mbed-core
102
- INTERFACE
103
- common/udb-sdio-whd/COMPONENT_UDB_SDIO_P9
104
- )
70
+ add_library (mbed-udb-sdio-p2 INTERFACE )
71
+ target_include_directories ( mbed-udb-sdio-p2
72
+ INTERFACE
73
+ common/udb-sdio-whd/COMPONENT_UDB_SDIO_P2
74
+ )
75
+ target_sources (mbed-udb-sdio-p2
76
+ INTERFACE
77
+ common/udb-sdio-whd/COMPONENT_UDB_SDIO_P2/SDIO_HOST_cfg.c
78
+ )
105
79
106
- target_sources (mbed-core
107
- INTERFACE
108
- common/udb-sdio-whd/COMPONENT_UDB_SDIO_P9/SDIO_HOST_cfg.c
109
- )
110
- endif ()
80
+ add_library (mbed-udb-sdio-p9 INTERFACE )
81
+ target_include_directories (mbed-udb-sdio-p9
82
+ INTERFACE
83
+ common/udb-sdio-whd/COMPONENT_UDB_SDIO_P9
84
+ )
85
+ target_sources (mbed-udb-sdio-p9
86
+ INTERFACE
87
+ common/udb-sdio-whd/COMPONENT_UDB_SDIO_P9/SDIO_HOST_cfg.c
88
+ )
111
89
112
- target_include_directories (mbed-core
90
+ add_library (mbed-psoc6 INTERFACE )
91
+ target_include_directories (mbed-psoc6
113
92
INTERFACE
114
93
.
115
94
common
@@ -130,7 +109,7 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
130
109
set (ASSEMBLY_ROUTINES psoc6pdl/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.S )
131
110
endif ()
132
111
133
- target_sources (mbed-core
112
+ target_sources (mbed-psoc6
134
113
INTERFACE
135
114
cy_analogin_api.c
136
115
cy_analogout_api.c
@@ -300,3 +279,8 @@ target_sources(mbed-core
300
279
301
280
${ASSEMBLY_ROUTINES}
302
281
)
282
+
283
+ # TODO: Include only if mbed-baremetal is not used
284
+ if ("CY_RTOS_AWARE" IN_LIST MBED_CONFIG_DEFINITIONS )
285
+ target_link_libraries (mbed-psoc6 INTERFACE mbed-cy-rtos mbed-cy-rtx )
286
+ endif ()
0 commit comments