summaryrefslogtreecommitdiff
path: root/bsp/gd32105c-eval/Libraries/SConscript
blob: b77e069f46588c7aca5ac6089b8c86281d11a64e (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
import rtconfig
from building import *

# get current directory
cwd = GetCurrentDir()

# The set of source files associated with this SConscript file.

src = Glob('GD32F10x_standard_peripheral/Source/*.c')
src += [cwd + '/CMSIS/GD/GD32F10x/Source/system_gd32f10x.c']

#add for startup script
if rtconfig.PLATFORM in ['gcc']:
    src += [cwd + '/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.S']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
    src += [cwd + '/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s']
elif rtconfig.PLATFORM in ['iccarm']:
    src += [cwd + '/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']

path = [
    cwd + '/CMSIS/GD/GD32F10x/Include',
    cwd + '/CMSIS',
    cwd + '/GD32F10x_standard_peripheral/Include',]

if GetDepend(['RT_USING_BSP_USB']):
    path += [cwd + '/GD32F10x_usbfs_driver/Include']
    src  += [cwd + '/GD32F10x_usbfs_driver/Source']

CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F10X_CL']

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

Return('group')