2022-04-14 10:54:53 +08:00
|
|
|
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.
|
2022-04-19 14:32:02 +08:00
|
|
|
|
2022-04-14 10:54:53 +08:00
|
|
|
src = Glob('hal/src/*.c')
|
|
|
|
src += Glob('hal/utils/src/*.c')
|
2022-04-19 14:32:02 +08:00
|
|
|
src += Glob('hpl/adc/*.c')
|
2022-04-14 10:54:53 +08:00
|
|
|
src += Glob('hpl/aes/*.c')
|
|
|
|
src += Glob('hpl/can/*.c')
|
|
|
|
src += Glob('hpl/cmcc/*.c')
|
|
|
|
src += Glob('hpl/core/*.c')
|
|
|
|
src += Glob('hpl/dmac/*.c')
|
|
|
|
src += Glob('hpl/gclk/*.c')
|
2022-04-19 14:32:02 +08:00
|
|
|
src += Glob('hpl/gmac/*.c')
|
2022-04-14 10:54:53 +08:00
|
|
|
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')
|
2022-04-19 14:32:02 +08:00
|
|
|
src += Glob('ethernet_phy/*.c')
|
2022-04-14 10:54:53 +08:00
|
|
|
src += [cwd + '/atmel_start.c']
|
|
|
|
src += [cwd + '/driver_init.c']
|
2022-04-19 14:32:02 +08:00
|
|
|
src += [cwd + '/ethernet_phy_main.c']
|
2022-04-14 10:54:53 +08:00
|
|
|
|
|
|
|
#add for startup script
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2022-04-14 10:54:53 +08:00
|
|
|
src += [cwd + '/gcc/system_same54.c']
|
|
|
|
src += [cwd + '/gcc/gcc/startup_same54.c']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2022-04-14 10:54:53 +08:00
|
|
|
src += [cwd + '/armcc/arm_addon/armcc/' + 'system_same54.c']
|
|
|
|
src += [cwd + '/armcc/arm_addon/armcc/arm/' + 'startup_same54.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2022-04-14 10:54:53 +08:00
|
|
|
src += [cwd + '/iar/' + 'system_same54.c']
|
|
|
|
src += [cwd + '/iar/iar/' + 'startup_same54.c']
|
|
|
|
|
|
|
|
path = [
|
|
|
|
cwd,
|
|
|
|
cwd + '/CMSIS/Core/Include',
|
|
|
|
cwd + '/config',
|
2022-04-19 14:32:02 +08:00
|
|
|
cwd + '/ethernet_phy',
|
2022-04-14 10:54:53 +08:00
|
|
|
cwd + '/hal/include',
|
|
|
|
cwd + '/hal/utils/include',
|
2022-04-19 14:32:02 +08:00
|
|
|
cwd + '/hpl/adc',
|
2022-04-14 10:54:53 +08:00
|
|
|
cwd + '/hpl/can',
|
|
|
|
cwd + '/hpl/core',
|
|
|
|
cwd + '/hpl/gclk',
|
|
|
|
cwd + '/hpl/pm',
|
|
|
|
cwd + '/hpl/port',
|
|
|
|
cwd + '/hri',
|
2022-04-19 14:32:02 +08:00
|
|
|
cwd + '/include',
|
|
|
|
cwd + '/../board',
|
|
|
|
cwd + '/../../common/applications']
|
2022-04-14 10:54:53 +08:00
|
|
|
|
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|