diff --git a/bsp/stm32f107/SConstruct b/bsp/stm32f107/SConstruct index f9942ef0c7c663ec8bec96b6903bd74306a43f15..63b1130d6ac4f39c6bf879a63c43aacd782f43ea 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 d492fd64d9e91c01b1cba710cc9ba8277887d902..e3e67b378c07af343d5c57dd2d13d616b5a75d11 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/'