1import os
2import rtconfig
3from building import *
4
5Import('SDK_LIB')
6
7cwd = GetCurrentDir()
8
9# add general drivers
10src = Split('''
11board.c
12''')
13
14path =  [cwd]
15
16startup_path_prefix = SDK_LIB
17
18if rtconfig.PLATFORM in ['armcc', 'armclang']:
19    src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/arm/startup_apm32f40x.s']
20
21if rtconfig.PLATFORM in ['iccarm']:
22    src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/iar/startup_apm32f40x.s']
23
24if rtconfig.PLATFORM in ['gcc']:
25    src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/gcc/startup_apm32f40x.s']
26
27# You can select chips from the list above
28CPPDEFINES = ['APM32F40X']
29group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
30Return('group')
31