diff --git a/bsp/lpc176x/SConstruct b/bsp/lpc176x/SConstruct
index 827da21b31..f66c829c9d 100644
--- a/bsp/lpc176x/SConstruct
+++ b/bsp/lpc176x/SConstruct
@@ -17,6 +17,11 @@ env = Environment(tools = ['mingw'],
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
+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')
Export('rtconfig')
diff --git a/bsp/lpc176x/lpc17xx_flash.icf b/bsp/lpc176x/lpc17xx_flash.icf
new file mode 100644
index 0000000000..68d22fff9e
--- /dev/null
+++ b/bsp/lpc176x/lpc17xx_flash.icf
@@ -0,0 +1,32 @@
+/*###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__ = 0x00000000;
+/*-Memory Regions-*/
+define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
+define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF;
+define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
+define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
+/*-Sizes-*/
+define symbol __ICFEDIT_size_cstack__ = 0x400;
+define symbol __ICFEDIT_size_heap__ = 0x800;
+/**** 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 };
+//initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
+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 };
diff --git a/bsp/lpc176x/project.ewp b/bsp/lpc176x/project.ewp
index dcdc5f164f..9190a7aada 100644
--- a/bsp/lpc176x/project.ewp
+++ b/bsp/lpc176x/project.ewp
@@ -1,3 +1,5 @@
+
+
2
@@ -10,7 +12,7 @@
General
3
- 17
+ 20
1
1
-
+
+
+
ICCARM
2
- 21
+ 26
1
1
-
-
+
+
+
+
+
+
+
+
+
+
+
+
AARM
2
- 7
+ 8
1
1
-
@@ -520,7 +568,7 @@
@@ -810,7 +890,7 @@
General
3
- 17
+ 20
1
0
@@ -827,7 +907,7 @@
Variant
- 13
+ 18
0
@@ -841,7 +921,7 @@
Input description
-
+
Output variant
@@ -850,7 +930,7 @@
Output description
-
+
GOutputBinary
@@ -858,7 +938,7 @@
FPU
- 0
+ 2
0
@@ -877,11 +957,7 @@
RTDescription
-
-
-
- RTConfigPath
- dl-stnl0.a
+
OGProductVersion
@@ -889,7 +965,7 @@
OGLastSavedByProductVersion
-
+
GeneralEnableMisra
@@ -901,7 +977,7 @@
OGChipSelectEditMenu
-
+
GenLowLevelInterface
@@ -933,13 +1009,27 @@
0
111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111
+
+ RTConfigPath2
+
+
+
+ GFPUCoreSlave
+ 18
+ 0
+
+
+ GBECoreSlave
+ 18
+ 0
+
ICCARM
2
- 21
+ 26
1
0
@@ -984,19 +1074,19 @@
CCDiagSuppress
-
+
CCDiagRemark
-
+
CCDiagWarning
-
+
CCDiagError
-
+
CCObjPrefix
@@ -1025,7 +1115,7 @@
IExtraOptions
-
+
CCLangConformance
@@ -1057,11 +1147,7 @@
OutputFile
-
-
-
- CCLangSelect
- 0
+
CCLibConfigHeader
@@ -1069,7 +1155,7 @@
PreInclude
-
+
CompilerMisraOverride
@@ -1077,7 +1163,7 @@
CCIncludePath2
-
+
$PROJ_DIR$\..\..\components\net\lwip\src\arch\include
$PROJ_DIR$\CMSIS\CM3\DeviceSupport\NXP\LPC17xx
$PROJ_DIR$\..\..\components\net\lwip\src\include
@@ -1095,10 +1181,6 @@
CCStdIncCheck
0
-
- CCStdIncludePath
- ###Uninitialized###
-
CCCodeSection
.text
@@ -1134,13 +1216,61 @@
0
111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111
+
+ CCPosIndRopi
+ 0
+
+
+ CCPosIndRwpi
+ 0
+
+
+ CCPosIndNoDynInit
+ 0
+
+
+ IccLang
+ 0
+
+
+ IccCDialect
+ 1
+
+
+ IccAllowVLA
+ 0
+
+
+ IccCppDialect
+ 1
+
+
+ IccExceptions
+ 1
+
+
+ IccRTTI
+ 1
+
+
+ IccStaticDestr
+ 1
+
+
+ IccRelaxedFpPrecision
+ 0
+
+
+ IccCppInlineSemantics
+ 1
+
AARM
2
- 7
+ 8
1
0
@@ -1170,15 +1300,15 @@
AWarnOne
-
+
AWarnRange1
-
+
AWarnRange2
-
+
ADebug
@@ -1190,7 +1320,7 @@
ADefines
-
+
AList
@@ -1266,7 +1396,7 @@
AOutputFile
-
+
AMultibyteSupport
@@ -1284,13 +1414,9 @@
AIgnoreStdInclude
0
-
- AStdIncludes
- $TOOLKIT_DIR$\INC\
-
AUserIncludes
-
+
AExtraOptionsCheckV2
@@ -1298,7 +1424,7 @@
AExtraOptionsV2
-
+
@@ -1320,7 +1446,7 @@
OOCOutputFile
-
+
OOCCommandLineProducer
@@ -1336,28 +1462,28 @@
CUSTOM
3
-
-
+
+
BICOMP
0
-
+
BUILDACTION
1
-
-
+
+
ILINK
0
- 8
+ 11
1
0
@@ -1382,31 +1508,31 @@
IlinkKeepSymbols
-
+
IlinkRawBinaryFile
-
+
IlinkRawBinarySymbol
-
+
IlinkRawBinarySegment
-
+
IlinkRawBinaryAlign
-
+
IlinkDefines
-
+
IlinkConfigDefines
-
+
IlinkMapFile
@@ -1442,7 +1568,7 @@
IlinkIcfFileSlave
-
+
IlinkEnableRemarks
@@ -1450,19 +1576,19 @@
IlinkSuppressDiags
-
+
IlinkTreatAsRem
-
+
IlinkTreatAsWarn
-
+
IlinkTreatAsErr
-
+
IlinkWarningsAreErrors
@@ -1474,7 +1600,7 @@
IlinkExtraOptions
-
+
IlinkLowLevelInterfaceSlave
@@ -1486,7 +1612,7 @@
IlinkAdditionalLibs
-
+
IlinkOverrideProgramEntryLabel
@@ -1498,7 +1624,7 @@
IlinkProgramEntryLabel
-
+
DoFill
@@ -1571,6 +1697,38 @@
IlinkIElfToolPostProcess
0
+
+ IlinkLogAutoLibSelect
+ 0
+
+
+ IlinkLogRedirSymbols
+ 0
+
+
+ IlinkLogUnusedFragments
+ 0
+
+
+ IlinkCrcReverseByteOrder
+ 0
+
+
+ IlinkCrcUseAsInput
+ 1
+
+
+ IlinkOptInline
+ 1
+
+
+ IlinkOptExceptionsAllow
+ 1
+
+
+ IlinkOptExceptionsForce
+ 0
+
@@ -1582,7 +1740,7 @@
0
IarchiveInputs
-
+
IarchiveOverride
@@ -1597,79 +1755,31 @@
BILINK
0
-
+
- Startup
+ CMSIS
- $PROJ_DIR$\.\application.c
+ $PROJ_DIR$\CMSIS\CM3\CoreSupport\core_cm3.c
- $PROJ_DIR$\.\startup.c
+ $PROJ_DIR$\CMSIS\CM3\DeviceSupport\NXP\LPC17xx\startup\iar\startup_LPC17xx.s
- $PROJ_DIR$\.\board.c
-
-
- $PROJ_DIR$\.\uart.c
-
-
- $PROJ_DIR$\.\led.c
-
-
- $PROJ_DIR$\.\emac.c
-
-
-
- Kernel
-
- $PROJ_DIR$\..\..\src\clock.c
-
-
- $PROJ_DIR$\..\..\src\device.c
-
-
- $PROJ_DIR$\..\..\src\idle.c
-
-
- $PROJ_DIR$\..\..\src\ipc.c
-
-
- $PROJ_DIR$\..\..\src\irq.c
-
-
- $PROJ_DIR$\..\..\src\kservice.c
-
-
- $PROJ_DIR$\..\..\src\mem.c
-
-
- $PROJ_DIR$\..\..\src\mempool.c
-
-
- $PROJ_DIR$\..\..\src\object.c
-
-
- $PROJ_DIR$\..\..\src\scheduler.c
-
-
- $PROJ_DIR$\..\..\src\thread.c
-
-
- $PROJ_DIR$\..\..\src\timer.c
+ $PROJ_DIR$\CMSIS\CM3\DeviceSupport\NXP\LPC17xx\system_LPC17xx.c
CORTEX-M3
- $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c
+ $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c
$PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S
- $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c
+ $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c
$PROJ_DIR$\..\..\libcpu\arm\common\div0.c
@@ -1720,6 +1830,45 @@
$PROJ_DIR$\..\..\components\finsh\symbol.c
+
+ Kernel
+
+ $PROJ_DIR$\..\..\src\clock.c
+
+
+ $PROJ_DIR$\..\..\src\device.c
+
+
+ $PROJ_DIR$\..\..\src\idle.c
+
+
+ $PROJ_DIR$\..\..\src\ipc.c
+
+
+ $PROJ_DIR$\..\..\src\irq.c
+
+
+ $PROJ_DIR$\..\..\src\kservice.c
+
+
+ $PROJ_DIR$\..\..\src\mem.c
+
+
+ $PROJ_DIR$\..\..\src\mempool.c
+
+
+ $PROJ_DIR$\..\..\src\object.c
+
+
+ $PROJ_DIR$\..\..\src\scheduler.c
+
+
+ $PROJ_DIR$\..\..\src\thread.c
+
+
+ $PROJ_DIR$\..\..\src\timer.c
+
+
LwIP
@@ -1729,28 +1878,10 @@
$PROJ_DIR$\..\..\components\net\lwip\src\api\api_msg.c
- $PROJ_DIR$\..\..\components\net\lwip\src\api\err.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c
- $PROJ_DIR$\..\..\components\net\lwip\src\api\netbuf.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\api\netdb.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\api\netifapi.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\api\sockets.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch_init.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\def.c
$PROJ_DIR$\..\..\components\net\lwip\src\core\dhcp.c
@@ -1759,40 +1890,13 @@
$PROJ_DIR$\..\..\components\net\lwip\src\core\dns.c
- $PROJ_DIR$\..\..\components\net\lwip\src\core\init.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\api\err.c
- $PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\netif\etharp.c
- $PROJ_DIR$\..\..\components\net\lwip\src\core\netif.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\pbuf.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\raw.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\stats.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\sys.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_in.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_out.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c
-
-
- $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\netif\ethernetif.c
$PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\icmp.c
@@ -1806,6 +1910,9 @@
$PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\inet_chksum.c
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\init.c
+
$PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip.c
@@ -1816,28 +1923,81 @@
$PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_frag.c
- $PROJ_DIR$\..\..\components\net\lwip\src\netif\etharp.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c
- $PROJ_DIR$\..\..\components\net\lwip\src\netif\ethernetif.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\api\netbuf.c
- $PROJ_DIR$\..\..\components\net\lwip\src\netif\loopif.c
+ $PROJ_DIR$\..\..\components\net\lwip\src\api\netdb.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\netif.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\api\netifapi.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\pbuf.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\raw.c
$PROJ_DIR$\..\..\components\net\lwip\src\netif\slipif.c
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\api\sockets.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\stats.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\sys.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_in.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_out.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c
+
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c
+
- CMSIS
+ Startup
- $PROJ_DIR$\CMSIS\CM3\CoreSupport\core_cm3.c
+ $PROJ_DIR$\.\application.c
- $PROJ_DIR$\CMSIS\CM3\DeviceSupport\NXP\LPC17xx\system_LPC17xx.c
+ $PROJ_DIR$\.\board.c
- $PROJ_DIR$\CMSIS\CM3\DeviceSupport\NXP\LPC17xx\startup\iar\startup_LPC17xx.s
+ $PROJ_DIR$\.\emac.c
+
+
+ $PROJ_DIR$\.\led.c
+
+
+ $PROJ_DIR$\.\startup.c
+
+
+ $PROJ_DIR$\.\uart.c
+
+
diff --git a/bsp/lpc176x/rtconfig.py b/bsp/lpc176x/rtconfig.py
index 6868c3e91f..0a7b0b107c 100644
--- a/bsp/lpc176x/rtconfig.py
+++ b/bsp/lpc176x/rtconfig.py
@@ -16,7 +16,7 @@ elif CROSS_TOOL == 'keil':
EXEC_PATH = 'E:/Keil'
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
- EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0/arm/bin'
+ IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
@@ -85,12 +85,37 @@ elif PLATFORM == 'iar':
LINK = 'ilinkarm'
TARGET_EXT = 'out'
- DEVICE = ' --cpu DARMP1 --thumb'
+ DEVICE = ' --thumb'
- CFLAGS = ''
+ CFLAGS = DEVICE
+ 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/c/DLib_Config_Normal.h"'
+ CFLAGS += ' -Ol'
+ CFLAGS += ' --use_c++_inline'
+
AFLAGS = ''
- LFLAGS = ' --config lpc17xx_flash.icf'
+ AFLAGS += ' -s+'
+ AFLAGS += ' -w+'
+ AFLAGS += ' -r'
+ AFLAGS += ' --cpu Cortex-M3'
+ AFLAGS += ' --fpu None'
- EXEC_PATH += '/arm/bin/'
+ LFLAGS = ' --config lpc17xx_flash.icf'
+ LFLAGS += ' --semihosting'
+ LFLAGS += ' --entry __iar_program_start'
+
+ EXEC_PATH = IAR_PATH + '/arm/bin/'
RT_USING_MINILIBC = False
POST_ACTION = ''
diff --git a/bsp/lpc178x/CMSIS/CM3/DeviceSupport/NXP/LPC177x_8x/startup/gcc/startup_LPC177x_8x.s b/bsp/lpc178x/CMSIS/CM3/DeviceSupport/NXP/LPC177x_8x/startup/gcc/startup_LPC177x_8x.s
index 961a7e064c..ab30b6b050 100644
--- a/bsp/lpc178x/CMSIS/CM3/DeviceSupport/NXP/LPC177x_8x/startup/gcc/startup_LPC177x_8x.s
+++ b/bsp/lpc178x/CMSIS/CM3/DeviceSupport/NXP/LPC177x_8x/startup/gcc/startup_LPC177x_8x.s
@@ -129,7 +129,7 @@ __cs3_interrupt_vector_cortex_m:
.type __cs3_reset_cortex_m, %function
__cs3_reset_cortex_m:
.fnstart
-.if (RAM_MODE)
+#if (RAM_MODE)
/* Clear .bss section (Zero init) */
MOV R0, #0
LDR R1, =__bss_start__
@@ -147,12 +147,12 @@ BSSIsEmpty:
BLX R0
LDR R0,=main
BX R0
-.else
+#else
LDR R0, =SystemInit
BLX R0
LDR R0,=_start
BX R0
-.endif
+#endif
.pool
.cantunwind
.fnend
diff --git a/bsp/lpc178x/rtconfig.py b/bsp/lpc178x/rtconfig.py
index 563590ffb0..e3d5c23743 100644
--- a/bsp/lpc178x/rtconfig.py
+++ b/bsp/lpc178x/rtconfig.py
@@ -15,8 +15,10 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'E:/Keil'
elif CROSS_TOOL == 'iar':
- PLATFORM = 'iar'
- EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0/arm/bin'
+ print '================ERROR============================'
+ print 'Not support iar yet!'
+ print '================================================='
+ exit(0)
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
@@ -76,21 +78,3 @@ elif PLATFORM == 'armcc':
CFLAGS += ' -O2'
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
-
-elif PLATFORM == 'iar':
- # toolchains
- CC = 'iccarm'
- AS = 'iasmarm'
- AR = 'iarchive'
- LINK = 'ilinkarm'
- TARGET_EXT = 'out'
-
- DEVICE = ' --cpu DARMP1 --thumb'
-
- CFLAGS = ''
- AFLAGS = ''
- LFLAGS = ' --config lpc17xx_flash.icf'
-
- EXEC_PATH += '/arm/bin/'
- RT_USING_MINILIBC = False
- POST_ACTION = ''
diff --git a/bsp/lpc2478/rtconfig.py b/bsp/lpc2478/rtconfig.py
index 3c92ab0be2..3930c684f0 100644
--- a/bsp/lpc2478/rtconfig.py
+++ b/bsp/lpc2478/rtconfig.py
@@ -14,9 +14,6 @@ if CROSS_TOOL == 'gcc':
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'E:/Keil'
-elif CROSS_TOOL == 'iar':
- PLATFORM = 'iar'
- EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0/arm/bin'
elif CROSS_TOOL == 'iar':
print '================ERROR============================'
print 'Not support iar yet!'
diff --git a/bsp/m16c62p/rtconfig.py b/bsp/m16c62p/rtconfig.py
index 3ed4a874b1..103d174a83 100644
--- a/bsp/m16c62p/rtconfig.py
+++ b/bsp/m16c62p/rtconfig.py
@@ -11,7 +11,7 @@ if os.getenv('RTT_CC'):
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
- EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
+ EXEC_PATH = 'C:/Program Files/Renesas/Hew/Tools/KPIT Cummins/GNUM16CM32C-ELF/v11.01/m32c-elf/bin'
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench Evaluation 6.0'
@@ -29,20 +29,20 @@ BUILD = 'debug'
if PLATFORM == 'gcc':
# toolchains
- PREFIX = 'arm-none-eabi-'
+ PREFIX = 'm32c-elf-'
CC = PREFIX + 'gcc'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
LINK = PREFIX + 'gcc'
- TARGET_EXT = 'axf'
+ TARGET_EXT = 'out'
SIZE = PREFIX + 'size'
OBJDUMP = PREFIX + 'objdump'
OBJCPY = PREFIX + 'objcopy'
- DEVICE = ' -mcpu=arm920t'
+ DEVICE = ' -mcpu=m16c'
CFLAGS = DEVICE
- AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
- LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread_mini2440.map,-cref,-u,_start -T mini2440_ram.ld' + ' -Ttext ' + TextBase
+ AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
+ LFLAGS = DEVICE + ' -nostartfiles' + ' -Wl,--gc-sections,-Map=rtthread_m16c.map,-cref,-u,_start -T m16c62p.ld'
CPATH = ''
LPATH = ''
@@ -53,7 +53,7 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -O2'
- POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
+ POST_ACTION = OBJCPY + ' -O srec $TARGET rtthread.mot\n' + SIZE + ' $TARGET \n'
elif PLATFORM == 'iar':
# toolchains
diff --git a/bsp/m16c62p/startup.c b/bsp/m16c62p/startup.c
index aad3e1a4e4..14da5939eb 100644
--- a/bsp/m16c62p/startup.c
+++ b/bsp/m16c62p/startup.c
@@ -85,7 +85,7 @@ void rtthread_startup(void)
/* init timer thread */
rt_system_timer_thread_init();
-
+
/* init idle thread */
rt_thread_idle_init();
diff --git a/bsp/stm32f107/project.ewp b/bsp/stm32f107/project.ewp
index 36db9c1e30..d333667ec0 100644
--- a/bsp/stm32f107/project.ewp
+++ b/bsp/stm32f107/project.ewp
@@ -87,7 +87,7 @@
OGLastSavedByProductVersion
- 6.10.1.52170
+ 6.10.3.52260
GeneralEnableMisra
@@ -1890,6 +1890,9 @@
$PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\def.c
+
$PROJ_DIR$\..\..\components\net\lwip\src\core\dhcp.c
@@ -1929,9 +1932,6 @@
$PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_frag.c
-
- $PROJ_DIR$\..\..\components\net\lwip\src\netif\loopif.c
-
$PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c
@@ -1968,9 +1968,6 @@
$PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c
-
- $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch_init.c
-
$PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c
@@ -1983,6 +1980,9 @@
$PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c
+
$PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c
diff --git a/bsp/stm32f107/rtconfig.py b/bsp/stm32f107/rtconfig.py
index 1898385df5..8124f9b2a3 100644
--- a/bsp/stm32f107/rtconfig.py
+++ b/bsp/stm32f107/rtconfig.py
@@ -19,7 +19,7 @@ elif CROSS_TOOL == 'keil':
EXEC_PATH = 'E:/Keil'
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
- IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0'
+ IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
diff --git a/bsp/stm32f10x/project.ewp b/bsp/stm32f10x/project.ewp
index b7902c8195..0fc4a79bb4 100644
--- a/bsp/stm32f10x/project.ewp
+++ b/bsp/stm32f10x/project.ewp
@@ -1877,6 +1877,9 @@
$PROJ_DIR$\..\..\components\net\lwip\src\netif\ppp\chpms.c
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\def.c
+
$PROJ_DIR$\..\..\components\net\lwip\src\core\dhcp.c
@@ -1925,9 +1928,6 @@
$PROJ_DIR$\..\..\components\net\lwip\src\netif\ppp\lcp.c
-
- $PROJ_DIR$\..\..\components\net\lwip\src\netif\loopif.c
-
$PROJ_DIR$\..\..\components\net\lwip\src\netif\ppp\magic.c
@@ -1994,9 +1994,6 @@
$PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c
-
- $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch_init.c
-
$PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c
@@ -2009,6 +2006,9 @@
$PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c
+
+ $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c
+
$PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c
diff --git a/bsp/stm32f10x/rtconfig.py b/bsp/stm32f10x/rtconfig.py
index e5f70f9616..6885b5fa58 100644
--- a/bsp/stm32f10x/rtconfig.py
+++ b/bsp/stm32f10x/rtconfig.py
@@ -31,7 +31,7 @@ elif CROSS_TOOL == 'keil':
EXEC_PATH = 'E:/Keil'
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
- IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0'
+ IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
diff --git a/bsp/stm32f20x/rtconfig.py b/bsp/stm32f20x/rtconfig.py
index fde53fd124..ca103f6aa6 100644
--- a/bsp/stm32f20x/rtconfig.py
+++ b/bsp/stm32f20x/rtconfig.py
@@ -16,7 +16,7 @@ elif CROSS_TOOL == 'keil':
EXEC_PATH = 'E:/Keil'
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
- IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 5.4 Evaluation_0'
+ IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
diff --git a/bsp/stm32f40x/SConstruct b/bsp/stm32f40x/SConstruct
index 59aac6b57e..6c1074486b 100644
--- a/bsp/stm32f40x/SConstruct
+++ b/bsp/stm32f40x/SConstruct
@@ -19,6 +19,11 @@ 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(ARFLAGS = [''])
+ env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+
Export('RTT_ROOT')
Export('rtconfig')
diff --git a/bsp/stm32f40x/rtconfig.py b/bsp/stm32f40x/rtconfig.py
index 55be67bbd1..ae8b56cf55 100644
--- a/bsp/stm32f40x/rtconfig.py
+++ b/bsp/stm32f40x/rtconfig.py
@@ -17,8 +17,10 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'E:/Keil'
elif CROSS_TOOL == 'iar':
- PLATFORM = 'iar'
- IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0'
+ print '================ERROR============================'
+ print 'Not support iar yet!'
+ print '================================================='
+ exit(0)
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')