ea6d73f140
1. Upgrade Cortex driver library (CMSIS -> CMSIS & Device): version 2.3.2 -> 3.0.1 & 3.0.0 - Remove "bsp/efm32/Libraries/CMSIS/Lib/ARM", "bsp/efm32/Libraries/CMSIS/Lib/G++" and "bsp/efm32/Libraries/CMSIS/SVD" to save space 2. Upgrade EFM32 driver libraries (efm32lib -> emlib): version 2.3.2 -> 3.0.0 - Remove "bsp/efm32/Libraries/Device/EnergyMicro/EFM32LG" and "bsp/efm32/Libraries/Device/EnergyMicro/EFM32TG" to save space 3. Upgrade EFM32GG_DK3750 development kit driver library: version 1.2.2 -> 2.0.1 4. Upgrade EFM32_Gxxx_DK development kit driver library: version 1.7.3 -> 2.0.1 5. Add energy management unit driver and test code 6. Modify linker script and related code to compatible with new version of libraries 7. Change EFM32 branch version number to 1.0 8. Add photo frame demo application git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2122 bbd45198-f89e-11dd-88c7-29a3b14d5316
78 lines
2.6 KiB
Python
78 lines
2.6 KiB
Python
import rtconfig
|
|
from building import *
|
|
|
|
# get current directory
|
|
cwd = GetCurrentDir()
|
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
compiler = 'GCC'
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
src = Split("""
|
|
emlib/src/em_acmp.c
|
|
emlib/src/em_adc.c
|
|
emlib/src/em_aes.c
|
|
emlib/src/em_assert.c
|
|
emlib/src/em_cmu.c
|
|
emlib/src/em_dac.c
|
|
emlib/src/em_dbg.c
|
|
emlib/src/em_dma.c
|
|
emlib/src/em_ebi.c
|
|
emlib/src/em_emu.c
|
|
emlib/src/em_gpio.c
|
|
emlib/src/em_i2c.c
|
|
emlib/src/em_lcd.c
|
|
emlib/src/em_letimer.c
|
|
emlib/src/em_leuart.c
|
|
emlib/src/em_mpu.c
|
|
emlib/src/em_msc.c
|
|
emlib/src/em_pcnt.c
|
|
emlib/src/em_prs.c
|
|
emlib/src/em_rmu.c
|
|
emlib/src/em_rtc.c
|
|
emlib/src/em_system.c
|
|
emlib/src/em_timer.c
|
|
emlib/src/em_usart.c
|
|
emlib/src/em_vcmp.c
|
|
emlib/src/em_wdog.c
|
|
""")
|
|
|
|
# system code for each EFM32 family
|
|
system_codes = {}
|
|
system_codes['TinyGecko'] = 'EFM32TG/Source/system_efm32tg.c'
|
|
system_codes['Gecko'] = 'EFM32G/Source/system_efm32g.c'
|
|
system_codes['Giant Gecko'] = 'EFM32GG/Source/system_efm32gg.c'
|
|
|
|
# path of header files for each EFM32 family
|
|
header_path = {}
|
|
header_path['TinyGecko'] = 'EFM32TG'
|
|
header_path['Gecko'] = 'EFM32G'
|
|
header_path['Giant Gecko'] = 'EFM32GG'
|
|
|
|
# starupt scripts for each EFM32 family
|
|
startup_scripts = {}
|
|
startup_scripts['TinyGecko'] = 'EFM32TG/Source/' + compiler + '/startup_efm32tg.s'
|
|
startup_scripts['Gecko'] = 'EFM32G/Source/' + compiler + '/startup_efm32g.s'
|
|
startup_scripts['Giant Gecko'] = 'EFM32GG/Source/' + compiler + '/startup_efm32gg.s'
|
|
|
|
# linker scripts for each EFM32 family
|
|
linker_scripts = {}
|
|
linker_scripts['TinyGecko'] = 'EFM32TG/Source/' + compiler + '/efm32tg.ld'
|
|
linker_scripts['Gecko'] = 'EFM32G/Source/' + compiler + '/efm32g.ld'
|
|
linker_scripts['Giant Gecko'] = 'EFM32GG/Source/' + compiler + '/efm32gg.ld'
|
|
|
|
system_codes[rtconfig.EFM32_FAMILY] = 'Device/EnergyMicro/' + system_codes[rtconfig.EFM32_FAMILY]
|
|
startup_scripts[rtconfig.EFM32_FAMILY] = 'Device/EnergyMicro/' + startup_scripts[rtconfig.EFM32_FAMILY]
|
|
linker_scripts[rtconfig.EFM32_FAMILY] = cwd + '/Device/EnergyMicro/' + linker_scripts[rtconfig.EFM32_FAMILY]
|
|
src = src + [system_codes[rtconfig.EFM32_FAMILY]] + [startup_scripts[rtconfig.EFM32_FAMILY]]
|
|
|
|
path = [cwd + '/emlib/inc',
|
|
cwd + '/CMSIS/Include',
|
|
cwd + '/Device/EnergyMicro/' + header_path[rtconfig.EFM32_FAMILY] + '/Include']
|
|
|
|
CPPDEFINES = [rtconfig.EFM32_TYPE]
|
|
#group = DefineGroup('EFM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES, LINKFLAGS = linker_scripts[rtconfig.EFM32_FAMILY])
|
|
group = DefineGroup('EFM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
Return('group')
|