summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbsp/simulator/SConstruct4
-rwxr-xr-xbsp/simulator/rtconfig.py7
2 files changed, 7 insertions, 4 deletions
diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct
index b2e958e65b..4db7328f2a 100755
--- a/bsp/simulator/SConstruct
+++ b/bsp/simulator/SConstruct
@@ -73,6 +73,10 @@ elif rtconfig.PLATFORM == 'mingw':
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env['LIBS']=libs
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
+elif rtconfig.CROSS_TOOL == 'clang-analyze':
+ TARGET = 'rtthread'
+ env = Environment(toolpath=[os.path.join(RTT_ROOT, 'tools', 'tools')],
+ tools = [rtconfig.CROSS_TOOL])
else:
TARGET = 'rtthread'
env['CC']=rtconfig.CC
diff --git a/bsp/simulator/rtconfig.py b/bsp/simulator/rtconfig.py
index 9328a087f8..d3ed2599d5 100755
--- a/bsp/simulator/rtconfig.py
+++ b/bsp/simulator/rtconfig.py
@@ -12,10 +12,10 @@ if os.getenv('RTT_CC'):
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path
-if CROSS_TOOL == 'gcc':
+if CROSS_TOOL == 'gcc' or CROSS_TOOL == 'clang-analyze':
CPU = 'posix'
PLATFORM = 'gcc'
- EXEC_PATH = '/usr/bin/gcc'
+ EXEC_PATH = ''
elif CROSS_TOOL == 'mingw':
CPU = 'win32'
@@ -26,8 +26,7 @@ elif CROSS_TOOL == 'msvc':
CPU = 'win32'
PLATFORM = 'cl'
EXEC_PATH = ''
-
-else :
+else:
print "bad CROSS TOOL!"
exit(1)