2021-02-05 18:52:13 +08:00
|
|
|
|
# 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') ):
|
2021-03-25 10:38:57 +08:00
|
|
|
|
print ('Sorry, wrong selection.')
|
|
|
|
|
print ('[Hint] You already select BOARD_USING_USBD. Please de-select BSP_USING_OTG and BSP_USING_USBH.')
|
2021-02-05 18:52:13 +08:00
|
|
|
|
sys.exit(1)
|
|
|
|
|
elif GetDepend('BOARD_USING_USBH') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBD') ):
|
2021-03-25 10:38:57 +08:00
|
|
|
|
print ('Sorry, wrong selection.')
|
|
|
|
|
print ('[Hint] You already select BOARD_USING_USBH. Please de-select BSP_USING_OTG and BSP_USING_USBD options.')
|
2021-02-05 18:52:13 +08:00
|
|
|
|
sys.exit(1)
|
|
|
|
|
else:
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
|
|
Return('group')
|