summaryrefslogtreecommitdiff
path: root/bsp/efm32/rtconfig.py
diff options
context:
space:
mode:
authoronelife.real <[email protected]>2011-02-17 03:33:15 +0000
committeronelife.real <[email protected]>2011-02-17 03:33:15 +0000
commit314bcbd3ea8a79623cf199f665b0631ef3fc530b (patch)
tree516ba8ac07c43c61f928d281b36d6e93f50334e1 /bsp/efm32/rtconfig.py
parentd128ba91691534b3e64b6736d4dfbfbe81244055 (diff)
*** EFM32 branch ***
- New branch for Energy Micro's MCUs (http://energymicro.com/). - Target board: FM32 Gecko Starter Kit (http://www.energymicro.com/tools) git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1274 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/efm32/rtconfig.py')
-rw-r--r--bsp/efm32/rtconfig.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/bsp/efm32/rtconfig.py b/bsp/efm32/rtconfig.py
new file mode 100644
index 0000000000..df3b1c228c
--- /dev/null
+++ b/bsp/efm32/rtconfig.py
@@ -0,0 +1,40 @@
+# 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_TYPE = 'EFM32G890F128'
+
+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'
+