提交 4ab8ea53 编写于 作者: B Bernard Xiong

Merge pull request #556 from ArdaFu/master

[bsp][stm32f746-disco] Add support of IAR tool chain
...@@ -19,10 +19,8 @@ elif CROSS_TOOL == 'keil': ...@@ -19,10 +19,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
print '================ERROR============================' PLATFORM = 'iar'
print 'Not support iar yet!' IAR_PATH = 'C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2'
print '================================================='
exit(0)
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')
...@@ -99,6 +97,7 @@ elif PLATFORM == 'armcc': ...@@ -99,6 +97,7 @@ elif PLATFORM == 'armcc':
elif PLATFORM == 'iar': elif PLATFORM == 'iar':
# toolchains # toolchains
CC = 'iccarm' CC = 'iccarm'
CXX = 'iccarm'
AS = 'iasmarm' AS = 'iasmarm'
AR = 'iarchive' AR = 'iarchive'
LINK = 'ilinkarm' LINK = 'ilinkarm'
...@@ -123,6 +122,7 @@ elif PLATFORM == 'iar': ...@@ -123,6 +122,7 @@ elif PLATFORM == 'iar':
CFLAGS += ' --dlib_config "' + IAR_PATH + '/arm/INC/c/DLib_Config_Normal.h"' CFLAGS += ' --dlib_config "' + IAR_PATH + '/arm/INC/c/DLib_Config_Normal.h"'
CFLAGS += ' -Ol' CFLAGS += ' -Ol'
CFLAGS += ' --use_c++_inline' CFLAGS += ' --use_c++_inline'
CFLAGS += ' --silent'
AFLAGS = '' AFLAGS = ''
AFLAGS += ' -s+' AFLAGS += ' -s+'
...@@ -130,11 +130,15 @@ elif PLATFORM == 'iar': ...@@ -130,11 +130,15 @@ elif PLATFORM == 'iar':
AFLAGS += ' -r' AFLAGS += ' -r'
AFLAGS += ' --cpu Cortex-M7' AFLAGS += ' --cpu Cortex-M7'
AFLAGS += ' --fpu None' AFLAGS += ' --fpu None'
AFLAGS += ' -S'
LFLAGS = ' --config rtthread-stm32f7xx.icf' LFLAGS = ' --config rtthread-stm32f7xx.icf'
LFLAGS += ' --redirect _Printf=_PrintfTiny' LFLAGS += ' --redirect _Printf=_PrintfTiny'
LFLAGS += ' --redirect _Scanf=_ScanfSmall' LFLAGS += ' --redirect _Scanf=_ScanfSmall'
LFLAGS += ' --entry __iar_program_start' LFLAGS += ' --entry __iar_program_start'
LFLAGS += ' --silent'
CXXFLAGS = CFLAGS
EXEC_PATH = IAR_PATH + '/arm/bin/' EXEC_PATH = IAR_PATH + '/arm/bin/'
POST_ACTION = '' POST_ACTION = ''
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00200000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x00200000;
define symbol __ICFEDIT_region_ROM_end__ = 0x002FFFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20010000;
define symbol __ICFEDIT_region_RAM_end__ = 0x2003FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x200;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in RAM_region { readwrite, block CSTACK, block HEAP };
keep { section FSymTab };
keep { section VSymTab };
keep { section .rti_fn* };
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* Program Entry, set to mark it as "used" and avoid gc */ /* Program Entry, set to mark it as "used" and avoid gc */
MEMORY MEMORY
{ {
CODE (rx) : ORIGIN = 0x08000000, LENGTH = 1024k /* 1024KB flash */ CODE (rx) : ORIGIN = 0x00200000, LENGTH = 1024k /* 1024KB flash */
DATA (rw) : ORIGIN = 0x20010000, LENGTH = 256k /* 256K sram */ DATA (rw) : ORIGIN = 0x20010000, LENGTH = 256k /* 256K sram */
} }
ENTRY(Reset_Handler) ENTRY(Reset_Handler)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision *** ; *** Scatter-Loading Description File generated by uVision ***
; ************************************************************* ; *************************************************************
LR_IROM1 0x08000000 0x00100000 { ; load region size_region LR_IROM1 0x00200000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address ER_IROM1 0x00200000 0x00100000 { ; load address = execution address
*.o (RESET, +First) *.o (RESET, +First)
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册