summaryrefslogtreecommitdiff
path: root/bsp/Infineon/psoc6-cy8ckit-062-BLE/libs/SConscript
blob: d033d14e923240d3f21c7b95aa2afbda4f8289a0 (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-062-BLE/*.c')
    src += Glob(cwd + '/TARGET_CY8CKIT-062-BLE/COMPONENT_CM4/*.c')
    src += Glob(cwd + '/TARGET_CY8CKIT-062-BLE/config/GeneratedSource/*.c')

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

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