rtt-f030/bsp/efm32/rtconfig.py
onelife.real@gmail.com cabc797a2d *** EFM32 branch ***
1. Update the copyright information
 - 2009 => 2011
2. Add external oscillator configuration routine in "rt_hw_board_init()"
 - Before, it is set by default frequency, 32MHz
 - Now it can be set by user specified frequency
3. Add ADC and ACMP (analog comparator) drivers
4. Clarify the MCU and target board define in "rtconfig.py"

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1296 bbd45198-f89e-11dd-88c7-29a3b14d5316
2011-02-28 04:47:50 +00:00

47 lines
1.2 KiB
Python

# toolchains options
ARCH = 'arm'
CPU = 'cortex-m3'
CROSS_TOOL = 'gcc'
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = 'C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin'
BUILD = 'debug'
EFM32_BOARD = 'EFM32_G890_STK'
# EFM32_BOARD = 'EFM32_G290_DK'
if EFM32_BOARD == 'EFM32_G890_STK':
EFM32_TYPE = 'EFM32G890F128'
elif EFM32_BOARD == 'EFM32_G290_DK':
EFM32_TYPE = 'EFM32G290F128'
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'
CFLAGS = DEVICE + ' -DRT_USING_MINILIBC'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-efm32.map,-cref,-u,Reset_Handler -T efm32_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'