summaryrefslogtreecommitdiff
path: root/bsp/nuvoton/libraries/m2354/rtt_port/SConscript
blob: 5dacdeed9b00866069a4d09a2a87c13c34df4530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# RT-Thread building script for component

Import('RTT_ROOT')
from building import *

cwd     = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp')
CPPPATH = [cwd]
group = []

# USB driver constrain
if GetDepend('BOARD_USING_USBD') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBH') ):
    print ('Sorry, wrong selection.')
    print ('[Hint] You already select BOARD_USING_USBD. Please de-select BSP_USING_OTG and BSP_USING_USBH.')
    sys.exit(1)
elif GetDepend('BOARD_USING_USBH') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBD') ):
    print ('Sorry, wrong selection.')
    print ('[Hint] You already select BOARD_USING_USBH. Please de-select BSP_USING_OTG and BSP_USING_USBD options.')
    sys.exit(1)
else:
    group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)

Return('group')