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
80 lines
2.3 KiB
Python
80 lines
2.3 KiB
Python
import os
|
|
|
|
# toolchains options
|
|
ARCH = 'arm'
|
|
CPU = 'cortex-m3'
|
|
CROSS_TOOL = 'gcc'
|
|
|
|
if os.getenv('RTT_CC'):
|
|
CROSS_TOOL = os.getenv('RTT_CC')
|
|
|
|
if CROSS_TOOL == 'gcc':
|
|
PLATFORM = 'gcc'
|
|
EXEC_PATH = 'C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin'
|
|
#EXEC_PATH = 'C:\Program Files (x86)\yagarto\bin'
|
|
elif CROSS_TOOL == 'keil':
|
|
print '================ERROR============================'
|
|
print 'Not support keil yet!'
|
|
print '================================================='
|
|
exit(0)
|
|
elif CROSS_TOOL == 'iar':
|
|
print '================ERROR============================'
|
|
print 'Not support iar yet!'
|
|
print '================================================='
|
|
exit(0)
|
|
|
|
if os.getenv('RTT_EXEC_PATH'):
|
|
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
|
|
|
BUILD = 'debug'
|
|
# EFM32_BOARD = 'EFM32_G8XX_STK'
|
|
# EFM32_BOARD = 'EFM32_GXXX_DK'
|
|
EFM32_BOARD = 'EFM32GG_DK3750'
|
|
|
|
if EFM32_BOARD == 'EFM32_G8XX_STK':
|
|
EFM32_FAMILY = 'Gecko'
|
|
EFM32_TYPE = 'EFM32G890F128'
|
|
EFM32_LCD = 'none'
|
|
elif EFM32_BOARD == 'EFM32_GXXX_DK':
|
|
EFM32_FAMILY = 'Gecko'
|
|
EFM32_TYPE = 'EFM32G290F128'
|
|
EFM32_LCD = 'none'
|
|
elif EFM32_BOARD == 'EFM32GG_DK3750':
|
|
EFM32_FAMILY = 'Giant Gecko'
|
|
EFM32_TYPE = 'EFM32GG990F1024'
|
|
# EFM32_LCD = 'LCD_MAPPED'
|
|
EFM32_LCD = 'LCD_DIRECT'
|
|
|
|
if PLATFORM == 'gcc':
|
|
# toolchains
|
|
PREFIX = 'arm-none-eabi-'
|
|
CC = PREFIX + 'gcc'
|
|
AS = PREFIX + 'gcc'
|
|
AR = PREFIX + 'ar'
|
|
LINK = PREFIX + 'gcc'
|
|
TARGET_EXT = 'axf'
|
|
SIZE = PREFIX + 'size'
|
|
OBJDUMP = PREFIX + 'objdump'
|
|
OBJCPY = PREFIX + 'objcopy'
|
|
|
|
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
|
|
CFLAGS = DEVICE
|
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
|
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-efm32.map,-cref,-u,__cs3_reset -T'
|
|
if EFM32_BOARD == 'EFM32_G8XX_STK' or EFM32_BOARD == 'EFM32_GXXX_DK':
|
|
LFLAGS += ' efm32g_rom.ld'
|
|
elif EFM32_BOARD == 'EFM32GG_DK3750':
|
|
LFLAGS += ' efm32gg_rom.ld'
|
|
|
|
CPATH = ''
|
|
LPATH = ''
|
|
|
|
if BUILD == 'debug':
|
|
CFLAGS += ' -O0 -gdwarf-2'
|
|
AFLAGS += ' -gdwarf-2'
|
|
else:
|
|
CFLAGS += ' -O2'
|
|
|
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
|
|