diff options
| author | luo jiao <[email protected]> | 2018-05-21 11:13:46 +0800 |
|---|---|---|
| committer | luo jiao <[email protected]> | 2018-05-21 17:15:05 +0800 |
| commit | 4f4a04437fcb7c8fead289d1eb8202f136024691 (patch) | |
| tree | 77486dd937f3fd016ba1bfb71e2fc3ca77823ed2 /bsp/gd32303e-eval/Libraries/SConscript | |
| parent | a99b09658e6e1ef9fa45b2095ffaa5976fcdef0b (diff) | |
add gd32303e-eval BSP
Diffstat (limited to 'bsp/gd32303e-eval/Libraries/SConscript')
| -rw-r--r-- | bsp/gd32303e-eval/Libraries/SConscript | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/bsp/gd32303e-eval/Libraries/SConscript b/bsp/gd32303e-eval/Libraries/SConscript new file mode 100644 index 0000000000..a3c216f847 --- /dev/null +++ b/bsp/gd32303e-eval/Libraries/SConscript @@ -0,0 +1,36 @@ +import rtconfig +from building import * + +# get current directory +cwd = GetCurrentDir() + +# The set of source files associated with this SConscript file. + +src = Glob('GD32F30x_standard_peripheral/Source/*.c') +src += [cwd + '/CMSIS/GD/GD32F30x/Source/system_gd32f30x.c'] + +#add for startup script +if rtconfig.CROSS_TOOL == 'gcc': + print('=================================================') + print('Not support gcc yet !') + print('=================================================') + exit(0) +elif rtconfig.CROSS_TOOL == 'keil': + src += [cwd + '/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_hd.s'] +elif rtconfig.CROSS_TOOL == 'iar': + src += [cwd + '/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_hd.s'] + +path = [ + cwd + '/CMSIS/GD/GD32F30x/Include', + cwd + '/CMSIS', + cwd + '/GD32F30x_standard_peripheral/Include',] + +if GetDepend(['RT_USING_BSP_USB']): + path += [cwd + '/GD32F30x_usb_driver/Include'] + src += [cwd + '/GD32F30x_usb_driver/Source'] + +CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F30X_HD'] + +group = DefineGroup('GD32_Lib', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) + +Return('group') |
