summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordzzxzz <[email protected]>2011-07-04 06:22:50 +0000
committerdzzxzz <[email protected]>2011-07-04 06:22:50 +0000
commit8381e13d1c055e0346489c5676ba2659da16d49b (patch)
tree6e75b6de428644d2869ff3d578dbaee5b6bf798e
parentf2634a78ab0cd58e98b362e0231ed6322948fdd5 (diff)
stm32f107 branch support scons+iar compile
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1603 bbd45198-f89e-11dd-88c7-29a3b14d5316
-rw-r--r--bsp/stm32f107/SConstruct1
-rw-r--r--bsp/stm32f107/rtconfig.py12
2 files changed, 5 insertions, 8 deletions
diff --git a/bsp/stm32f107/SConstruct b/bsp/stm32f107/SConstruct
index f9942ef0c7..63b1130d6a 100644
--- a/bsp/stm32f107/SConstruct
+++ b/bsp/stm32f107/SConstruct
@@ -17,6 +17,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+ env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
Export('RTT_ROOT')
diff --git a/bsp/stm32f107/rtconfig.py b/bsp/stm32f107/rtconfig.py
index d492fd64d9..e3e67b378c 100644
--- a/bsp/stm32f107/rtconfig.py
+++ b/bsp/stm32f107/rtconfig.py
@@ -81,9 +81,9 @@ elif PLATFORM == 'iar':
LINK = 'ilinkarm'
TARGET_EXT = 'out'
- DEVICE = ' --cpu DARMSTM --thumb'
+ DEVICE = ' -D USE_STDPERIPH_DRIVER' + ' -D ' + STM32_TYPE
- CFLAGS = ''
+ CFLAGS = DEVICE
CFLAGS += ' --diag_suppress Pa050'
CFLAGS += ' --no_cse'
CFLAGS += ' --no_unroll'
@@ -97,9 +97,8 @@ elif PLATFORM == 'iar':
CFLAGS += ' --cpu=Cortex-M3'
CFLAGS += ' -e'
CFLAGS += ' --fpu=None'
- CFLAGS += ' --dlib_config "' + IAR_PATH + '/arm/INC/DLib_Config_Normal.h"'
+ CFLAGS += ' --dlib_config "' + IAR_PATH + '/arm/INC/c/DLib_Config_Normal.h"'
CFLAGS += ' -Ol'
- CFLAGS += ' -I"' + IAR_PATH + '/arm/inc"'
AFLAGS = ''
AFLAGS += ' -s+'
@@ -107,11 +106,8 @@ elif PLATFORM == 'iar':
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 = ' --config stm32_rom.icf'
LFLAGS += ' --entry __iar_program_start'
EXEC_PATH = IAR_PATH + '/arm/bin/'