2011-02-17 11:33:15 +08:00
|
|
|
import rtconfig
|
|
|
|
from building import *
|
|
|
|
|
2011-11-29 17:15:10 +08:00
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
2011-02-17 11:33:15 +08:00
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
src = Split("""
|
|
|
|
CMSIS/CM3/CoreSupport/core_cm3.c
|
|
|
|
CMSIS/CM3/DeviceSupport/EnergyMicro/EFM32/system_efm32.c
|
|
|
|
efm32lib/src/efm32_acmp.c
|
|
|
|
efm32lib/src/efm32_adc.c
|
|
|
|
efm32lib/src/efm32_aes.c
|
|
|
|
efm32lib/src/efm32_assert.c
|
|
|
|
efm32lib/src/efm32_cmu.c
|
|
|
|
efm32lib/src/efm32_dac.c
|
|
|
|
efm32lib/src/efm32_dbg.c
|
|
|
|
efm32lib/src/efm32_dma.c
|
|
|
|
efm32lib/src/efm32_ebi.c
|
|
|
|
efm32lib/src/efm32_emu.c
|
|
|
|
efm32lib/src/efm32_gpio.c
|
|
|
|
efm32lib/src/efm32_i2c.c
|
|
|
|
efm32lib/src/efm32_lcd.c
|
|
|
|
efm32lib/src/efm32_letimer.c
|
|
|
|
efm32lib/src/efm32_leuart.c
|
|
|
|
efm32lib/src/efm32_mpu.c
|
|
|
|
efm32lib/src/efm32_msc.c
|
|
|
|
efm32lib/src/efm32_pcnt.c
|
|
|
|
efm32lib/src/efm32_prs.c
|
|
|
|
efm32lib/src/efm32_rmu.c
|
|
|
|
efm32lib/src/efm32_rtc.c
|
|
|
|
efm32lib/src/efm32_system.c
|
|
|
|
efm32lib/src/efm32_timer.c
|
|
|
|
efm32lib/src/efm32_usart.c
|
|
|
|
efm32lib/src/efm32_vcmp.c
|
|
|
|
efm32lib/src/efm32_wdog.c
|
|
|
|
""")
|
|
|
|
|
2011-06-20 09:56:28 +08:00
|
|
|
# starupt scripts for each EFM32 family
|
2011-07-08 15:13:20 +08:00
|
|
|
startup_scripts = {}
|
|
|
|
startup_scripts['TinyGecko'] = 'startup_efm32tg.s'
|
2011-12-16 09:05:50 +08:00
|
|
|
startup_scripts['Gecko'] = 'startup_efm32.s'
|
|
|
|
startup_scripts['Giant Gecko'] = 'startup_efm32gg.s'
|
2011-06-20 09:56:28 +08:00
|
|
|
|
|
|
|
# linker scripts for each EFM32 family
|
2011-12-27 15:44:29 +08:00
|
|
|
linker_scripts = {}
|
|
|
|
linker_scripts['TinyGecko'] = 'efm32tg.ld'
|
|
|
|
linker_scripts['Gecko'] = 'efm32g.ld'
|
|
|
|
linker_scripts['Giant Gecko'] = 'efm32gg.ld'
|
2011-06-20 09:56:28 +08:00
|
|
|
|
2011-12-27 15:44:29 +08:00
|
|
|
startup_scripts[rtconfig.EFM32_FAMILY] = 'CMSIS/CM3/DeviceSupport/EnergyMicro/EFM32/startup/cs3/' + startup_scripts[rtconfig.EFM32_FAMILY]
|
|
|
|
linker_scripts[rtconfig.EFM32_FAMILY] = cwd + '/CMSIS/CM3/DeviceSupport/EnergyMicro/EFM32/startup/cs3/' + linker_scripts[rtconfig.EFM32_FAMILY]
|
|
|
|
src = src + [startup_scripts[rtconfig.EFM32_FAMILY]]
|
2011-12-16 09:05:50 +08:00
|
|
|
|
|
|
|
path = [cwd + '/efm32lib/inc',
|
2011-11-29 17:15:10 +08:00
|
|
|
cwd + '/CMSIS/CM3/CoreSupport',
|
|
|
|
cwd + '/CMSIS/CM3/DeviceSupport/EnergyMicro/EFM32']
|
2011-02-17 11:33:15 +08:00
|
|
|
|
2011-11-29 17:15:10 +08:00
|
|
|
CPPDEFINES = [rtconfig.EFM32_TYPE]
|
2011-12-27 15:44:29 +08:00
|
|
|
#group = DefineGroup('EFM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES, LINKFLAGS = linker_scripts[rtconfig.EFM32_FAMILY])
|
2011-06-20 09:56:28 +08:00
|
|
|
group = DefineGroup('EFM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
2011-02-17 11:33:15 +08:00
|
|
|
|
|
|
|
Return('group')
|