summaryrefslogtreecommitdiff
path: root/bsp/Infineon/psoc6-evaluationkit-062S2/libs/SConscript
blob: 10deeea8c67931a20949e1fa84c8f7a0144847d9 (plain)
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
Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd = GetCurrentDir()
src = []
group = []
CPPPATH = []

if rtconfig.PLATFORM in ['iccarm']:
    print("\nThe current project does not support IAR build\n")
    Return('group')
elif rtconfig.PLATFORM in ['gcc', 'armclang']:
    src += [cwd + '/TARGET_RTT-062S2/cybsp.c']
    src += [cwd + '/TARGET_RTT-062S2/COMPONENT_CM4/system_psoc6_cm4.c']
    src += Glob(cwd + '/TARGET_RTT-062S2/config/GeneratedSource/*.c')

    CPPPATH = [ cwd + '/TARGET_RTT-062S2',
                cwd + '/TARGET_RTT-062S2/config/GeneratedSource',
                cwd + '/TARGET_RTT-062S2/config',
                cwd + '/TARGET_RTT-062S2/bluetooth'
                ]
    if GetDepend(['BSP_USING_CYW43012_BT']):
        src += Glob(cwd + '/TARGET_RTT-062S2/bluetooth/*.c')

    if rtconfig.PLATFORM in ['gcc']:
        src += [cwd + '/TARGET_RTT-062S2/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S']
    elif rtconfig.PLATFORM in ['armclang']:
        src += [cwd + '/TARGET_RTT-062S2/COMPONENT_CM4/TOOLCHAIN_ARM/startup_psoc6_02_cm4.S']

group = DefineGroup('libs', src, depend = [''], CPPPATH = CPPPATH)
Return('group')