summaryrefslogtreecommitdiff
path: root/bsp/simulator
diff options
context:
space:
mode:
authorprife <[email protected]>2013-10-26 13:55:58 +0800
committerprife <[email protected]>2013-10-26 14:00:24 +0800
commita12892af3102cf6690c83bab6ab794bbc7482e4c (patch)
tree396accce3ebc40da50a4066ee889606aa14f415b /bsp/simulator
parentca9b83c68fcc2b841400a5f4c7728a111582ffb7 (diff)
simulatr: print error messages when RTT_RTGUI is invalid
Diffstat (limited to 'bsp/simulator')
-rwxr-xr-xbsp/simulator/SConstruct34
-rw-r--r--bsp/simulator/drivers/SConscript4
2 files changed, 23 insertions, 15 deletions
diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct
index 4db7328f2a..79522c5a73 100755
--- a/bsp/simulator/SConstruct
+++ b/bsp/simulator/SConstruct
@@ -13,7 +13,6 @@ else:
# set the rtgui root directory by hand
# empty string means use the RTGUI in svn
RTT_RTGUI = os.path.normpath(r'F:\Project\git\rt-gui\components\rtgui')
- # RTT_RTGUI =''
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
from building import *
@@ -88,18 +87,27 @@ else:
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui'])
if GetDepend('RT_USING_RTGUI'):
- if RTT_RTGUI:
- objs += SConscript(os.path.join(RTT_RTGUI, 'SConscript'),
- variant_dir='build/components/rtgui',
- duplicate=0)
- objs = objs + SConscript(RTT_RTGUI+'/../../demo/examples/SConscript',
- variant_dir='build/examples/gui', duplicate=0)
- else:
- objs += SConscript(os.path.join(RTT_ROOT + '/components/rtgui', 'SConscript'),
- variant_dir='build/components/rtgui',
- duplicate=0)
- objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript',
- variant_dir='build/examples/gui', duplicate=0)
+ try:
+ if RTT_RTGUI:
+ objs += SConscript(os.path.join(RTT_RTGUI, 'SConscript'),
+ variant_dir='build/components/rtgui',
+ duplicate=0)
+ objs = objs + SConscript(RTT_RTGUI+'/../../demo/examples/SConscript',
+ variant_dir='build/examples/gui', duplicate=0)
+ else:
+ objs += SConscript(os.path.join(RTT_ROOT + '/components/rtgui', 'SConscript'),
+ variant_dir='build/components/rtgui',
+ duplicate=0)
+ objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript',
+ variant_dir='build/examples/gui', duplicate=0)
+ except:
+ print
+ print 'RTGUI configuration is invalid!'
+ print 'RT_USING_RTGUI is enabled in rtconfig.h, but scons cannot find '+\
+ 'RTGUI source code. In order to eliminate this error, you can '+\
+ 'add RTT_RTGUI in environment to point RTGUI source code, or '+\
+ 'disable RT_USING_RTGUI in rtconfig.h'
+ exit(-1);
if GetDepend('RT_USING_TC'):
objs = objs + SConscript(RTT_ROOT + '/examples/kernel/SConscript', variant_dir = 'build/tc/kernel', duplicate=0)
diff --git a/bsp/simulator/drivers/SConscript b/bsp/simulator/drivers/SConscript
index 739d8f2b5f..f71b3f9ea3 100644
--- a/bsp/simulator/drivers/SConscript
+++ b/bsp/simulator/drivers/SConscript
@@ -22,9 +22,9 @@ if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NAND') == False
SrcRemove(src, 'nanddrv_file.c')
if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MTD_NOR') == False:
SrcRemove(src, 'sst25vfxx_mtd_sim.c')
-if GetDepend('RT_USING_DFS_WINSHAREDIR') == False:
+if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_DFS_WINSHAREDIR') == False:
SrcRemove(src, 'dfs_win32.c')
-if GetDepend('RT_USING_MODULE') == False:
+if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_MODULE') == False:
SrcRemove(src, ['module_win32.c'])
if GetDepend('RT_USING_TAPNETIF') == False:
SrcRemove(src, ['tap_netif.c'])