75 lines
2.0 KiB
Python
75 lines
2.0 KiB
Python
import rtconfig
|
|
from building import *
|
|
|
|
# get current directory
|
|
cwd = GetCurrentDir()
|
|
|
|
#var defined
|
|
CPPDEFINES = []
|
|
|
|
#common lib define
|
|
CPPDEFINES += [rtconfig.DEVICE_TYPE]
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
src = Glob('hal/src/*.c')
|
|
src += Glob('hal/utils/src/*.c')
|
|
# src += Glob('hpl/adc/*.c')
|
|
# src += Glob('hpl/aes/*.c')
|
|
src += Glob('hpl/cmcc/*.c')
|
|
src += Glob('hpl/core/*.c')
|
|
src += Glob('hpl/dmac/*.c')
|
|
src += Glob('hpl/gclk/*.c')
|
|
src += Glob('hpl/mclk/*.c')
|
|
src += Glob('hpl/osc32kctrl/*.c')
|
|
src += Glob('hpl/oscctrl/*.c')
|
|
src += Glob('hpl/pm/*.c')
|
|
src += Glob('hpl/port/*.c')
|
|
src += Glob('hpl/ramecc/*.c')
|
|
src += Glob('hpl/sercom/*.c')
|
|
src += Glob('hpl/usb/*.c')
|
|
src += Glob('hpl/usb/*.c')
|
|
src += Glob('usb/*.c')
|
|
src += Glob('usb/device/*.c')
|
|
src += Glob('usb/class/cdc/device/*.c')
|
|
src += [cwd + '/atmel_start.c']
|
|
src += [cwd + '/driver_init.c']
|
|
src += [cwd + '/usb_start.c']
|
|
|
|
#add for startup script
|
|
if rtconfig.PLATFORM in ['gcc']:
|
|
src += [cwd + '/samd51a/gcc/system_samd51.c']
|
|
src += [cwd + '/samd51a/gcc/gcc/startup_samd51.c']
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
|
src += [cwd + '/samd51a/armcc/Device/SAMD51/Source/' + 'system_samd51.c']
|
|
src += [cwd + '/samd51a/armcc/Device/SAMD51/Source/ARM/' + 'startup_samd51.s']
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
|
src += [cwd + '/samd51a/iar/' + 'system_samd51.c']
|
|
src += [cwd + '/samd51a/iar/iar/' + 'startup_samd51.c']
|
|
|
|
path = [
|
|
cwd,
|
|
cwd + '/CMSIS/Core/Include',
|
|
cwd + '/config',
|
|
cwd + '/hal/include',
|
|
cwd + '/hal/utils/include',
|
|
# cwd + '/hpl/adc',
|
|
cwd + '/hpl/core',
|
|
cwd + '/hpl/gclk',
|
|
cwd + '/hpl/pm',
|
|
cwd + '/hpl/port',
|
|
cwd + '/hpl/usb',
|
|
cwd + '/hri',
|
|
cwd + '/usb',
|
|
cwd + '/usb/class/cdc',
|
|
cwd + '/usb/class/cdc/device',
|
|
cwd + '/usb/device',
|
|
cwd + '/samd51a/include',
|
|
cwd + '/../board',
|
|
cwd + '/../../common/applications'
|
|
]
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
Return('group')
|