diff options
| author | tanek liang <[email protected]> | 2017-08-22 15:52:57 +0800 |
|---|---|---|
| committer | tanek liang <[email protected]> | 2017-08-30 11:07:54 +0800 |
| commit | 2c056a3aadc90dc3afee3e52ab607d0a35010d00 (patch) | |
| tree | 74ef0d0677311de9f1666a4c7dd810b28faa5a4c /bsp/gd32450z-eval/Libraries/SConscript | |
| parent | f3f523d22fbbf4766b05290b6160a2bb19309da1 (diff) | |
add gd32f450 bsp
Diffstat (limited to 'bsp/gd32450z-eval/Libraries/SConscript')
| -rw-r--r-- | bsp/gd32450z-eval/Libraries/SConscript | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/bsp/gd32450z-eval/Libraries/SConscript b/bsp/gd32450z-eval/Libraries/SConscript new file mode 100644 index 0000000000..e4a83cde55 --- /dev/null +++ b/bsp/gd32450z-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('GD32F4xx_standard_peripheral/Source/*.c') +src += [cwd + '/CMSIS/GD/GD32F4xx/Source/system_gd32f4xx.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/GD32F4xx/Source/ARM/startup_gd32f4xx.s'] +elif rtconfig.CROSS_TOOL == 'iar': + src += [cwd + '/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s'] + +path = [ + cwd + '/CMSIS/GD/GD32F4xx/Include', + cwd + '/CMSIS', + cwd + '/GD32F4xx_standard_peripheral/Include',] + +if GetDepend(['RT_USING_BSP_USB']): + path += [cwd + '/GD32F4xx_usb_driver/Include'] + src += [cwd + '/GD32F4xx_usb_driver/Source'] + +CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F4XX'] + +group = DefineGroup('GD32_Lib', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) + +Return('group') |
