summaryrefslogtreecommitdiff
path: root/bsp/hc32/tests/SConscript
blob: 3733761301b1ef10972ee3265a8d786d3d3a3dd4 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Import('RTT_ROOT')
Import('rtconfig')

from building import *
import os

cwd = GetCurrentDir()
# add the app files.
src = []

if GetDepend(['RT_USING_SERIAL']):
    if GetDepend(['RT_USING_SERIAL_V2']):
        src += ['test_uart_v2.c']
    else:
        src += ['test_uart_v1.c']

if GetDepend(['BSP_USING_SPI']):
    src += ['test_spi.c']

if GetDepend(['BSP_USING_QSPI']):
    src += ['test_qspi.c']

if GetDepend(['BSP_USING_I2C']):
    src += ['test_i2c.c']
    if GetDepend(['RT_USING_I2C_BITOPS']):
        src += ['test_soft_i2c.c']

if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']):
    src += ['test_eth.c']
    #lwIP: HTTP server
    lwiphttp_src = []
    lwiphttp_src = Split("""
    ../../../components/net/lwip/lwip-2.1.2/src/apps/http/altcp_proxyconnect.c
    ../../../components/net/lwip/lwip-2.1.2/src/apps/http/fs.c
    ../../../components/net/lwip/lwip-2.1.2/src/apps/http/http_client.c
    ../../../components/net/lwip/lwip-2.1.2/src/apps/http/httpd.c
    """)
    src += lwiphttp_src

if GetDepend(['BSP_USING_ADC']):
    src += ['test_adc.c']

if GetDepend(['BSP_USING_DAC']):
    src += ['test_dac.c']

if GetDepend(['BSP_USING_CAN']) or GetDepend(['BSP_USING_MCAN']):
    src += ['test_can.c']

if GetDepend(['BSP_USING_RTC']):
    src += ['test_rtc.c']

if GetDepend(['BSP_USING_WDT']) or GetDepend(['BSP_USING_SWDT']):
    src += ['test_wdt.c']

if GetDepend(['BSP_USING_CLOCK_TIMER']):
    src += ['test_clock_timer.c']

if GetDepend(['BSP_USING_PULSE_ENCODER']):
    src += ['test_pulse_encoder.c']

if GetDepend(['BSP_USING_PWM']):
    src += ['test_pwm.c']

if GetDepend(['BSP_USING_INPUT_CAPTURE']):
    src += ['test_tmr_capture.c']

if GetDepend(['BSP_USING_PM']):
    src += ['test_pm.c']

if GetDepend('BSP_USING_HWCRYPTO'):
    src += ['test_crypto.c']

if GetDepend(['BSP_USING_SDIO']):
    src += ['test_sdmmc.c']

if GetDepend(['BSP_USING_EXMC', 'BSP_USING_SDRAM']):
    src += ['test_sdram.c']

if GetDepend(['BSP_USING_EXMC', 'BSP_USING_NAND']):
    src += ['test_nand.c']

if GetDepend(['BSP_USING_USBD']):
    src += ['test_usbd.c']

if GetDepend(['BSP_USING_USBH']):
    src += ['test_usbh.c']

if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
    src += ['test_fal.c']

if GetDepend(['BSP_USING_GPIO']):
    src += ['test_gpio.c']

if GetDepend(['RT_USING_CHERRYUSB']):
    src += ['test_cherryusb.c']

path = [cwd]

group = DefineGroup('Tests', src, depend = [''], CPPPATH = path)

Return('group')