summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authoraozima <[email protected]>2018-12-02 17:09:38 +0800
committeraozima <[email protected]>2018-12-03 20:22:59 +0800
commit62058e18feddc2dc6acf14964bc6a8850e5746ab (patch)
treed9a4c4d6923d445852a290d2debcb8dd8044b6a5 /bsp
parentcdf3f7e670bec051a39850341fdce5c0d7629b53 (diff)
[bsp][samd21] update scons script.
Diffstat (limited to 'bsp')
-rw-r--r--bsp/samd21/rtconfig.py4
-rw-r--r--bsp/samd21/sam_d2x_asflib/SConscript14
2 files changed, 14 insertions, 4 deletions
diff --git a/bsp/samd21/rtconfig.py b/bsp/samd21/rtconfig.py
index 2f2460e77b..ce47aec5f0 100644
--- a/bsp/samd21/rtconfig.py
+++ b/bsp/samd21/rtconfig.py
@@ -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'
diff --git a/bsp/samd21/sam_d2x_asflib/SConscript b/bsp/samd21/sam_d2x_asflib/SConscript
index 7561fea0fe..d50a1213a9 100644
--- a/bsp/samd21/sam_d2x_asflib/SConscript
+++ b/bsp/samd21/sam_d2x_asflib/SConscript
@@ -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