2022-07-05 16:45:32 +08:00
|
|
|
from building import *
|
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = []
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
src = Split('''
|
|
|
|
mtb-hal-cat1/source/cyhal_clock.c
|
|
|
|
mtb-hal-cat1/source/cyhal_hwmgr.c
|
|
|
|
mtb-hal-cat1/source/cyhal_syspm.c
|
|
|
|
mtb-hal-cat1/source/cyhal_system.c
|
|
|
|
mtb-hal-cat1/source/cyhal_uart.c
|
|
|
|
mtb-hal-cat1/source/cyhal_gpio.c
|
|
|
|
mtb-hal-cat1/source/cyhal_scb_common.c
|
|
|
|
mtb-hal-cat1/source/cyhal_interconnect.c
|
|
|
|
mtb-hal-cat1/source/cyhal_utils_psoc.c
|
|
|
|
mtb-hal-cat1/source/cyhal_utils.c
|
|
|
|
mtb-hal-cat1/source/cyhal_lptimer.c
|
2023-01-09 10:14:23 +08:00
|
|
|
mtb-hal-cat1/source/cyhal_irq_psoc.c
|
2022-07-05 16:45:32 +08:00
|
|
|
mtb-pdl-cat1/drivers/source/cy_sysclk.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_systick.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_gpio.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_sysint.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_syslib.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_scb_i2c.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_syspm.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_mcwdt.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_ipc_pipe.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_ipc_sema.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_ipc_drv.c
|
|
|
|
mtb-pdl-cat1/drivers/source/cy_trigmux.c
|
2023-01-09 10:14:23 +08:00
|
|
|
mtb-pdl-cat1/drivers/source/cy_prot.c
|
2023-01-12 15:12:14 +08:00
|
|
|
mtb-pdl-cat1/drivers/source/cy_scb_common.c
|
2022-07-05 16:45:32 +08:00
|
|
|
''')
|
|
|
|
|
2023-01-12 15:12:14 +08:00
|
|
|
if GetDepend(['SOC_CY8C624ABZI_S2D44']):
|
|
|
|
src += ['mtb-pdl-cat1/devices/COMPONENT_CAT1A/source/cy_device.c']
|
|
|
|
src += ['mtb-hal-cat1/COMPONENT_CAT1A/source/triggers/cyhal_triggers_psoc6_02.c']
|
|
|
|
src += ['mtb-hal-cat1/COMPONENT_CAT1A/source/pin_packages/cyhal_psoc6_02_124_bga.c']
|
|
|
|
src += Glob('psoc6cm0p/COMPONENT_CM0P_SLEEP/*.c')
|
2022-07-05 16:45:32 +08:00
|
|
|
|
|
|
|
if GetDepend(['RT_USING_SERIAL']):
|
|
|
|
src += ['retarget-io/cy_retarget_io.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_uart.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_scb_uart.c']
|
|
|
|
|
|
|
|
if GetDepend(['RT_USING_ADC']):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_dma_dw.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_dma_dmac.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_dma.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_adc_sar.c']
|
2023-01-12 15:12:14 +08:00
|
|
|
src += ['mtb-hal-cat1/source/cyhal_analog_common.c']
|
2022-07-05 16:45:32 +08:00
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_dma.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_sar.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_dmac.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_sysanalog.c']
|
|
|
|
|
2022-07-22 10:22:21 +08:00
|
|
|
if GetDepend(['RT_USING_SDIO']):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_sdhc.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_sd_host.c']
|
|
|
|
|
2022-07-18 11:43:07 +08:00
|
|
|
if GetDepend(['RT_USING_PWM']):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_pwm.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_timer.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_tcpwm_common.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_tcpwm_pwm.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_tcpwm_counter.c']
|
|
|
|
|
2022-07-20 12:39:42 +08:00
|
|
|
if GetDepend(['RT_USING_SPI']):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_spi.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_scb_spi.c']
|
|
|
|
|
2022-07-08 17:07:28 +08:00
|
|
|
if GetDepend(['RT_USING_I2C']):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_i2c.c']
|
|
|
|
|
2022-07-26 12:52:25 +08:00
|
|
|
if GetDepend('BSP_USING_RTC'):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_rtc.c']
|
2023-01-12 15:12:14 +08:00
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_rtc.c']
|
2022-07-26 12:52:25 +08:00
|
|
|
|
2022-07-27 15:41:25 +08:00
|
|
|
if GetDepend('BSP_USING_ON_CHIP_FLASH'):
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_flash.c']
|
2023-01-12 15:12:14 +08:00
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_flash.c']
|
2022-07-27 15:41:25 +08:00
|
|
|
|
2022-07-28 15:16:35 +08:00
|
|
|
if GetDepend(['BSP_USING_SLIDER']):
|
|
|
|
src += ['capsense/cy_capsense_control.c']
|
|
|
|
src += ['capsense/cy_capsense_sensing.c']
|
|
|
|
src += ['capsense/cy_capsense_sensing_v2.c']
|
|
|
|
src += ['capsense/cy_capsense_csx_v2.c']
|
|
|
|
src += ['capsense/cy_capsense_csd_v2.c']
|
|
|
|
src += ['capsense/cy_capsense_processing.c']
|
|
|
|
src += ['capsense/cy_capsense_tuner.c']
|
|
|
|
src += ['capsense/cy_capsense_structure.c']
|
|
|
|
src += ['capsense/cy_capsense_centroid.c']
|
|
|
|
src += ['capsense/cy_capsense_filter.c']
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_csd.c']
|
2023-01-12 15:12:14 +08:00
|
|
|
if rtconfig.PLATFORM in ['armclang']:
|
|
|
|
src += ['lib/cy_capsense.lib']
|
2022-07-28 15:16:35 +08:00
|
|
|
|
2022-07-22 10:22:21 +08:00
|
|
|
if GetDepend(['RT_USING_WDT']):
|
|
|
|
src += ['mtb-pdl-cat1/drivers/source/cy_wdt.c']
|
|
|
|
src += ['mtb-hal-cat1/source/cyhal_wdt.c']
|
|
|
|
|
2022-08-10 00:36:36 +08:00
|
|
|
if GetDepend(['RT_USING_DAC']):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['mtb_shared/csdidac/cy_csdidac.c']
|
2022-08-10 00:36:36 +08:00
|
|
|
|
2022-08-10 00:18:48 +08:00
|
|
|
if GetDepend(['RT_USING_HWTIMER']):
|
2023-01-09 10:14:23 +08:00
|
|
|
src += ['mtb-hal-cat1/source/cyhal_timer.c']
|
2022-08-10 00:18:48 +08:00
|
|
|
|
2023-01-12 15:12:14 +08:00
|
|
|
path = [cwd + '/retarget-io',
|
2022-07-05 16:45:32 +08:00
|
|
|
cwd + '/core-lib/include',
|
2022-08-10 00:36:36 +08:00
|
|
|
cwd + '/mtb_shared/usbdev',
|
|
|
|
cwd + '/mtb_shared/csdidac',
|
2023-01-12 15:12:14 +08:00
|
|
|
cwd + '/mtb_shared/serial-flash',
|
2022-07-05 16:45:32 +08:00
|
|
|
cwd + '/mtb-pdl-cat1/cmsis/include',
|
|
|
|
cwd + '/mtb-pdl-cat1/drivers/include',
|
2022-08-10 00:36:36 +08:00
|
|
|
cwd + '/mtb-hal-cat1/include_pvt',
|
2023-01-12 15:12:14 +08:00
|
|
|
cwd + '/mtb-hal-cat1/include']
|
|
|
|
|
|
|
|
if GetDepend(['SOC_CY8C624ABZI_S2D44']):
|
|
|
|
path += [cwd + '/psoc6cm0p']
|
|
|
|
path += [cwd + '/capsense']
|
|
|
|
path += [cwd + '/mtb-hal-cat1/COMPONENT_CAT1A/include']
|
|
|
|
path += [cwd + '/mtb-pdl-cat1/devices/COMPONENT_CAT1A/include']
|
2022-07-05 16:45:32 +08:00
|
|
|
|
2022-07-11 11:17:03 +08:00
|
|
|
group = DefineGroup('Libraries', src, depend=[''], CPPPATH=path)
|
2022-07-05 16:45:32 +08:00
|
|
|
|
|
|
|
Return('group')
|