summaryrefslogtreecommitdiff
path: root/bsp/ht32/libraries/HT32_STD_1xxxx_FWLib/SConscript
blob: 51cae3c0bc4cd9af785a4366cd0da77aa46e0c5e (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
import os
import sys
import rtconfig
from building import *
Import('rtconfig')

tools_paths = [
    os.path.normpath(os.path.join(GetCurrentDir(), '..', '..', 'tools')),
    os.path.normpath(os.path.join(GetCurrentDir(), '..', '..')),
]
sys.path.extend(tools_paths)
from sdk_dist import get_source

source_file_path = os.path.join(GetCurrentDir(), 'Source_file')
base_path = 'library/HT32F1xxxx_Driver/src/'
system_path = 'library/Device/Holtek/HT32F1xxxx/Source/'
source_path = []
ic_list = [
    'HT32F1654',
    'HT32F1656',
    'HT32F12345',
    'HT32F12364',
    'HT32F12366'
]

cwd = GetCurrentDir()
src = []

for ic_name in ic_list:
    if GetDepend(['SOC_' + ic_name]):
        source_path = get_source(ic_name,source_file_path,system_path,base_path)

src = Split(source_path)

path = [
    cwd + '/library/HT32F1xxxx_Driver/inc',
    cwd + '/library/CMSIS/Include',
    cwd + '/library/Device/Holtek/HT32F1xxxx/Include'
]

CPPDEFINES = ['USE_HT32_DRIVER']

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

Return('group')