From 68a5e7d5a3a172d2535b400e7756273524836061 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sun, 31 Dec 2017 21:40:20 +0800 Subject: [PATCH] [BSP] Update building script --- bsp/gd32450z-eval/rtconfig.py | 5 ++--- bsp/imx6ul/SConstruct | 2 +- bsp/lpc824/SConstruct | 3 +-- bsp/mini4020/rtconfig.py | 2 +- tools/keil.py | 6 +++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/bsp/gd32450z-eval/rtconfig.py b/bsp/gd32450z-eval/rtconfig.py index 8e01cef169..70ffabba2f 100644 --- a/bsp/gd32450z-eval/rtconfig.py +++ b/bsp/gd32450z-eval/rtconfig.py @@ -3,7 +3,7 @@ import os # toolchains options ARCH='arm' CPU='cortex-m4' -CROSS_TOOL='gcc' +CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') @@ -17,14 +17,13 @@ if CROSS_TOOL == 'gcc': print 'Not support gcc yet!' print '=================================================' PLATFORM = 'gcc' - exit(0) elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': PLATFORM = 'iar' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' - + if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/imx6ul/SConstruct b/bsp/imx6ul/SConstruct index d3363ef87e..eaf40ea2d8 100644 --- a/bsp/imx6ul/SConstruct +++ b/bsp/imx6ul/SConstruct @@ -15,7 +15,7 @@ TARGET = 'rtthread-imx6.' + rtconfig.TARGET_EXT env = Environment(tools = ['mingw'], AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, - CXX= rtconfig.CXX, CXXFLAGS = rtconfig.CFLAGS, + CXX= rtconfig.CXX, CXXFLAGS = rtconfig.CFLAGS, AR = rtconfig.AR, ARFLAGS = '-rc', LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) diff --git a/bsp/lpc824/SConstruct b/bsp/lpc824/SConstruct index 1a46ab9bed..9d111f8821 100644 --- a/bsp/lpc824/SConstruct +++ b/bsp/lpc824/SConstruct @@ -8,8 +8,7 @@ if os.getenv('RTT_ROOT'): else: #RTT_ROOT = os.path.join(Dir('#').get_abspath(), 'rt-thread') RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') -print RTT_ROOT - + 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 f3aac45cdb..9d7b859db8 100644 --- a/bsp/mini4020/rtconfig.py +++ b/bsp/mini4020/rtconfig.py @@ -10,7 +10,7 @@ CROSS_TOOL = 'keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') -if CROSS_TOOL == 'gcc': +if CROSS_TOOL == 'gcc': print '================ERROR============================' print 'Not support gcc yet!' print '=================================================' diff --git a/tools/keil.py b/tools/keil.py index 07e8254169..1dbb55634d 100644 --- a/tools/keil.py +++ b/tools/keil.py @@ -226,7 +226,7 @@ def MDK45Project(tree, target, script): if CPPDEFINES: CPPDEFINES += group['CPPDEFINES'] else: - CPPDEFINES += group['CPPDEFINES'] + CPPDEFINES = group['CPPDEFINES'] # get each group's link flags if group.has_key('LINKFLAGS') and group['LINKFLAGS']: @@ -332,9 +332,9 @@ def MDKProject(target, script): # get each group's definitions if group.has_key('CPPDEFINES') and group['CPPDEFINES']: if CPPDEFINES: - CPPDEFINES += ';' + group['CPPDEFINES'] - else: CPPDEFINES += group['CPPDEFINES'] + else: + CPPDEFINES = group['CPPDEFINES'] # get each group's link flags if group.has_key('LINKFLAGS') and group['LINKFLAGS']: -- GitLab