summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authordzzxzz <[email protected]>2011-02-18 05:08:41 +0000
committerdzzxzz <[email protected]>2011-02-18 05:08:41 +0000
commit57756a5989a7eb27ecd35fd4fe0876b3d66ea51c (patch)
tree5eeec36756706708640d05394c0c2eb8904d1abe /bsp
parent30c8d36017676d72bba103cb157f6418602433d0 (diff)
add a new CROSS_TOOL(iar) in the rtconfig.py for stm3210 branch
now the scons support three CROSS_TOOL(gcc, keil, iar)in the stm3210 branch git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1280 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
-rw-r--r--bsp/stm3210/SConstruct4
-rw-r--r--bsp/stm3210/rtconfig.py36
2 files changed, 38 insertions, 2 deletions
diff --git a/bsp/stm3210/SConstruct b/bsp/stm3210/SConstruct
index 3ba4a0249d..bcbd9c0be8 100644
--- a/bsp/stm3210/SConstruct
+++ b/bsp/stm3210/SConstruct
@@ -15,6 +15,10 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
+if rtconfig.PLATFORM == 'iar':
+ env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+ env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+
Export('RTT_ROOT')
Export('rtconfig')
diff --git a/bsp/stm3210/rtconfig.py b/bsp/stm3210/rtconfig.py
index 4050e7074c..57876e6d59 100644
--- a/bsp/stm3210/rtconfig.py
+++ b/bsp/stm3210/rtconfig.py
@@ -8,7 +8,10 @@ if CROSS_TOOL == 'gcc':
EXEC_PATH = 'D:/SourceryGCC/bin'
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
- EXEC_PATH = 'E:/Keil'
+ EXEC_PATH = 'C:/Keil'
+elif CROSS_TOOL == 'iar':
+ PLATFORM = 'iar'
+ IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 5.4 Evaluation_0'
BUILD = 'debug'
STM32_TYPE = 'STM32F10X_HD'
@@ -78,8 +81,37 @@ elif PLATFORM == 'iar':
DEVICE = ' --cpu DARMSTM --thumb'
CFLAGS = ''
+ CFLAGS += ' --diag_suppress Pa050'
+ CFLAGS += ' --no_cse'
+ CFLAGS += ' --no_unroll'
+ CFLAGS += ' --no_inline'
+ CFLAGS += ' --no_code_motion'
+ CFLAGS += ' --no_tbaa'
+ CFLAGS += ' --no_clustering'
+ CFLAGS += ' --no_scheduling'
+ CFLAGS += ' --debug'
+ CFLAGS += ' --endian=little'
+ CFLAGS += ' --cpu=Cortex-M3'
+ CFLAGS += ' -e'
+ CFLAGS += ' --fpu=None'
+ CFLAGS += ' --dlib_config "' + IAR_PATH + '/arm/INC/DLib_Config_Normal.h"'
+ CFLAGS += ' -Ol'
+ CFLAGS += ' -I"' + IAR_PATH + '/arm/inc"'
+
AFLAGS = ''
+ AFLAGS += ' -s+'
+# AFLAGS += ' -M<>'
+ AFLAGS += ' -w+'
+ AFLAGS += ' -r'
+ AFLAGS += ' --cpu Cortex-M3'
+ AFLAGS += ' --fpu None'
+ AFLAGS += ' -I"' + IAR_PATH + '/arm/INC"'
+
LFLAGS = ' --config stm32f10x_flash.icf'
+ LFLAGS += ' --redirect _Printf=_PrintfTiny'
+ LFLAGS += ' --redirect _Scanf=_ScanfSmall'
+# LFLAGS = ' --map I:\RTT\20110219\rt-thread\bsp\stm3210\Debug\List\project.map
+ LFLAGS += ' --entry __iar_program_start'
- EXEC_PATH += '/arm/bin/'
+ EXEC_PATH = IAR_PATH + '/arm/bin/'
POST_ACTION = ''