diff --git a/bsp/at91sam9260/SConstruct b/bsp/at91sam9260/SConstruct index 8894d3385..0be072090 100755 --- a/bsp/at91sam9260/SConstruct +++ b/bsp/at91sam9260/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/at91sam9260/rtconfig.py b/bsp/at91sam9260/rtconfig.py index 5ae68e7a6..629819577 100755 --- a/bsp/at91sam9260/rtconfig.py +++ b/bsp/at91sam9260/rtconfig.py @@ -1,3 +1,4 @@ +import os # toolchains options ARCH = 'arm' @@ -6,12 +7,24 @@ TextBase = '0x20000000' CROSS_TOOL = 'gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = '/opt/arm-2010q1/bin/' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'E:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + #BUILD = 'debug' BUILD = 'release' @@ -69,14 +82,3 @@ elif PLATFORM == 'armcc': CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' - -elif PLATFORM == 'iar': - # toolchains - CC = 'armcc' - AS = 'armasm' - AR = 'armar' - LINK = 'armlink' - - CFLAGS = '' - AFLAGS = '' - LFLAGS = '' diff --git a/bsp/avr32uc3b0/SConstruct b/bsp/avr32uc3b0/SConstruct index 209b762de..3354b662b 100644 --- a/bsp/avr32uc3b0/SConstruct +++ b/bsp/avr32uc3b0/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/avr32uc3b0/rtconfig.py b/bsp/avr32uc3b0/rtconfig.py index 09292421c..4325e7e33 100644 --- a/bsp/avr32uc3b0/rtconfig.py +++ b/bsp/avr32uc3b0/rtconfig.py @@ -1,3 +1,4 @@ +import os # toolchains options ARCH = 'avr32' @@ -7,9 +8,26 @@ BOARD = 'USERBOARD' CROSS_TOOL = 'gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/Atmel/AVR Tools/AVR Toolchain/bin' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + #BUILD = 'debug' BUILD = 'release' diff --git a/bsp/dev3210/SConstruct b/bsp/dev3210/SConstruct index 061f72606..e588dcb59 100644 --- a/bsp/dev3210/SConstruct +++ b/bsp/dev3210/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/dev3210/rtconfig.py b/bsp/dev3210/rtconfig.py index 07f52db14..a2e008214 100644 --- a/bsp/dev3210/rtconfig.py +++ b/bsp/dev3210/rtconfig.py @@ -1,11 +1,32 @@ +import os + # CPU options ARCH='mips' CPU ='loongson' # toolchains options CROSS_TOOL = 'gcc' -PLATFORM = 'gcc' -EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' + +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + +if CROSS_TOOL == 'gcc': + PLATFORM = 'gcc' + EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' PREFIX = 'mips-sde-elf-' diff --git a/bsp/efm32/SConstruct b/bsp/efm32/SConstruct index 2774838d1..b431b30bc 100644 --- a/bsp/efm32/SConstruct +++ b/bsp/efm32/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/efm32/rtconfig.py b/bsp/efm32/rtconfig.py index d4dd86343..fbaab68eb 100644 --- a/bsp/efm32/rtconfig.py +++ b/bsp/efm32/rtconfig.py @@ -1,12 +1,30 @@ +import os + # toolchains options ARCH = 'arm' CPU = 'cortex-m3' CROSS_TOOL = 'gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin' #EXEC_PATH = 'C:\Program Files (x86)\yagarto\bin' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' # EFM32_BOARD = 'EFM32_G8XX_STK' diff --git a/bsp/jz47xx/rtconfig.py b/bsp/jz47xx/rtconfig.py index ea679a279..c2a61a05c 100644 --- a/bsp/jz47xx/rtconfig.py +++ b/bsp/jz47xx/rtconfig.py @@ -1,9 +1,31 @@ +import os + # toolchains options ARCH = 'mips' CPU = 'jz47xx' + CROSS_TOOL = 'gcc' -PLATFORM = 'gcc' -EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' + +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + +if CROSS_TOOL == 'gcc': + PLATFORM = 'gcc' + EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' # toolchains diff --git a/bsp/lm3s8962/SConstruct b/bsp/lm3s8962/SConstruct index 12d70ecd1..b573f7b0c 100644 --- a/bsp/lm3s8962/SConstruct +++ b/bsp/lm3s8962/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/lm3s8962/rtconfig.py b/bsp/lm3s8962/rtconfig.py index 9c753dee7..8c04ba5b7 100644 --- a/bsp/lm3s8962/rtconfig.py +++ b/bsp/lm3s8962/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL = 'keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + #device options PART_TYPE = 'PART_LM3S8962' @@ -12,6 +17,15 @@ if CROSS_TOOL == 'gcc': elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'E:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/lm3s9b9x/SConstruct b/bsp/lm3s9b9x/SConstruct index 5439cdbb5..b657849d8 100644 --- a/bsp/lm3s9b9x/SConstruct +++ b/bsp/lm3s9b9x/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/lm3s9b9x/rtconfig.py b/bsp/lm3s9b9x/rtconfig.py index 40e9a3ca6..3c444b9ae 100644 --- a/bsp/lm3s9b9x/rtconfig.py +++ b/bsp/lm3s9b9x/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL = 'keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + #device options PART_TYPE = 'PART_LM3S9B96' @@ -12,6 +17,15 @@ if CROSS_TOOL == 'gcc': elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'E:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/lm4f232/SConstruct b/bsp/lm4f232/SConstruct index 0753a9976..48e3a1695 100644 --- a/bsp/lm4f232/SConstruct +++ b/bsp/lm4f232/SConstruct @@ -2,7 +2,10 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/lm4f232/rtconfig.py b/bsp/lm4f232/rtconfig.py index 94715db7b..3c951e4e4 100644 --- a/bsp/lm4f232/rtconfig.py +++ b/bsp/lm4f232/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + #device options PART_TYPE = 'PART_LM4F232H5QD' @@ -14,7 +19,14 @@ if CROSS_TOOL == 'gcc': elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'E:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' diff --git a/bsp/lpc178x/SConstruct b/bsp/lpc178x/SConstruct index ff91371b2..5522d3f89 100644 --- a/bsp/lpc178x/SConstruct +++ b/bsp/lpc178x/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/lpc178x/lpc17xx_rom.sct b/bsp/lpc178x/lpc17xx_rom.sct new file mode 100644 index 000000000..893f49ce4 --- /dev/null +++ b/bsp/lpc178x/lpc17xx_rom.sct @@ -0,0 +1,15 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x00000000 0x00080000 { ; load region size_region + ER_IROM1 0x00000000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x10000000 0x00010000 { ; RW data + .ANY (+RW +ZI) + } +} + diff --git a/bsp/lpc178x/rtconfig.py b/bsp/lpc178x/rtconfig.py index 11c425ff9..563590ffb 100644 --- a/bsp/lpc178x/rtconfig.py +++ b/bsp/lpc178x/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' @@ -12,6 +17,10 @@ elif CROSS_TOOL == 'keil': elif CROSS_TOOL == 'iar': PLATFORM = 'iar' EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0/arm/bin' + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/lpc2148/SConstruct b/bsp/lpc2148/SConstruct index fcf718909..8793f636f 100644 --- a/bsp/lpc2148/SConstruct +++ b/bsp/lpc2148/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/lpc2148/rtconfig.py b/bsp/lpc2148/rtconfig.py index 8e90bd334..b3eb6d370 100644 --- a/bsp/lpc2148/rtconfig.py +++ b/bsp/lpc2148/rtconfig.py @@ -1,14 +1,27 @@ +import os + # toolchains options ARCH='arm' CPU='lpc214x' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'D:/SourceryGCC/bin' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'G:\Keil_MDK_380' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' diff --git a/bsp/lpc2478/SConstruct b/bsp/lpc2478/SConstruct index 4eade96f4..beaeb46b5 100644 --- a/bsp/lpc2478/SConstruct +++ b/bsp/lpc2478/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/lpc2478/rtconfig.py b/bsp/lpc2478/rtconfig.py index ee4345b76..3c92ab0be 100644 --- a/bsp/lpc2478/rtconfig.py +++ b/bsp/lpc2478/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='lpc24xx' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' @@ -12,6 +17,15 @@ elif CROSS_TOOL == '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!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/ls1bdev/SConstruct b/bsp/ls1bdev/SConstruct index d76d68a4a..5bb32bcfc 100644 --- a/bsp/ls1bdev/SConstruct +++ b/bsp/ls1bdev/SConstruct @@ -6,6 +6,7 @@ if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') else: RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/ls1bdev/rtconfig.py b/bsp/ls1bdev/rtconfig.py index 336c94df3..3f9787e5a 100644 --- a/bsp/ls1bdev/rtconfig.py +++ b/bsp/ls1bdev/rtconfig.py @@ -1,11 +1,32 @@ +import os + # CPU options ARCH='mips' CPU ='loongson_1b' # toolchains options CROSS_TOOL = 'gcc' -PLATFORM = 'gcc' -EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' + +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + +if CROSS_TOOL == 'gcc': + PLATFORM = 'gcc' + EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_MIPS_ELF/bin' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' PREFIX = 'mips-sde-elf-' diff --git a/bsp/m16c62p/SConstruct b/bsp/m16c62p/SConstruct index 7d8c0b0cd..0910c85b9 100644 --- a/bsp/m16c62p/SConstruct +++ b/bsp/m16c62p/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/m16c62p/rtconfig.py b/bsp/m16c62p/rtconfig.py index 6bb29ea76..3ed4a874b 100644 --- a/bsp/m16c62p/rtconfig.py +++ b/bsp/m16c62p/rtconfig.py @@ -1,9 +1,14 @@ +import os + # toolchains options ARCH = 'm16c' CPU = 'm16c62p' CROSS_TOOL = 'iar' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' @@ -11,6 +16,14 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' IAR_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench Evaluation 6.0' # EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench Evaluation 6.0' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' diff --git a/bsp/mb9bf500r/rtconfig.py b/bsp/mb9bf500r/rtconfig.py index 5b3885eba..bd93a40ba 100644 --- a/bsp/mb9bf500r/rtconfig.py +++ b/bsp/mb9bf500r/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR @@ -16,6 +21,9 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' 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') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/mb9bf506r/fm3_rom.sct b/bsp/mb9bf506r/fm3_rom.sct new file mode 100644 index 000000000..6a8744246 --- /dev/null +++ b/bsp/mb9bf506r/fm3_rom.sct @@ -0,0 +1,15 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x00000000 0x00080000 { ; load region size_region + ER_IROM1 0x00000000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x20000000 0x00008000 { ; RW data + .ANY (+RW +ZI) + } +} + diff --git a/bsp/mb9bf506r/rtconfig.py b/bsp/mb9bf506r/rtconfig.py index 5d6ae3831..ccc29b05f 100644 --- a/bsp/mb9bf506r/rtconfig.py +++ b/bsp/mb9bf506r/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR @@ -16,6 +21,9 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' 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') + BUILD = 'debug' if PLATFORM == 'gcc': @@ -56,7 +64,7 @@ elif PLATFORM == 'armcc': DEVICE = ' --device DARMSTM' CFLAGS = DEVICE + ' --apcs=interwork' AFLAGS = DEVICE - LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct' + LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-fm3.map --scatter fm3_rom.sct' CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB' diff --git a/bsp/mini2440/rtconfig.py b/bsp/mini2440/rtconfig.py index fe8a5121b..55158a1ad 100644 --- a/bsp/mini2440/rtconfig.py +++ b/bsp/mini2440/rtconfig.py @@ -1,3 +1,5 @@ +import os + # panel options # 'PNL_A70','PNL_N35', 'PNL_T35' , 'PNL_X35' RT_USING_LCD_TYPE = 'PNL_T35' @@ -9,12 +11,24 @@ TextBase = '0x30000000' CROSS_TOOL = 'gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/mini4020/SConstruct b/bsp/mini4020/SConstruct index dd50916df..4d4aa1290 100644 --- a/bsp/mini4020/SConstruct +++ b/bsp/mini4020/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/mini4020/rtconfig.py b/bsp/mini4020/rtconfig.py index d111a2004..2e2fb3c4e 100644 --- a/bsp/mini4020/rtconfig.py +++ b/bsp/mini4020/rtconfig.py @@ -1,15 +1,29 @@ +import os + # toolchains options ARCH = 'arm' CPU = 'sep4020' CROSS_TOOL = 'keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'c:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': @@ -65,14 +79,3 @@ elif PLATFORM == 'armcc': CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' - -elif PLATFORM == 'iar': - # toolchains - CC = 'armcc' - AS = 'armasm' - AR = 'armar' - LINK = 'armlink' - - CFLAGS = '' - AFLAGS = '' - LFLAGS = '' diff --git a/bsp/sam7x/rtconfig.py b/bsp/sam7x/rtconfig.py index ba912d8c9..18b19fc1b 100644 --- a/bsp/sam7x/rtconfig.py +++ b/bsp/sam7x/rtconfig.py @@ -1,3 +1,5 @@ +import os + # panel options # 'PNL_A70','PNL_N35', 'PNL_T35' RT_USING_LCD_TYPE = 'PNL_T35' @@ -8,12 +10,24 @@ CPU = 'AT91SAM7X' CROSS_TOOL = 'gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/stm32f107/SConstruct b/bsp/stm32f107/SConstruct index 63b1130d6..8929042d1 100644 --- a/bsp/stm32f107/SConstruct +++ b/bsp/stm32f107/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/stm32f107/rtconfig.py b/bsp/stm32f107/rtconfig.py index 8128d0f6e..1898385df 100644 --- a/bsp/stm32f107/rtconfig.py +++ b/bsp/stm32f107/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR @@ -16,6 +21,9 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0' +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' STM32_TYPE = 'STM32F10X_CL' diff --git a/bsp/stm32f10x/SConstruct b/bsp/stm32f10x/SConstruct index ec0c09d39..3f3a7a12a 100644 --- a/bsp/stm32f10x/SConstruct +++ b/bsp/stm32f10x/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/stm32f10x/rtconfig.py b/bsp/stm32f10x/rtconfig.py index dfb852977..e5f70f961 100644 --- a/bsp/stm32f10x/rtconfig.py +++ b/bsp/stm32f10x/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + #device options # STM32_TYPE = # 'STM32F10X_LD','STM32F10X_LD_VL', @@ -28,6 +33,9 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0' +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/stm32f20x/SConstruct b/bsp/stm32f20x/SConstruct index 63b1130d6..8929042d1 100644 --- a/bsp/stm32f20x/SConstruct +++ b/bsp/stm32f20x/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/stm32f20x/rtconfig.py b/bsp/stm32f20x/rtconfig.py index 2cbfe93d4..fde53fd12 100644 --- a/bsp/stm32f20x/rtconfig.py +++ b/bsp/stm32f20x/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/SourceryGCC/bin' @@ -13,6 +18,9 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 5.4 Evaluation_0' +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' if PLATFORM == 'gcc': diff --git a/bsp/stm32f40x/SConstruct b/bsp/stm32f40x/SConstruct index d16ef0dcb..59aac6b57 100644 --- a/bsp/stm32f40x/SConstruct +++ b/bsp/stm32f40x/SConstruct @@ -2,7 +2,10 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/stm32f40x/rtconfig.py b/bsp/stm32f40x/rtconfig.py index e1811e6da..55be67bbd 100644 --- a/bsp/stm32f40x/rtconfig.py +++ b/bsp/stm32f40x/rtconfig.py @@ -1,8 +1,13 @@ +import os + # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': @@ -15,7 +20,9 @@ elif CROSS_TOOL == 'iar': PLATFORM = 'iar' IAR_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0' -# +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + BUILD = 'debug' STM32_TYPE = 'STM32F4XX' diff --git a/bsp/x86/SConstruct b/bsp/x86/SConstruct index 061f72606..e588dcb59 100644 --- a/bsp/x86/SConstruct +++ b/bsp/x86/SConstruct @@ -2,7 +2,11 @@ import os import sys import rtconfig -RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] from building import * diff --git a/bsp/x86/rtconfig.py b/bsp/x86/rtconfig.py index 19452a16a..06011252a 100644 --- a/bsp/x86/rtconfig.py +++ b/bsp/x86/rtconfig.py @@ -1,14 +1,32 @@ +import os + # toolchains options ARCH='ia32' CPU='' CROSS_TOOL='gcc' +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') + # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_IA32_ELF/bin' +elif CROSS_TOOL == 'keil': + print '================ERROR============================' + print 'Not support keil yet!' + print '=================================================' + exit(0) +elif CROSS_TOOL == 'iar': + print '================ERROR============================' + print 'Not support iar yet!' + print '=================================================' + exit(0) + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug'