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 ['gcc']: 19 src += [startup_path_prefix + '/FT32F0xx/CMSIS/FT32F0xx/source/gcc/startup_ft32f072xb.s'] 20elif rtconfig.PLATFORM in ['armcc', 'armclang']: 21 src += [startup_path_prefix + '/FT32F0xx/CMSIS/FT32F0xx/source/arm/startup_ft32f072xb.s'] 22elif rtconfig.PLATFORM in ['iccarm']: 23 src += [startup_path_prefix + '/FT32F0xx/CMSIS/FT32F0xx/source/iar/startup_ft32f072xb.s'] 24 25# FT32F072x8 || FT32F072xB 26# You can select chips from the list above 27CPPDEFINES = ['FT32F072xB'] 28group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 29Return('group') 30