diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct index b2e958e65b704202201c11a2f7df3c5000728ed1..4db7328f2a72bd7919b263cf3cabeefa6703eebe 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 9328a087f85bb26d322f8910c4b7bc1e30155e6c..d3ed2599d58367894b0651f409be6f92b43f9a18 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)