summaryrefslogtreecommitdiff
path: root/bsp/Infineon/libraries/templates/PSOC62/libs/SConscript
blob: 05dcfc0e3b98bb197bafb5044d473eae6b86bd1f (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
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 += Glob(cwd + '/TARGET_CY8CKIT-062S2-43012/*.c')
    src += Glob(cwd + '/TARGET_CY8CKIT-062S2-43012/COMPONENT_CM4/*.c')
    src += Glob(cwd + '/TARGET_CY8CKIT-062S2-43012/config/GeneratedSource/*.c')

    CPPPATH = [ cwd + '/TARGET_CY8CKIT-062S2-43012',
                cwd + '/TARGET_CY8CKIT-062S2-43012/config/GeneratedSource']
    if rtconfig.PLATFORM in ['gcc']:
        src += [cwd + '/TARGET_CY8CKIT-062S2-43012/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S']
    elif rtconfig.PLATFORM in ['armclang']:
        src += [cwd + '/TARGET_CY8CKIT-062S2-43012/COMPONENT_CM4/TOOLCHAIN_ARM/startup_psoc6_02_cm4.S']

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