summaryrefslogtreecommitdiff
path: root/bsp/mini4020
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-04-09 03:32:35 +0000
committer[email protected] <[email protected]>2012-04-09 03:32:35 +0000
commita7810e12b9c2769419bac6582fae079d15ab9366 (patch)
tree8c5fe34a950502e5f34d2ce2aab4d8725bb0f3f7 /bsp/mini4020
parent9c804a28a442837d222358b63821c0ebf4efc811 (diff)
update the rtconfig.py and SConstruct in the BSP
in order to use buildbot.py git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2028 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/mini4020')
-rw-r--r--bsp/mini4020/SConstruct6
-rw-r--r--bsp/mini4020/rtconfig.py25
2 files changed, 19 insertions, 12 deletions
diff --git a/bsp/mini4020/SConstruct b/bsp/mini4020/SConstruct
index dd50916dfb..4d4aa12908 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 d111a20043..2e2fb3c4eb 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 = ''