[bsp][samd21] update scons script.

This commit is contained in:
aozima 2018-12-02 17:09:38 +08:00
parent cdf3f7e670
commit 62058e18fe
2 changed files with 14 additions and 4 deletions

View File

@ -18,6 +18,10 @@ DEVICE_TYPE = '__SAMD21J18A__'
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin'
print('================ERROR============================')
print('Not support gcc yet!')
print('=================================================')
exit(0)
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil'

View File

@ -31,13 +31,19 @@ if rtconfig.DEVICE_SERIES == 'SAMD20':
path += [cwd + '/sam0/', cwd + '/sam0/utils/cmsis/samd20/include/']
path += [cwd + '/sam0/utils/cmsis/samd20/source/']
src += Glob('./sam0/utils/cmsis/samd20/source/*.c')
src += Glob('./sam0/utils/cmsis/samd20/source/arm/*.s')
if rtconfig.CROSS_TOOL == 'gcc':
src += Glob('./sam0/utils/cmsis/samd20/source/gcc/*.s')
elif rtconfig.CROSS_TOOL == 'keil':
src += Glob('./sam0/utils/cmsis/samd20/source/arm/*.s')
elif rtconfig.DEVICE_SERIES == 'SAMD21':
#D21
path += [cwd + '/sam0/utils/cmsis/samd21/include/']
path += [cwd + '/sam0/utils/cmsis/samd21/source/']
src += Glob('./sam0/utils/cmsis/samd21/source/*.c')
src += Glob('./sam0/utils/cmsis/samd21/source/arm/*.s')
if rtconfig.CROSS_TOOL == 'gcc':
src += Glob('./sam0/utils/cmsis/samd21/source/gcc/*.s')
elif rtconfig.CROSS_TOOL == 'keil':
src += Glob('./sam0/utils/cmsis/samd21/source/arm/*.s')
#sam0/drivers/system
path += [cwd + '/sam0/drivers/system/']
@ -68,8 +74,8 @@ elif rtconfig.DEVICE_SERIES == 'SAMD21':
path += [cwd + '/sam0/drivers/sercom', cwd + '/sam0/drivers/sercom/usart']
src += Glob('./sam0/drivers/sercom/*.c')
src += Glob('./sam0/drivers/sercom/usart/*.c')
SrcRemove(src, 'sercom_interrupt.c')
SrcRemove(src, 'usart_interrupt.c')
SrcRemove(src, './sam0/drivers/sercom/sercom_interrupt.c')
SrcRemove(src, './sam0/drivers/sercom/usart/usart_interrupt.c')
CPPDEFINES += ['USART_CALLBACK_MODE=false']
#sam0/drivers/port