提交 57756a59 编写于 作者: D dzzxzz

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
上级 30c8d360
......@@ -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')
......
......@@ -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 = ''
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册