From a97d7d29a2e5f488ef010eb9ba55a4b69c10d415 Mon Sep 17 00:00:00 2001 From: dzzxzz Date: Tue, 23 Aug 2011 02:31:35 +0000 Subject: [PATCH] fix scons+iar compile error in Fujistu FM3 branch git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1679 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/fm3/mb9bf500r/SConstruct | 1 + bsp/fm3/mb9bf500r/rtconfig.py | 17 +++++++---------- bsp/fm3/mb9bf506r/SConstruct | 1 + bsp/fm3/mb9bf506r/rtconfig.py | 15 ++++++--------- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/bsp/fm3/mb9bf500r/SConstruct b/bsp/fm3/mb9bf500r/SConstruct index fa71e875d4..5289674c12 100644 --- a/bsp/fm3/mb9bf500r/SConstruct +++ b/bsp/fm3/mb9bf500r/SConstruct @@ -22,6 +22,7 @@ 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']) + env.Replace(ARFLAGS = '') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/fm3/mb9bf500r/rtconfig.py b/bsp/fm3/mb9bf500r/rtconfig.py index 58ca087bda..13dbcebd6a 100644 --- a/bsp/fm3/mb9bf500r/rtconfig.py +++ b/bsp/fm3/mb9bf500r/rtconfig.py @@ -1,7 +1,7 @@ # toolchains options ARCH='arm' CPU='fm3' -CROSS_TOOL='gcc' +CROSS_TOOL='iar' # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR @@ -14,7 +14,7 @@ elif CROSS_TOOL == 'keil': EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': PLATFORM = 'iar' - IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0' + IAR_PATH = 'C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation' BUILD = 'debug' @@ -80,8 +80,6 @@ elif PLATFORM == 'iar': LINK = 'ilinkarm' TARGET_EXT = 'out' - DEVICE = ' --cpu DARMSTM --thumb' - CFLAGS = '' CFLAGS += ' --diag_suppress Pa050' CFLAGS += ' --no_cse' @@ -96,9 +94,9 @@ 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"' + CFLAGS += ' --use_c++_inline' AFLAGS = '' AFLAGS += ' -s+' @@ -108,10 +106,9 @@ elif PLATFORM == 'iar': AFLAGS += ' --fpu None' AFLAGS += ' -I"' + IAR_PATH + '/arm/INC"' - LFLAGS = ' --config stm32f10x_flash.icf' - LFLAGS += ' --redirect _Printf=_PrintfTiny' - LFLAGS += ' --redirect _Scanf=_ScanfSmall' + LFLAGS = ' --config mb9bf500r.icf' + LFLAGS += ' --semihosting' LFLAGS += ' --entry __iar_program_start' EXEC_PATH = IAR_PATH + '/arm/bin/' - POST_ACTION = '' + POST_ACTION = 'ielftool.exe --srec --verbose $TARGET rtthread.srec' diff --git a/bsp/fm3/mb9bf506r/SConstruct b/bsp/fm3/mb9bf506r/SConstruct index fa71e875d4..5289674c12 100644 --- a/bsp/fm3/mb9bf506r/SConstruct +++ b/bsp/fm3/mb9bf506r/SConstruct @@ -22,6 +22,7 @@ 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']) + env.Replace(ARFLAGS = '') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/fm3/mb9bf506r/rtconfig.py b/bsp/fm3/mb9bf506r/rtconfig.py index 40e89fb299..900e067b14 100644 --- a/bsp/fm3/mb9bf506r/rtconfig.py +++ b/bsp/fm3/mb9bf506r/rtconfig.py @@ -14,7 +14,7 @@ elif CROSS_TOOL == 'keil': EXEC_PATH = 'C:/Keil' elif CROSS_TOOL == 'iar': PLATFORM = 'iar' - IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0' + IAR_PATH = 'C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation' BUILD = 'debug' @@ -79,8 +79,6 @@ elif PLATFORM == 'iar': LINK = 'ilinkarm' TARGET_EXT = 'out' - DEVICE = ' --cpu DARMSTM --thumb' - CFLAGS = '' CFLAGS += ' --diag_suppress Pa050' CFLAGS += ' --no_cse' @@ -95,9 +93,9 @@ 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"' + CFLAGS += ' --use_c++_inline' AFLAGS = '' AFLAGS += ' -s+' @@ -107,10 +105,9 @@ elif PLATFORM == 'iar': AFLAGS += ' --fpu None' AFLAGS += ' -I"' + IAR_PATH + '/arm/INC"' - LFLAGS = ' --config stm32f10x_flash.icf' - LFLAGS += ' --redirect _Printf=_PrintfTiny' - LFLAGS += ' --redirect _Scanf=_ScanfSmall' + LFLAGS = ' --config mb9bf506.icf' + LFLAGS += ' --semihosting' LFLAGS += ' --entry __iar_program_start' EXEC_PATH = IAR_PATH + '/arm/bin/' - POST_ACTION = '' + POST_ACTION = 'ielftool.exe --srec --verbose $TARGET rtthread.srec'