SConscript 1021 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import os
import rtconfig
from building import *

Import('SDK_LIB')

objs = []
cwd = GetCurrentDir()
list = os.listdir(cwd)

# add general drivers
src = Split('''
board.c
''')

R
Rbb666 已提交
16 17 18 19 20 21
if GetDepend(['BSP_USING_SPI3_SAMPLE']):
    src += Glob('ports/spi_sample.c')

if GetDepend(['BSP_USING_RW007']):
    src += Glob('ports/drv_rw007.c')

R
Rbb666 已提交
22 23 24
if GetDepend(['BSP_USING_SLIDER']):
    src += Glob('ports/slider_sample.c')

25
path = [cwd]
R
Rbb666 已提交
26
path += [cwd + '/ports']
27 28 29

startup_path_prefix = SDK_LIB

30
if rtconfig.PLATFORM in ['gcc']:
R
Rbb666 已提交
31 32
    src += [startup_path_prefix +
            '/IFX_PSOC6_HAL/mtb-pdl-cat1/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.S']
33
elif rtconfig.PLATFORM in ['armclang']:
R
Rbb666 已提交
34 35
    src += [startup_path_prefix +
            '/IFX_PSOC6_HAL/mtb-pdl-cat1/drivers/source/TOOLCHAIN_ARM/cy_syslib_mdk.S']
36

37
CPPDEFINES = ['CY8C624ABZI_S2D44', 'CY_USING_HAL', 'COMPONENT_CAT1A', 'COMPONENT_CAT1', 'COMPONENT_BSP_DESIGN_MODUS']
38 39
group = DefineGroup('Drivers', src, depend=[''], CPPPATH=path, CPPDEFINES=CPPDEFINES)

mysterywolf's avatar
mysterywolf 已提交
40
Return('group')