提交 eafcdd0b 编写于 作者: mysterywolf's avatar mysterywolf 提交者: mysterywolf

[tools] format python code

上级 af82606d
...@@ -437,4 +437,4 @@ def ThreadStackStaticAnalysis(env): ...@@ -437,4 +437,4 @@ def ThreadStackStaticAnalysis(env):
main() main()
print('\nThread stack static analysis done!') print('\nThread stack static analysis done!')
return return
\ No newline at end of file
...@@ -305,7 +305,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ ...@@ -305,7 +305,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
menuconfig(Rtt_Root) menuconfig(Rtt_Root)
exit(0) exit(0)
if GetOption('pyconfig_silent'): if GetOption('pyconfig_silent'):
from menuconfig import guiconfig_silent from menuconfig import guiconfig_silent
guiconfig_silent(Rtt_Root) guiconfig_silent(Rtt_Root)
...@@ -694,7 +694,7 @@ def PreBuilding(): ...@@ -694,7 +694,7 @@ def PreBuilding():
a() a()
def GroupLibName(name, env): def GroupLibName(name, env):
if rtconfig.PLATFORM == 'armcc': if rtconfig.PLATFORM == 'armcc':
return name + '_rvds' return name + '_rvds'
elif rtconfig.PLATFORM == 'gcc': elif rtconfig.PLATFORM == 'gcc':
...@@ -850,7 +850,7 @@ def GenTargetProject(program = None): ...@@ -850,7 +850,7 @@ def GenTargetProject(program = None):
if GetOption('target') == 'eclipse': if GetOption('target') == 'eclipse':
from eclipse import TargetEclipse from eclipse import TargetEclipse
TargetEclipse(Env, GetOption('reset-project-config'), GetOption('project-name')) TargetEclipse(Env, GetOption('reset-project-config'), GetOption('project-name'))
if GetOption('target') == 'codelite': if GetOption('target') == 'codelite':
from codelite import TargetCodelite from codelite import TargetCodelite
TargetCodelite(Projects, program) TargetCodelite(Projects, program)
......
...@@ -68,7 +68,7 @@ def _CDKProject(tree, target, script): ...@@ -68,7 +68,7 @@ def _CDKProject(tree, target, script):
for child in root: for child in root:
if child.tag == 'VirtualDirectory': if child.tag == 'VirtualDirectory':
root.remove(child) root.remove(child)
for group in script: for group in script:
group_tree = SDKAddGroup(ProjectFiles, root, group['name'], group['src'], project_path) group_tree = SDKAddGroup(ProjectFiles, root, group['name'], group['src'], project_path)
...@@ -91,8 +91,8 @@ def _CDKProject(tree, target, script): ...@@ -91,8 +91,8 @@ def _CDKProject(tree, target, script):
if CCFLAGS: if CCFLAGS:
CCFLAGS += ' ' + group['CCFLAGS'] CCFLAGS += ' ' + group['CCFLAGS']
else: else:
CCFLAGS += group['CCFLAGS'] CCFLAGS += group['CCFLAGS']
# get each group's link flags # get each group's link flags
if 'LINKFLAGS' in group and group['LINKFLAGS']: if 'LINKFLAGS' in group and group['LINKFLAGS']:
if LINKFLAGS: if LINKFLAGS:
...@@ -114,7 +114,7 @@ def _CDKProject(tree, target, script): ...@@ -114,7 +114,7 @@ def _CDKProject(tree, target, script):
CC_Misc = tree.find('BuildConfigs/BuildConfig/Compiler/OtherFlags') CC_Misc = tree.find('BuildConfigs/BuildConfig/Compiler/OtherFlags')
CC_Misc.text = CCFLAGS CC_Misc.text = CCFLAGS
LK_Misc = tree.find('BuildConfigs/BuildConfig/Linker/OtherFlags') LK_Misc = tree.find('BuildConfigs/BuildConfig/Linker/OtherFlags')
LK_Misc.text = LINKFLAGS LK_Misc.text = LINKFLAGS
......
...@@ -40,10 +40,10 @@ def CB_AddHeadFiles(program, elem, project_path): ...@@ -40,10 +40,10 @@ def CB_AddHeadFiles(program, elem, project_path):
utils.source_ext = [] utils.source_ext = []
utils.source_ext = ["h"] utils.source_ext = ["h"]
for item in program: for item in program:
utils.walk_children(item) utils.walk_children(item)
utils.source_list.sort() utils.source_list.sort()
# print utils.source_list # print utils.source_list
for f in utils.source_list: for f in utils.source_list:
path = _make_path_relative(project_path, f) path = _make_path_relative(project_path, f)
Unit = SubElement(elem, 'Unit') Unit = SubElement(elem, 'Unit')
...@@ -70,14 +70,14 @@ def CBProject(target, script, program): ...@@ -70,14 +70,14 @@ def CBProject(target, script, program):
tree = etree.parse('template.cbp') tree = etree.parse('template.cbp')
else: else:
tree = etree.parse(os.path.join(os.path.dirname(__file__), 'template.cbp')) tree = etree.parse(os.path.join(os.path.dirname(__file__), 'template.cbp'))
root = tree.getroot() root = tree.getroot()
out = open(target, 'w') out = open(target, 'w')
out.write('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n') out.write('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n')
ProjectFiles = [] ProjectFiles = []
# SECTION 1. add "*.c|*.h" files group # SECTION 1. add "*.c|*.h" files group
for elem in tree.iter(tag='Project'): for elem in tree.iter(tag='Project'):
# print elem.tag, elem.attrib # print elem.tag, elem.attrib
...@@ -88,7 +88,7 @@ def CBProject(target, script, program): ...@@ -88,7 +88,7 @@ def CBProject(target, script, program):
# add h files # add h files
CB_AddHeadFiles(program, elem, project_path) CB_AddHeadFiles(program, elem, project_path)
# SECTION 2. # SECTION 2.
# write head include path # write head include path
if 'CPPPATH' in building.Env: if 'CPPPATH' in building.Env:
cpp_path = building.Env['CPPPATH'] cpp_path = building.Env['CPPPATH']
...@@ -96,7 +96,7 @@ def CBProject(target, script, program): ...@@ -96,7 +96,7 @@ def CBProject(target, script, program):
for path in cpp_path: for path in cpp_path:
inc = _make_path_relative(project_path, os.path.normpath(path)) inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/') paths.add(inc) #.replace('\\', '/')
paths = [i for i in paths] paths = [i for i in paths]
paths.sort() paths.sort()
# write include path, definitions # write include path, definitions
...@@ -110,10 +110,10 @@ def CBProject(target, script, program): ...@@ -110,10 +110,10 @@ def CBProject(target, script, program):
Add = SubElement(elem, 'Add') Add = SubElement(elem, 'Add')
for d in macro: for d in macro:
Add.set('option', "-D"+d) Add.set('option', "-D"+d)
# write link flags # write link flags
''' '''
# write lib dependence # write lib dependence
if 'LIBS' in building.Env: if 'LIBS' in building.Env:
for elem in tree.iter(tag='Tool'): for elem in tree.iter(tag='Tool'):
if elem.attrib['Name'] == 'VCLinkerTool': if elem.attrib['Name'] == 'VCLinkerTool':
...@@ -121,7 +121,7 @@ def CBProject(target, script, program): ...@@ -121,7 +121,7 @@ def CBProject(target, script, program):
libs_with_extention = [i+'.lib' for i in building.Env['LIBS']] libs_with_extention = [i+'.lib' for i in building.Env['LIBS']]
libs = ' '.join(libs_with_extention) libs = ' '.join(libs_with_extention)
elem.set('AdditionalDependencies', libs) elem.set('AdditionalDependencies', libs)
# write lib include path # write lib include path
if 'LIBPATH' in building.Env: if 'LIBPATH' in building.Env:
lib_path = building.Env['LIBPATH'] lib_path = building.Env['LIBPATH']
...@@ -129,7 +129,7 @@ def CBProject(target, script, program): ...@@ -129,7 +129,7 @@ def CBProject(target, script, program):
for path in lib_path: for path in lib_path:
inc = _make_path_relative(project_path, os.path.normpath(path)) inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/') paths.add(inc) #.replace('\\', '/')
paths = [i for i in paths] paths = [i for i in paths]
paths.sort() paths.sort()
lib_paths = ';'.join(paths) lib_paths = ';'.join(paths)
......
...@@ -40,15 +40,15 @@ fs_encoding = sys.getfilesystemencoding() ...@@ -40,15 +40,15 @@ fs_encoding = sys.getfilesystemencoding()
def CLSetCFlags(root, flags): def CLSetCFlags(root, flags):
node = root.find('Settings').find('Configuration').find('Compiler') node = root.find('Settings').find('Configuration').find('Compiler')
node.attrib['C_Options'] = flags node.attrib['C_Options'] = flags
def CLSetCxxFlags(root, flags): def CLSetCxxFlags(root, flags):
node = root.find('Settings').find('Configuration').find('Compiler') node = root.find('Settings').find('Configuration').find('Compiler')
node.attrib['Options'] = flags node.attrib['Options'] = flags
def CLSetAsFlags(root, flags): def CLSetAsFlags(root, flags):
node = root.find('Settings').find('Configuration').find('Compiler') node = root.find('Settings').find('Configuration').find('Compiler')
node.attrib['Assembler'] = flags node.attrib['Assembler'] = flags
def CLAddIncludePath(root, path): def CLAddIncludePath(root, path):
node = root.find('Settings').find('Configuration').find('Compiler') node = root.find('Settings').find('Configuration').find('Compiler')
node = SubElement(node, 'IncludePath') node = SubElement(node, 'IncludePath')
...@@ -58,22 +58,22 @@ def CLAddPreprocessor(root, value): ...@@ -58,22 +58,22 @@ def CLAddPreprocessor(root, value):
node = root.find('Settings').find('Configuration').find('Compiler') node = root.find('Settings').find('Configuration').find('Compiler')
node = SubElement(node, 'Preprocessor') node = SubElement(node, 'Preprocessor')
node.attrib['Value'] = value node.attrib['Value'] = value
def CLSetLdFlags(root, flags): def CLSetLdFlags(root, flags):
node = root.find('Settings').find('Configuration').find('Linker') node = root.find('Settings').find('Configuration').find('Linker')
node.attrib['Options'] = flags node.attrib['Options'] = flags
def CLAddLibrary_path(root, path): def CLAddLibrary_path(root, path):
node = root.find('Settings').find('Configuration').find('Linker') node = root.find('Settings').find('Configuration').find('Linker')
node = SubElement(node, 'LibraryPath') node = SubElement(node, 'LibraryPath')
node.attrib['Value'] = path node.attrib['Value'] = path
def CLAddLibrary(root, lib): def CLAddLibrary(root, lib):
node = root.find('Settings').find('Configuration').find('Linker') node = root.find('Settings').find('Configuration').find('Linker')
node = SubElement(node, 'Library') node = SubElement(node, 'Library')
node.attrib['Value'] = lib node.attrib['Value'] = lib
def CLAddFile(root, file_path): def CLAddFile(root, file_path):
file_path = file_path.replace('\\', '/') file_path = file_path.replace('\\', '/')
...@@ -81,12 +81,12 @@ def CLAddFile(root, file_path): ...@@ -81,12 +81,12 @@ def CLAddFile(root, file_path):
dir_list.pop() dir_list.pop()
if not len(dir_list): if not len(dir_list):
dir_list.append(os.path.abspath('.').replace('\\', '/').split('/')[-1]) dir_list.append(os.path.abspath('.').replace('\\', '/').split('/')[-1])
parent = root parent = root
for dir_name in dir_list: for dir_name in dir_list:
if dir_name == '..': if dir_name == '..':
continue continue
node = None node = None
nodes = parent.findall('VirtualDirectory') nodes = parent.findall('VirtualDirectory')
for iter in nodes: for iter in nodes:
...@@ -101,18 +101,18 @@ def CLAddFile(root, file_path): ...@@ -101,18 +101,18 @@ def CLAddFile(root, file_path):
if parent != root: if parent != root:
node = SubElement(parent, 'File') node = SubElement(parent, 'File')
node.attrib['Name'] = file_path node.attrib['Name'] = file_path
def CLAddHeaderFiles(parent, program, project_path): def CLAddHeaderFiles(parent, program, project_path):
utils.source_ext = [] utils.source_ext = []
utils.source_ext = ["h"] utils.source_ext = ["h"]
for item in program: for item in program:
utils.walk_children(item) utils.walk_children(item)
utils.source_list.sort() utils.source_list.sort()
for f in utils.source_list: for f in utils.source_list:
path = _make_path_relative(project_path, f) path = _make_path_relative(project_path, f)
CLAddFile(parent, path) CLAddFile(parent, path)
def CLAddCFiles(parent, files, project_path): def CLAddCFiles(parent, files, project_path):
for f in files: for f in files:
fn = f.rfile() fn = f.rfile()
...@@ -122,81 +122,81 @@ def CLAddCFiles(parent, files, project_path): ...@@ -122,81 +122,81 @@ def CLAddCFiles(parent, files, project_path):
path = _make_path_relative(project_path, path) path = _make_path_relative(project_path, path)
path = os.path.join(path, name) path = os.path.join(path, name)
CLAddFile(parent, path) CLAddFile(parent, path)
def CLGenWorkspace(project_name, project_path): def CLGenWorkspace(project_name, project_path):
if os.path.isfile('codelite_template.workspace'): if os.path.isfile('codelite_template.workspace'):
tree = etree.parse('codelite_template.workspace') tree = etree.parse('codelite_template.workspace')
else: else:
tree = etree.parse(os.path.join(os.path.dirname(__file__), 'codelite_template.workspace')) tree = etree.parse(os.path.join(os.path.dirname(__file__), 'codelite_template.workspace'))
root = tree.getroot() root = tree.getroot()
root.attrib['Name'] = project_name root.attrib['Name'] = project_name
node = root.find('Project') node = root.find('Project')
node.attrib['Name'] = project_name node.attrib['Name'] = project_name
node.attrib['Path'] = project_name + '.project' node.attrib['Path'] = project_name + '.project'
node = root.find('BuildMatrix').find('WorkspaceConfiguration').find('Project') node = root.find('BuildMatrix').find('WorkspaceConfiguration').find('Project')
node.attrib['Name'] = project_name node.attrib['Name'] = project_name
out = open(project_name + '.workspace', 'w') out = open(project_name + '.workspace', 'w')
out.write('<?xml version="1.0" encoding="UTF-8"?>\n') out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
xml_indent(root) xml_indent(root)
out.write(etree.tostring(root, encoding='utf-8')) out.write(etree.tostring(root, encoding='utf-8'))
out.close() out.close()
def TargetCodelite(script, program): def TargetCodelite(script, program):
project_name = os.path.abspath('.').replace('\\', '/').split('/')[-1] project_name = os.path.abspath('.').replace('\\', '/').split('/')[-1]
#project_name.replace('-', '_') #project_name.replace('-', '_')
project_path = os.path.abspath('.') project_path = os.path.abspath('.')
CLGenWorkspace(project_name, project_path) CLGenWorkspace(project_name, project_path)
if os.path.isfile('codelite_template.project'): if os.path.isfile('codelite_template.project'):
tree = etree.parse('codelite_template.project') tree = etree.parse('codelite_template.project')
else: else:
tree = etree.parse(os.path.join(os.path.dirname(__file__), 'codelite_template.project')) tree = etree.parse(os.path.join(os.path.dirname(__file__), 'codelite_template.project'))
root = tree.getroot() root = tree.getroot()
root.attrib['Name'] = project_name root.attrib['Name'] = project_name
out = open(project_name + '.project', 'w') out = open(project_name + '.project', 'w')
out.write('<?xml version="1.0" encoding="UTF-8"?>\n') out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
# add files # add files
for group in script: for group in script:
CLAddCFiles(root, group['src'], project_path) CLAddCFiles(root, group['src'], project_path)
# add header file # add header file
CLAddHeaderFiles(root, program, project_path) CLAddHeaderFiles(root, program, project_path)
# SECTION 2. # SECTION 2.
# write head include path # write head include path
if 'CPPPATH' in building.Env: if 'CPPPATH' in building.Env:
cpp_path = building.Env['CPPPATH'] cpp_path = building.Env['CPPPATH']
paths = set() paths = set()
for path in cpp_path: for path in cpp_path:
inc = _make_path_relative(project_path, os.path.normpath(path)) inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/') paths.add(inc) #.replace('\\', '/')
paths = [i for i in paths] paths = [i for i in paths]
paths.sort() paths.sort()
# write include path, definitions # write include path, definitions
for elem in tree.iter(tag='Compiler'): for elem in tree.iter(tag='Compiler'):
break break
for path in paths: for path in paths:
CLAddIncludePath(root, path) CLAddIncludePath(root, path)
#print building.Env.get('LIBPATH', []) #print building.Env.get('LIBPATH', [])
#print building.Env.get('LIBS', []) #print building.Env.get('LIBS', [])
CLSetCFlags(root, building.Env.get('CFLAGS', [])) CLSetCFlags(root, building.Env.get('CFLAGS', []))
CLSetCxxFlags(root, building.Env.get('CFLAGS', [])) CLSetCxxFlags(root, building.Env.get('CFLAGS', []))
asflags = building.Env.get('ASFLAGS', []) asflags = building.Env.get('ASFLAGS', [])
asflags = asflags.replace('-ffunction-sections', '') asflags = asflags.replace('-ffunction-sections', '')
asflags = asflags.replace('-fdata-sections', '') asflags = asflags.replace('-fdata-sections', '')
...@@ -205,11 +205,11 @@ def TargetCodelite(script, program): ...@@ -205,11 +205,11 @@ def TargetCodelite(script, program):
asflags = asflags.replace('assembler-with-cpp', '') asflags = asflags.replace('assembler-with-cpp', '')
CLSetAsFlags(root, asflags) CLSetAsFlags(root, asflags)
CLSetLdFlags(root, building.Env.get('LINKFLAGS', [])) CLSetLdFlags(root, building.Env.get('LINKFLAGS', []))
for macro in building.Env.get('CPPDEFINES', []): for macro in building.Env.get('CPPDEFINES', []):
for d in macro: for d in macro:
CLAddPreprocessor(root, d) CLAddPreprocessor(root, d)
xml_indent(root) xml_indent(root)
out.write(etree.tostring(root, encoding='utf-8')) out.write(etree.tostring(root, encoding='utf-8'))
out.close() out.close()
# #
# Copyright (c) 2006-2019, RT-Thread Development Team # Copyright (c) 2006-2022, RT-Thread Development Team
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
......
# #
# Copyright (c) 2006-2021, RT-Thread Development Team # Copyright (c) 2006-2022, RT-Thread Development Team
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
...@@ -65,7 +65,7 @@ class CheckOut: ...@@ -65,7 +65,7 @@ class CheckOut:
if file_real_path == file_path: if file_real_path == file_path:
logging.info("ignore file path: {}".format(file_real_path)) logging.info("ignore file path: {}".format(file_real_path))
return 0 return 0
file_dir_path = os.path.dirname(file_path) file_dir_path = os.path.dirname(file_path)
for _dir in dir_ignore: for _dir in dir_ignore:
if _dir is not None: if _dir is not None:
...@@ -168,7 +168,7 @@ class FormatCheck: ...@@ -168,7 +168,7 @@ class FormatCheck:
with open(file_path, 'r', encoding = "utf-8") as f: with open(file_path, 'r', encoding = "utf-8") as f:
file_lines = f.readlines() file_lines = f.readlines()
if not self.__check_file(file_lines, file_path): if not self.__check_file(file_lines, file_path):
format_check_fail_files += 1 format_check_fail_files += 1
if (not encoding_check_result) or (format_check_fail_files != 0): if (not encoding_check_result) or (format_check_fail_files != 0):
logging.error("files format check fail.") logging.error("files format check fail.")
...@@ -209,12 +209,12 @@ class LicenseCheck: ...@@ -209,12 +209,12 @@ class LicenseCheck:
logging.warning("[{0}]: license year: {} is not true: {}, please update.".format(file_path, logging.warning("[{0}]: license year: {} is not true: {}, please update.".format(file_path,
license_year, license_year,
true_year)) true_year))
else: else:
logging.info("[{0}]: license check success.".format(file_path)) logging.info("[{0}]: license check success.".format(file_path))
except Exception as e: except Exception as e:
logging.error(e) logging.error(e)
else: else:
logging.error("[{0}]: license check fail.".format(file_path)) logging.error("[{0}]: license check fail.".format(file_path))
check_result = False check_result = False
......
...@@ -208,7 +208,7 @@ def MDK4AddGroup(ProjectFiles, parent, name, files, project_path, group_scons): ...@@ -208,7 +208,7 @@ def MDK4AddGroup(ProjectFiles, parent, name, files, project_path, group_scons):
return group return group
# The common part of making MDK4/5 project # The common part of making MDK4/5 project
def MDK45Project(tree, target, script): def MDK45Project(tree, target, script):
project_path = os.path.dirname(os.path.abspath(target)) project_path = os.path.dirname(os.path.abspath(target))
...@@ -437,7 +437,7 @@ def ARMCC_Version(): ...@@ -437,7 +437,7 @@ def ARMCC_Version():
stdout, stderr = child.communicate() stdout, stderr = child.communicate()
''' '''
example stdout: example stdout:
Product: MDK Plus 5.24 Product: MDK Plus 5.24
Component: ARM Compiler 5.06 update 5 (build 528) Component: ARM Compiler 5.06 update 5 (build 528)
Tool: armcc [4d3621] Tool: armcc [4d3621]
......
...@@ -27,7 +27,7 @@ def TargetMakefile(env): ...@@ -27,7 +27,7 @@ def TargetMakefile(env):
RTT_ROOT = os.path.abspath(env['RTT_ROOT']) RTT_ROOT = os.path.abspath(env['RTT_ROOT'])
match_bsp = False match_bsp = False
if BSP_ROOT.startswith(RTT_ROOT): if BSP_ROOT.startswith(RTT_ROOT):
match_bsp = True match_bsp = True
make = open('config.mk', 'w') make = open('config.mk', 'w')
......
...@@ -150,7 +150,7 @@ def touch_env(): ...@@ -150,7 +150,7 @@ def touch_env():
home_dir = os.environ['HOME'] home_dir = os.environ['HOME']
else: else:
home_dir = os.environ['USERPROFILE'] home_dir = os.environ['USERPROFILE']
package_url = os.getenv('RTT_PACKAGE_URL') or DEFAULT_RTT_PACKAGE_URL package_url = os.getenv('RTT_PACKAGE_URL') or DEFAULT_RTT_PACKAGE_URL
env_dir = os.path.join(home_dir, '.env') env_dir = os.path.join(home_dir, '.env')
...@@ -223,7 +223,7 @@ def touch_env(): ...@@ -223,7 +223,7 @@ def touch_env():
if os.path.exists(os.path.join(env_dir, 'tools', 'scripts')): if os.path.exists(os.path.join(env_dir, 'tools', 'scripts')):
os.environ["PATH"] = os.path.join(env_dir, 'tools', 'scripts') + ';' + os.environ["PATH"] os.environ["PATH"] = os.path.join(env_dir, 'tools', 'scripts') + ';' + os.environ["PATH"]
# Exclude utestcases # Exclude utestcases
def exclude_utestcases(RTT_ROOT): def exclude_utestcases(RTT_ROOT):
if os.path.isfile(os.path.join(RTT_ROOT, 'examples/utest/testcases/Kconfig')): if os.path.isfile(os.path.join(RTT_ROOT, 'examples/utest/testcases/Kconfig')):
return return
...@@ -241,7 +241,7 @@ def exclude_utestcases(RTT_ROOT): ...@@ -241,7 +241,7 @@ def exclude_utestcases(RTT_ROOT):
# menuconfig for Linux # menuconfig for Linux
def menuconfig(RTT_ROOT): def menuconfig(RTT_ROOT):
# Exclude utestcases # Exclude utestcases
exclude_utestcases(RTT_ROOT) exclude_utestcases(RTT_ROOT)
kconfig_dir = os.path.join(RTT_ROOT, 'tools', 'kconfig-frontends') kconfig_dir = os.path.join(RTT_ROOT, 'tools', 'kconfig-frontends')
...@@ -275,7 +275,7 @@ def menuconfig(RTT_ROOT): ...@@ -275,7 +275,7 @@ def menuconfig(RTT_ROOT):
def guiconfig(RTT_ROOT): def guiconfig(RTT_ROOT):
import pyguiconfig import pyguiconfig
# Exclude utestcases # Exclude utestcases
exclude_utestcases(RTT_ROOT) exclude_utestcases(RTT_ROOT)
if sys.platform != 'win32': if sys.platform != 'win32':
...@@ -309,9 +309,9 @@ def guiconfig(RTT_ROOT): ...@@ -309,9 +309,9 @@ def guiconfig(RTT_ROOT):
def guiconfig_silent(RTT_ROOT): def guiconfig_silent(RTT_ROOT):
import defconfig import defconfig
# Exclude utestcases # Exclude utestcases
exclude_utestcases(RTT_ROOT) exclude_utestcases(RTT_ROOT)
if sys.platform != 'win32': if sys.platform != 'win32':
touch_env() touch_env()
......
...@@ -172,7 +172,7 @@ class Folder(object): ...@@ -172,7 +172,7 @@ class Folder(object):
# rt_uint32_t type; # rt_uint32_t type;
# const char *name; # const char *name;
# const rt_uint8_t *data; # const rt_uint8_t *data;
# rt_size_t size; # rt_size_t size;
#} #}
d_li = [] d_li = []
# payload base # payload base
......
...@@ -46,7 +46,7 @@ def BuildPackage(package): ...@@ -46,7 +46,7 @@ def BuildPackage(package):
package = json.loads(package_json) package = json.loads(package_json)
# check package name # check package name
if 'name' not in package: if 'name' not in package:
return [] return []
......
...@@ -11,193 +11,193 @@ MODULE_VER_NUM = 1 ...@@ -11,193 +11,193 @@ MODULE_VER_NUM = 1
cproject_temp = """<?xml version="1.0" encoding="UTF-8" standalone="no"?> cproject_temp = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> <?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings"> <storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094"> <cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094" moduleId="org.eclipse.cdt.core.settings" name="Debug"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/> <externalSettings/>
<extensions> <extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions> </extensions>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="rtthread" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094" name="Debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug"> <configuration artifactName="rtthread" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094" name="Debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094." name="/" resourcePath=""> <folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1201710416" name="ARM Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug"> <toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1201710416" name="ARM Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.251260409" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.251260409" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1365878149" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1365878149" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.709136944" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.709136944" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1986446770" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1986446770" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1312975261" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" useByScannerDiscovery="true" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1312975261" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" useByScannerDiscovery="true" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1538128212" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" useByScannerDiscovery="true" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1538128212" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" useByScannerDiscovery="true" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.2136804218" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" useByScannerDiscovery="true" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.2136804218" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.244767666" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" useByScannerDiscovery="true" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.244767666" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1055848773" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.default" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1055848773" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.default" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.501941135" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.dwarf2" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.501941135" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.dwarf2" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1696308067" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" useByScannerDiscovery="false" value="GNU Tools for ARM Embedded Processors" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1696308067" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" useByScannerDiscovery="false" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1558403188" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1558403188" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.749415257" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m4" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.749415257" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m4" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.2114153533" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.2114153533" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1600865811" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1600865811" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1109963929" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" useByScannerDiscovery="false" value="gcc" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1109963929" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" useByScannerDiscovery="false" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1040883831" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" useByScannerDiscovery="false" value="g++" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1040883831" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" useByScannerDiscovery="false" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1678200391" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" useByScannerDiscovery="false" value="ar" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1678200391" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" useByScannerDiscovery="false" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1171840296" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" useByScannerDiscovery="false" value="objcopy" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1171840296" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" useByScannerDiscovery="false" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.342604837" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" useByScannerDiscovery="false" value="objdump" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.342604837" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" useByScannerDiscovery="false" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.898269225" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" useByScannerDiscovery="false" value="size" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.898269225" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" useByScannerDiscovery="false" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.2016398076" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" useByScannerDiscovery="false" value="make" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.2016398076" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" useByScannerDiscovery="false" value="make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1606171496" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" useByScannerDiscovery="false" value="rm" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1606171496" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" useByScannerDiscovery="false" value="rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.id.540792084" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.id" useByScannerDiscovery="false" value="1287942917" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.id.540792084" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.id" useByScannerDiscovery="false" value="1287942917" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.architecture.430121817" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.architecture" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.arch.none" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.architecture.430121817" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.architecture" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.arch.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.966735324" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.966735324" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.1381561249" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" useByScannerDiscovery="true" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.1381561249" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.target.other.2041717463" name="Other target flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.target.other" useByScannerDiscovery="true" value="" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.target.other.2041717463" name="Other target flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.target.other" useByScannerDiscovery="true" value="" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1463655269" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv4spd16" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1463655269" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1798638225" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/> <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1798638225" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/${ProjName}/Debug" cleanBuildTarget="clean2" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1736709688" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/> <builder buildPath="${workspace_loc:/${ProjName}/Debug" cleanBuildTarget="clean2" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1736709688" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool commandLinePattern="${COMMAND} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1810966071" name="GNU ARM Cross Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler"> <tool commandLinePattern="${COMMAND} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1810966071" name="GNU ARM Cross Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1072524326" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1072524326" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.161242639" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.161242639" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" useByScannerDiscovery="true"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1521934876" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1521934876" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" useByScannerDiscovery="true"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.flags.1325367962" name="Assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.flags" useByScannerDiscovery="false" valueType="stringList"> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.flags.1325367962" name="Assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.flags" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="-mimplicit-it=thumb"/> <listOptionValue builtIn="false" value="-mimplicit-it=thumb"/>
</option> </option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.647856572" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" useByScannerDiscovery="false" value="a_misc_flag" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.647856572" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" useByScannerDiscovery="false" value="a_misc_flag" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1843333483" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/> <inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1843333483" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool> </tool>
<tool commandLinePattern="${COMMAND} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1570350559" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler"> <tool commandLinePattern="${COMMAND} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1570350559" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.634882052" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.634882052" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.100549972" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.100549972" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.2133065240" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="c_misc_flag" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.2133065240" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="c_misc_flag" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files.714348818" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files.714348818" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.files" useByScannerDiscovery="true"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.992053063" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/> <inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.992053063" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool> </tool>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.869072473" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker"> <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.869072473" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1167322178" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1167322178" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart.351692886" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart.351692886" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostdlibs.1009243715" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostdlibs.1009243715" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nodeflibs.2016026082" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nodeflibs" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nodeflibs.2016026082" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nodeflibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.923990336" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.923990336" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option defaultValue="true" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.shared.548869459" name="Shared (-shared)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.shared" useByScannerDiscovery="false" valueType="boolean"/> <option defaultValue="true" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.shared.548869459" name="Shared (-shared)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.shared" useByScannerDiscovery="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.1818777301" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.1818777301" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs.1135656995" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs.1135656995" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths.36884122" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths.36884122" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.396049466" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" useByScannerDiscovery="false" value="c_link_misc_flag" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.396049466" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" useByScannerDiscovery="false" value="c_link_misc_flag" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.cref.1645737861" name="Cross reference (-Xlinker --cref)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.cref" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.cref.1645737861" name="Cross reference (-Xlinker --cref)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.cref" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.334732222" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input"> <inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.334732222" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType> </inputType>
</tool> </tool>
<tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1601059928" name="GNU ARM Cross C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker"> <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1601059928" name="GNU ARM Cross C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.437759352" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.437759352" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.1101974459" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.1101974459" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref.2007675975" name="Cross reference (-Xlinker --cref)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref.2007675975" name="Cross reference (-Xlinker --cref)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano.2105838438" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano.2105838438" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.934137837" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.934137837" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.2118356996" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.2118356996" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.1427884346" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.1427884346" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs.1433863653" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs.1433863653" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections.1387745410" name="Print removed sections (-Xlinker --print-gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections.1387745410" name="Print removed sections (-Xlinker --print-gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip.1230158061" name="Omit all symbol information (-s)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip.1230158061" name="Omit all symbol information (-s)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printmap.1307581821" name="Print link map (-Xlinker --print-map)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printmap" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printmap.1307581821" name="Print link map (-Xlinker --print-map)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printmap" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.useprintffloat.960778920" name="Use float with nano printf (-u _printf_float)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.useprintffloat" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.useprintffloat.960778920" name="Use float with nano printf (-u _printf_float)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.useprintffloat" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usescanffloat.637205035" name="Use float with nano scanf (-u _scanf_float)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usescanffloat" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usescanffloat.637205035" name="Use float with nano scanf (-u _scanf_float)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usescanffloat" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnosys.1948314201" name="Do not use syscalls (--specs=nosys.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnosys" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnosys.1948314201" name="Do not use syscalls (--specs=nosys.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnosys" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.verbose.273162112" name="Verbose (-v)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.verbose.273162112" name="Verbose (-v)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths.1399535143" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths.1399535143" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.882307902" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" useByScannerDiscovery="false" value="cpp_link_misc_flag" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.882307902" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" useByScannerDiscovery="false" value="cpp_link_misc_flag" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.262373798" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input"> <inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.262373798" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType> </inputType>
</tool> </tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.506412204" name="GNU ARM Cross Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/> <tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.506412204" name="GNU ARM Cross Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1461589245" name="GNU ARM Cross Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"> <tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1461589245" name="GNU ARM Cross Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.1937707052" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.binary" valueType="enumerated"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.1937707052" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.binary" valueType="enumerated"/>
</tool> </tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.82359725" name="GNU ARM Cross Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting"> <tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.82359725" name="GNU ARM Cross Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.601724476" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.601724476" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.692505279" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.692505279" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.97345172" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.97345172" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1342893377" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1342893377" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1533725981" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1533725981" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool> </tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.1073550295" name="GNU ARM Cross Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize"> <tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.1073550295" name="GNU ARM Cross Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.946451386" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format" useByScannerDiscovery="false"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.946451386" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format" useByScannerDiscovery="false"/>
</tool> </tool>
<tool commandLinePattern="${COMMAND} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1302177015" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler"> <tool commandLinePattern="${COMMAND} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1302177015" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.704468062" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.704468062" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.302877723" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.302877723" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.files.343249373" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.files" useByScannerDiscovery="true" valueType="includeFiles"> <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.files.343249373" name="Include files (-include)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.files" useByScannerDiscovery="true" valueType="includeFiles">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/rtconfig_preinc.h}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/rtconfig_preinc.h}&quot;"/>
</option> </option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other.465079095" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other" useByScannerDiscovery="true" value="cpp_misc_flag" valueType="string"/> <option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other.465079095" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other" useByScannerDiscovery="true" value="cpp_misc_flag" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.45918001" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/> <inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.45918001" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool> </tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>
<entry excluding="|" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> <entry excluding="|" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries> </sourceEntries>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration> </cconfiguration>
</storageModule> </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="qemu-vexpress-a9.ilg.gnuarmeclipse.managedbuild.cross.target.elf.860020518" name="Executable" projectType="ilg.gnuarmeclipse.managedbuild.cross.target.elf"/> <project id="qemu-vexpress-a9.ilg.gnuarmeclipse.managedbuild.cross.target.elf.860020518" name="Executable" projectType="ilg.gnuarmeclipse.managedbuild.cross.target.elf"/>
</storageModule> </storageModule>
<storageModule moduleId="scannerConfiguration"> <storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1570350559;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.992053063"> <scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.553091094.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1570350559;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.992053063">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2"> <storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug"> <configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/f429_tmp"/> <resource resourceType="PROJECT" workspacePath="/f429_tmp"/>
</configuration> </configuration>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"> <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
<doc-comment-owner id="org.eclipse.cdt.ui.doxygen"> <doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
<path value=""/> <path value=""/>
</doc-comment-owner> </doc-comment-owner>
</storageModule> </storageModule>
</cproject>""" </cproject>"""
project_temp = """<?xml version="1.0" encoding="UTF-8"?> project_temp = """<?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>__project_name_flag__</name> <name>__project_name_flag__</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers> <triggers>full,incremental,</triggers>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.eclipse.cdt.core.cnature</nature> <nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.rt-thread.studio.rttnature</nature> <nature>org.rt-thread.studio.rttnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures> </natures>
</projectDescription>""" </projectDescription>"""
projcfg_ini_temp = """#RT-Thread Studio Project Configuration projcfg_ini_temp = """#RT-Thread Studio Project Configuration
......
...@@ -62,19 +62,19 @@ lock = None ...@@ -62,19 +62,19 @@ lock = None
class CmdExecutor(threading.Thread): class CmdExecutor(threading.Thread):
def __init__(self, cmd, output): def __init__(self, cmd, output):
threading.Thread.__init__(self) threading.Thread.__init__(self)
self.cmd = cmd self.cmd = cmd
self.child = None self.child = None
def run(self): def run(self):
global executor, builder, lock global executor, builder, lock
if platform.system() == 'Windows': if platform.system() == 'Windows':
try: try:
from win32spawn import Win32Spawn from win32spawn import Win32Spawn
subprocess = Win32Spawn(self.cmd) subprocess = Win32Spawn(self.cmd)
subprocess.start_pipe() subprocess.start_pipe()
builder.progressbar.start() builder.progressbar.start()
while not subprocess.is_terminated or subprocess.qsize() > 0: while not subprocess.is_terminated or subprocess.qsize() > 0:
try: try:
...@@ -87,7 +87,7 @@ class CmdExecutor(threading.Thread): ...@@ -87,7 +87,7 @@ class CmdExecutor(threading.Thread):
lock.release() lock.release()
except: except:
pass pass
builder.progressbar.stop() builder.progressbar.stop()
except: except:
pass pass
...@@ -113,7 +113,7 @@ class DirSelectBox(ttk.Frame): ...@@ -113,7 +113,7 @@ class DirSelectBox(ttk.Frame):
self.entry = ttk.Entry(self, textvariable = self.dir_var) self.entry = ttk.Entry(self, textvariable = self.dir_var)
self.entry.pack(fill=BOTH, expand=1,side=LEFT) self.entry.pack(fill=BOTH, expand=1,side=LEFT)
self.entry.configure(width = 50) self.entry.configure(width = 50)
self.browser_button = ttk.Button(self, text="Browser", command=self.browser) self.browser_button = ttk.Button(self, text="Browser", command=self.browser)
self.browser_button.pack(side=RIGHT) self.browser_button.pack(side=RIGHT)
...@@ -125,7 +125,7 @@ class DirSelectBox(ttk.Frame): ...@@ -125,7 +125,7 @@ class DirSelectBox(ttk.Frame):
def set_path(self, path): def set_path(self, path):
path = path.replace('\\', '/') path = path.replace('\\', '/')
self.dir_var.set(path) self.dir_var.set(path)
def get_path(self): def get_path(self):
return self.dir_var.get() return self.dir_var.get()
...@@ -147,31 +147,31 @@ class SconsUI(): ...@@ -147,31 +147,31 @@ class SconsUI():
theme = style.theme_use() theme = style.theme_use()
default = style.lookup(theme, 'background') default = style.lookup(theme, 'background')
master.configure(background=default) master.configure(background=default)
notebook = ttk.Notebook(master) notebook = ttk.Notebook(master)
notebook.pack(fill=BOTH, padx=5, pady=5) notebook.pack(fill=BOTH, padx=5, pady=5)
# building page # building page
page_building = ttk.Frame(notebook) page_building = ttk.Frame(notebook)
notebook.add(page_building, padding=3) notebook.add(page_building, padding=3)
notebook.tab(0, text='Build', underline="-1") notebook.tab(0, text='Build', underline="-1")
self.setup_building_ui(page_building) self.setup_building_ui(page_building)
self.building_page = page_building self.building_page = page_building
# make project page # make project page
page_project = ttk.Frame(notebook) page_project = ttk.Frame(notebook)
notebook.add(page_project, padding = 3) notebook.add(page_project, padding = 3)
notebook.tab(1, text = 'Project', underline = '-1') notebook.tab(1, text = 'Project', underline = '-1')
self.setup_project_ui(page_project) self.setup_project_ui(page_project)
self.project_page = page_project self.project_page = page_project
# setting page # setting page
page_setting = ttk.Frame(notebook) page_setting = ttk.Frame(notebook)
notebook.add(page_setting, padding = 3) notebook.add(page_setting, padding = 3)
notebook.tab(2, text = 'Setting', underline = '-1') notebook.tab(2, text = 'Setting', underline = '-1')
self.setup_setting_ui(page_setting) self.setup_setting_ui(page_setting)
self.setting_page = page_setting self.setting_page = page_setting
padding = ttk.Frame(master) padding = ttk.Frame(master)
padding.pack(fill=X) padding.pack(fill=X)
quit = ttk.Button(padding, text='Quit', command = self.quit) quit = ttk.Button(padding, text='Quit', command = self.quit)
...@@ -179,15 +179,15 @@ class SconsUI(): ...@@ -179,15 +179,15 @@ class SconsUI():
# set notebook to self # set notebook to self
self.notebook = notebook self.notebook = notebook
# read setting # read setting
self.read_setting() self.read_setting()
self.is_makeing_project = False self.is_makeing_project = False
def read_setting(self): def read_setting(self):
import platform import platform
import os import os
home = '' home = ''
if platform.system() == 'Windows': if platform.system() == 'Windows':
driver = os.environ['HOMEDRIVE'] driver = os.environ['HOMEDRIVE']
...@@ -195,7 +195,7 @@ class SconsUI(): ...@@ -195,7 +195,7 @@ class SconsUI():
home = os.path.join(driver, home) home = os.path.join(driver, home)
else: else:
home = os.environ['HOME'] home = os.environ['HOME']
setting_path = os.path.join(home, '.rtt_scons') setting_path = os.path.join(home, '.rtt_scons')
if os.path.exists(setting_path): if os.path.exists(setting_path):
setting = open(os.path.join(home, '.rtt_scons')) setting = open(os.path.join(home, '.rtt_scons'))
...@@ -217,10 +217,10 @@ class SconsUI(): ...@@ -217,10 +217,10 @@ class SconsUI():
# set RT-Thread Root Directory according environ # set RT-Thread Root Directory according environ
if 'RTT_ROOT' in os.environ: if 'RTT_ROOT' in os.environ:
self.RTTRoot.set_path(os.environ['RTT_ROOT']) self.RTTRoot.set_path(os.environ['RTT_ROOT'])
if self.RTTRoot.get_path() == '': if self.RTTRoot.get_path() == '':
rtt_root = '' rtt_root = ''
# detect RT-Thread directory # detect RT-Thread directory
if os.path.exists(os.path.join('..', 'include', 'rtthread.h')): if os.path.exists(os.path.join('..', 'include', 'rtthread.h')):
rtt_root = os.path.join('..') rtt_root = os.path.join('..')
elif os.path.exists(os.path.join('..', '..', 'include', 'rtthread.h')): elif os.path.exists(os.path.join('..', '..', 'include', 'rtthread.h')):
...@@ -247,7 +247,7 @@ class SconsUI(): ...@@ -247,7 +247,7 @@ class SconsUI():
if not self.CompilersPath['GCC'].get_path(): if not self.CompilersPath['GCC'].get_path():
paths = os.environ['PATH'] paths = os.environ['PATH']
paths = paths.split(';') paths = paths.split(';')
for path in paths: for path in paths:
if path.find('CodeSourcery') != -1: if path.find('CodeSourcery') != -1:
self.CompilersPath['GCC'].set_path(path) self.CompilersPath['GCC'].set_path(path)
...@@ -269,7 +269,7 @@ class SconsUI(): ...@@ -269,7 +269,7 @@ class SconsUI():
home = os.environ['HOME'] home = os.environ['HOME']
setting = open(os.path.join(home, '.rtt_scons'), 'w+') setting = open(os.path.join(home, '.rtt_scons'), 'w+')
# current comiler # current comiler
# line = '%s=%s\n' % ('compiler', self.compilers.get())) # line = '%s=%s\n' % ('compiler', self.compilers.get()))
line = '%s=%s\n' % ('compiler', 'iar') line = '%s=%s\n' % ('compiler', 'iar')
setting.write(line) setting.write(line)
...@@ -296,17 +296,17 @@ class SconsUI(): ...@@ -296,17 +296,17 @@ class SconsUI():
def setup_building_ui(self, frame): def setup_building_ui(self, frame):
padding = ttk.Frame(frame) padding = ttk.Frame(frame)
padding.pack(fill=X) padding.pack(fill=X)
button = ttk.Button(padding, text='Clean', command=self.do_clean) button = ttk.Button(padding, text='Clean', command=self.do_clean)
button.pack(side=RIGHT) button.pack(side=RIGHT)
button = ttk.Button(padding, text='Build', command=self.do_build) button = ttk.Button(padding, text='Build', command=self.do_build)
button.pack(side=RIGHT) button.pack(side=RIGHT)
label = ttk.Label(padding, relief = 'flat', text = 'Click Build or Clean to build or clean system -->') label = ttk.Label(padding, relief = 'flat', text = 'Click Build or Clean to build or clean system -->')
label.pack(side=RIGHT, ipady = 5) label.pack(side=RIGHT, ipady = 5)
self.progressbar = ttk.Progressbar(frame) self.progressbar = ttk.Progressbar(frame)
self.progressbar.pack(fill=X) self.progressbar.pack(fill=X)
separator = ttk.Separator(frame) separator = ttk.Separator(frame)
separator.pack(fill=X) separator.pack(fill=X)
...@@ -316,17 +316,17 @@ class SconsUI(): ...@@ -316,17 +316,17 @@ class SconsUI():
def setup_project_ui(self, frame): def setup_project_ui(self, frame):
label = ttk.Label(frame, relief = 'flat', text = 'Choose Integrated Development Environment:') label = ttk.Label(frame, relief = 'flat', text = 'Choose Integrated Development Environment:')
label.pack(fill=X, pady = 5) label.pack(fill=X, pady = 5)
separator = ttk.Separator(frame) separator = ttk.Separator(frame)
separator.pack(fill=X) separator.pack(fill=X)
self.ide = StringVar() self.ide = StringVar()
self.ide.set("mdk4") # initialize self.ide.set("mdk4") # initialize
for text,mode in IDE: for text,mode in IDE:
radiobutton = ttk.Radiobutton(frame, text=text, variable = self.ide, value = mode) radiobutton = ttk.Radiobutton(frame, text=text, variable = self.ide, value = mode)
radiobutton.pack(fill=X, padx=10) radiobutton.pack(fill=X, padx=10)
bottom = ttk.Frame(frame) bottom = ttk.Frame(frame)
bottom.pack(side=BOTTOM, fill=X) bottom.pack(side=BOTTOM, fill=X)
button = ttk.Button(bottom, text="Make Project", command = self.do_make_project) button = ttk.Button(bottom, text="Make Project", command = self.do_make_project)
...@@ -336,26 +336,26 @@ class SconsUI(): ...@@ -336,26 +336,26 @@ class SconsUI():
row = 0 row = 0
label = ttk.Label (frame, relief = 'flat', text='RT-Thread Root Folder:') label = ttk.Label (frame, relief = 'flat', text='RT-Thread Root Folder:')
label.grid(row=row, column=0,ipadx=5, ipady=5, padx = 5) label.grid(row=row, column=0,ipadx=5, ipady=5, padx = 5)
self.RTTRoot = DirSelectBox(frame) self.RTTRoot = DirSelectBox(frame)
self.RTTRoot.grid(row=row, column=1, sticky=E+W) self.RTTRoot.grid(row=row, column=1, sticky=E+W)
row = row + 1 row = row + 1
label = ttk.Label (frame, relief = 'flat', text='Board Support Folder:') label = ttk.Label (frame, relief = 'flat', text='Board Support Folder:')
label.grid(row=row, column=0,ipadx=5, ipady=5, padx = 5) label.grid(row=row, column=0,ipadx=5, ipady=5, padx = 5)
self.BSPRoot = DirSelectBox(frame) self.BSPRoot = DirSelectBox(frame)
self.BSPRoot.grid(row=row, column=1, sticky=E+W) self.BSPRoot.grid(row=row, column=1, sticky=E+W)
row = row + 1 row = row + 1
label = ttk.Label (frame, relief='flat', text='Toolchain:') label = ttk.Label (frame, relief='flat', text='Toolchain:')
label.grid(row=row, column=0,ipadx=5, ipady=5, sticky=E+W) label.grid(row=row, column=0,ipadx=5, ipady=5, sticky=E+W)
row = row + 1 row = row + 1
separator = ttk.Separator(frame) separator = ttk.Separator(frame)
separator.grid(row = row, column = 0, columnspan = 2, sticky = E+W) separator.grid(row = row, column = 0, columnspan = 2, sticky = E+W)
row = row + 1 row = row + 1
self.compilers = StringVar() self.compilers = StringVar()
self.compilers.set("GCC") # initialize self.compilers.set("GCC") # initialize
...@@ -368,13 +368,13 @@ class SconsUI(): ...@@ -368,13 +368,13 @@ class SconsUI():
self.CompilersPath[compiler] = DirSelectBox(frame) self.CompilersPath[compiler] = DirSelectBox(frame)
self.CompilersPath[compiler].grid(row=row, column=1, sticky=E+W) self.CompilersPath[compiler].grid(row=row, column=1, sticky=E+W)
row = row + 1 row = row + 1
button = ttk.Button(frame, text='Save Setting', command = self.save_setting) button = ttk.Button(frame, text='Save Setting', command = self.save_setting)
button.grid(row = row, column = 1, sticky = E) button.grid(row = row, column = 1, sticky = E)
row = row + 1 row = row + 1
def prepare_build(self): def prepare_build(self):
# get compiler # get compiler
compiler = self.compilers.get() compiler = self.compilers.get()
if compiler == 'GCC': if compiler == 'GCC':
compiler = 'gcc' compiler = 'gcc'
...@@ -385,26 +385,26 @@ class SconsUI(): ...@@ -385,26 +385,26 @@ class SconsUI():
# get RTT Root # get RTT Root
rtt_root = self.RTTRoot.get_path() rtt_root = self.RTTRoot.get_path()
# get Compiler path # get Compiler path
exec_path = self.CompilersPath[self.compilers.get()].get_path() exec_path = self.CompilersPath[self.compilers.get()].get_path()
command = '' command = ''
os.environ['RTT_ROOT'] = rtt_root os.environ['RTT_ROOT'] = rtt_root
os.environ['RTT_CC'] = compiler os.environ['RTT_CC'] = compiler
os.environ['RTT_EXEC_PATH'] = exec_path os.environ['RTT_EXEC_PATH'] = exec_path
return command return command
def check_path(self): def check_path(self):
result = True result = True
if self.BSPRoot.get_path() == '': if self.BSPRoot.get_path() == '':
result = False result = False
if self.RTTRoot.get_path() == '': if self.RTTRoot.get_path() == '':
result = False result = False
if not result: if not result:
tkMessageBox.showinfo("RT-Thread SCons UI", tkMessageBox.showinfo("RT-Thread SCons UI",
"Folder is empty, please choose correct directory.") "Folder is empty, please choose correct directory.")
...@@ -423,8 +423,8 @@ class SconsUI(): ...@@ -423,8 +423,8 @@ class SconsUI():
self.output.delete(1.0, END) self.output.delete(1.0, END)
self.output.insert(END, 'building project...\n') self.output.insert(END, 'building project...\n')
ExecCmd(command) ExecCmd(command)
def do_clean(self): def do_clean(self):
self.prepare_build() self.prepare_build()
command = 'scons -c' command = 'scons -c'
...@@ -438,18 +438,18 @@ class SconsUI(): ...@@ -438,18 +438,18 @@ class SconsUI():
self.output.delete(1.0, END) self.output.delete(1.0, END)
self.output.insert(END, 'clean project...\n') self.output.insert(END, 'clean project...\n')
ExecCmd(command) ExecCmd(command)
def do_make_project(self): def do_make_project(self):
ide = self.ide.get() ide = self.ide.get()
self.prepare_build() self.prepare_build()
command = 'scons --target=%s -s' % ide command = 'scons --target=%s -s' % ide
if not self.check_path(): if not self.check_path():
return return
# select build page # select build page
self.notebook.select(self.building_page) self.notebook.select(self.building_page)
bsp = self.BSPRoot.get_path() bsp = self.BSPRoot.get_path()
os.chdir(bsp) os.chdir(bsp)
......
...@@ -37,7 +37,7 @@ def SESProject(env) : ...@@ -37,7 +37,7 @@ def SESProject(env) :
project = ProjectInfo(env) project = ProjectInfo(env)
# print(project) # print(project)
# return # return
project_path = os.path.abspath(env['BSP_ROOT']) project_path = os.path.abspath(env['BSP_ROOT'])
script = env['project'] script = env['project']
...@@ -64,7 +64,7 @@ def SESProject(env) : ...@@ -64,7 +64,7 @@ def SESProject(env) :
CFLAGS += ' ' + group['CFLAGS'] CFLAGS += ' ' + group['CFLAGS']
else: else:
CFLAGS += group['CFLAGS'] CFLAGS += group['CFLAGS']
# get each group's link flags # get each group's link flags
if 'LINKFLAGS' in group and group['LINKFLAGS']: if 'LINKFLAGS' in group and group['LINKFLAGS']:
if LINKFLAGS: if LINKFLAGS:
......
...@@ -36,7 +36,7 @@ def PrefixPath(prefix, path): ...@@ -36,7 +36,7 @@ def PrefixPath(prefix, path):
if path.startswith(prefix): if path.startswith(prefix):
return True return True
return False return False
def PrepareUA(project, RTT_ROOT, BSP_ROOT): def PrepareUA(project, RTT_ROOT, BSP_ROOT):
...@@ -44,9 +44,9 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT): ...@@ -44,9 +44,9 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
# ua.write('import os\n') # ua.write('import os\n')
# ua.write('import sys\n') # ua.write('import sys\n')
ua.write('\n') ua.write('\n')
print(RTT_ROOT) print(RTT_ROOT)
CPPPATH = [] CPPPATH = []
CPPDEFINES = [] CPPDEFINES = []
...@@ -60,7 +60,7 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT): ...@@ -60,7 +60,7 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
CPPDEFINES += group['CPPDEFINES'] CPPDEFINES += group['CPPDEFINES']
if len(CPPPATH): if len(CPPPATH):
# use absolute path # use absolute path
for i in range(len(CPPPATH)): for i in range(len(CPPPATH)):
CPPPATH[i] = os.path.abspath(CPPPATH[i]) CPPPATH[i] = os.path.abspath(CPPPATH[i])
...@@ -70,7 +70,7 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT): ...@@ -70,7 +70,7 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
for path in paths: for path in paths:
if PrefixPath(RTT_ROOT, path): if PrefixPath(RTT_ROOT, path):
CPPPATH += ['RTT_ROOT + "/%s",' % _make_path_relative(RTT_ROOT, path).replace('\\', '/')] CPPPATH += ['RTT_ROOT + "/%s",' % _make_path_relative(RTT_ROOT, path).replace('\\', '/')]
elif PrefixPath(BSP_ROOT, path): elif PrefixPath(BSP_ROOT, path):
CPPPATH += ['BSP_ROOT + "/%s",' % _make_path_relative(BSP_ROOT, path).replace('\\', '/')] CPPPATH += ['BSP_ROOT + "/%s",' % _make_path_relative(BSP_ROOT, path).replace('\\', '/')]
else: else:
......
...@@ -139,7 +139,7 @@ def PrefixPath(prefix, path): ...@@ -139,7 +139,7 @@ def PrefixPath(prefix, path):
if path.startswith(prefix): if path.startswith(prefix):
return True return True
return False return False
def ListMap(l): def ListMap(l):
...@@ -197,7 +197,7 @@ def ProjectInfo(env): ...@@ -197,7 +197,7 @@ def ProjectInfo(env):
# process FILES and DIRS # process FILES and DIRS
if len(FILES): if len(FILES):
# use absolute path # use absolute path
for i in range(len(FILES)): for i in range(len(FILES)):
FILES[i] = os.path.abspath(str(FILES[i])) FILES[i] = os.path.abspath(str(FILES[i]))
DIRS.append(os.path.dirname(FILES[i])) DIRS.append(os.path.dirname(FILES[i]))
...@@ -211,7 +211,7 @@ def ProjectInfo(env): ...@@ -211,7 +211,7 @@ def ProjectInfo(env):
# process CPPPATH # process CPPPATH
if len(CPPPATH): if len(CPPPATH):
# use absolute path # use absolute path
for i in range(len(CPPPATH)): for i in range(len(CPPPATH)):
CPPPATH[i] = os.path.abspath(CPPPATH[i]) CPPPATH[i] = os.path.abspath(CPPPATH[i])
......
...@@ -70,10 +70,10 @@ def VS_AddHeadFilesGroup(program, elem, project_path): ...@@ -70,10 +70,10 @@ def VS_AddHeadFilesGroup(program, elem, project_path):
utils.source_ext = [] utils.source_ext = []
utils.source_ext = ["h"] utils.source_ext = ["h"]
for item in program: for item in program:
utils.walk_children(item) utils.walk_children(item)
utils.source_list.sort() utils.source_list.sort()
# print utils.source_list # print utils.source_list
for f in utils.source_list: for f in utils.source_list:
path = _make_path_relative(project_path, f) path = _make_path_relative(project_path, f)
File = SubElement(elem, 'File') File = SubElement(elem, 'File')
...@@ -85,15 +85,15 @@ def VS_AddHeadFilesGroup(program, elem, project_path): ...@@ -85,15 +85,15 @@ def VS_AddHeadFilesGroup(program, elem, project_path):
def VSProject(target, script, program): def VSProject(target, script, program):
project_path = os.path.dirname(os.path.abspath(target)) project_path = os.path.dirname(os.path.abspath(target))
tree = etree.parse('template_vs2005.vcproj') tree = etree.parse('template_vs2005.vcproj')
root = tree.getroot() root = tree.getroot()
out = open(target, 'w') out = open(target, 'w')
out.write('<?xml version="1.0" encoding="UTF-8"?>\r\n') out.write('<?xml version="1.0" encoding="UTF-8"?>\r\n')
ProjectFiles = [] ProjectFiles = []
# add "*.c" files group # add "*.c" files group
for elem in tree.iter(tag='Filter'): for elem in tree.iter(tag='Filter'):
if elem.attrib['Name'] == 'Source Files': if elem.attrib['Name'] == 'Source Files':
...@@ -120,7 +120,7 @@ def VSProject(target, script, program): ...@@ -120,7 +120,7 @@ def VSProject(target, script, program):
if elem.attrib['Name'] == 'Header Files': if elem.attrib['Name'] == 'Header Files':
break break
VS_AddHeadFilesGroup(program, elem, project_path) VS_AddHeadFilesGroup(program, elem, project_path)
# write head include path # write head include path
if 'CPPPATH' in building.Env: if 'CPPPATH' in building.Env:
cpp_path = building.Env['CPPPATH'] cpp_path = building.Env['CPPPATH']
...@@ -128,7 +128,7 @@ def VSProject(target, script, program): ...@@ -128,7 +128,7 @@ def VSProject(target, script, program):
for path in cpp_path: for path in cpp_path:
inc = _make_path_relative(project_path, os.path.normpath(path)) inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/') paths.add(inc) #.replace('\\', '/')
paths = [i for i in paths] paths = [i for i in paths]
paths.sort() paths.sort()
cpp_path = ';'.join(paths) cpp_path = ';'.join(paths)
...@@ -153,7 +153,7 @@ def VSProject(target, script, program): ...@@ -153,7 +153,7 @@ def VSProject(target, script, program):
elem.set('PreprocessorDefinitions', definitions) elem.set('PreprocessorDefinitions', definitions)
# write link flags # write link flags
# write lib dependence # write lib dependence
if 'LIBS' in building.Env: if 'LIBS' in building.Env:
for elem in tree.iter(tag='Tool'): for elem in tree.iter(tag='Tool'):
if elem.attrib['Name'] == 'VCLinkerTool': if elem.attrib['Name'] == 'VCLinkerTool':
......
...@@ -49,7 +49,7 @@ def get_uuid(): ...@@ -49,7 +49,7 @@ def get_uuid():
else: else:
# python3 is no decode function # python3 is no decode function
idstr = id.get_urn()[9:] #'urn:uuid:3e5526c0-2841-11e3-a376-20cf3048bcb3'[9:] idstr = id.get_urn()[9:] #'urn:uuid:3e5526c0-2841-11e3-a376-20cf3048bcb3'[9:]
return '{'+idstr+'}' return '{'+idstr+'}'
def VS2012_AddGroup(parent, group_name, files, project_path): def VS2012_AddGroup(parent, group_name, files, project_path):
...@@ -144,7 +144,7 @@ def VS_add_HeadFiles(program, elem, project_path): ...@@ -144,7 +144,7 @@ def VS_add_HeadFiles(program, elem, project_path):
utils.source_ext = [] utils.source_ext = []
utils.source_ext = ["h"] utils.source_ext = ["h"]
for item in program: for item in program:
utils.walk_children(item) utils.walk_children(item)
utils.source_list.sort() utils.source_list.sort()
# print utils.source_list # print utils.source_list
ItemGroup = SubElement(elem, 'ItemGroup') ItemGroup = SubElement(elem, 'ItemGroup')
...@@ -174,7 +174,7 @@ def VS_add_HeadFiles(program, elem, project_path): ...@@ -174,7 +174,7 @@ def VS_add_HeadFiles(program, elem, project_path):
def VS2012Project(target, script, program): def VS2012Project(target, script, program):
project_path = os.path.dirname(os.path.abspath(target)) project_path = os.path.dirname(os.path.abspath(target))
tree = etree.parse('template_vs2012.vcxproj') tree = etree.parse('template_vs2012.vcxproj')
root = tree.getroot() root = tree.getroot()
elem = root elem = root
...@@ -201,7 +201,7 @@ def VS2012Project(target, script, program): ...@@ -201,7 +201,7 @@ def VS2012Project(target, script, program):
for path in cpp_path: for path in cpp_path:
inc = _make_path_relative(project_path, os.path.normpath(path)) inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/') paths.add(inc) #.replace('\\', '/')
paths = [i for i in paths] paths = [i for i in paths]
paths.sort() paths.sort()
cpp_path = ';'.join(paths) + ';%(AdditionalIncludeDirectories)' cpp_path = ';'.join(paths) + ';%(AdditionalIncludeDirectories)'
...@@ -243,7 +243,7 @@ def VS2012Project(target, script, program): ...@@ -243,7 +243,7 @@ def VS2012Project(target, script, program):
for path in lib_path: for path in lib_path:
inc = _make_path_relative(project_path, os.path.normpath(path)) inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) paths.add(inc)
paths = [i for i in paths] paths = [i for i in paths]
paths.sort() paths.sort()
lib_paths = ';'.join(paths) + ';%(AdditionalLibraryDirectories)' lib_paths = ';'.join(paths) + ';%(AdditionalLibraryDirectories)'
......
...@@ -32,7 +32,7 @@ if _PY2: ...@@ -32,7 +32,7 @@ if _PY2:
else: else:
import queue as Queue import queue as Queue
# Windows import # Windows import
import win32file import win32file
import win32pipe import win32pipe
import win32api import win32api
...@@ -46,11 +46,11 @@ class Win32Spawn(object): ...@@ -46,11 +46,11 @@ class Win32Spawn(object):
self.queue = Queue.Queue() self.queue = Queue.Queue()
self.is_terminated = False self.is_terminated = False
self.wake_up_event = win32event.CreateEvent(None, 0, 0, None) self.wake_up_event = win32event.CreateEvent(None, 0, 0, None)
exec_dir = os.getcwd() exec_dir = os.getcwd()
comspec = os.environ.get("COMSPEC", "cmd.exe") comspec = os.environ.get("COMSPEC", "cmd.exe")
cmd = comspec + ' /c ' + cmd cmd = comspec + ' /c ' + cmd
win32event.ResetEvent(self.wake_up_event) win32event.ResetEvent(self.wake_up_event)
currproc = win32api.GetCurrentProcess() currproc = win32api.GetCurrentProcess()
...@@ -83,7 +83,7 @@ class Win32Spawn(object): ...@@ -83,7 +83,7 @@ class Win32Spawn(object):
self.h_process, h_thread, dw_pid, dw_tid = win32process.CreateProcess(None, cmd, None, None, 1, self.h_process, h_thread, dw_pid, dw_tid = win32process.CreateProcess(None, cmd, None, None, 1,
cr_flags, env, os.path.abspath(exec_dir), cr_flags, env, os.path.abspath(exec_dir),
startup_info) startup_info)
win32api.CloseHandle(h_thread) win32api.CloseHandle(h_thread)
win32file.CloseHandle(child_stdin_rd) win32file.CloseHandle(child_stdin_rd)
...@@ -115,7 +115,7 @@ class Win32Spawn(object): ...@@ -115,7 +115,7 @@ class Win32Spawn(object):
else: else:
# The wake_up_event must have been signalled # The wake_up_event must have been signalled
return False return False
def get(self, block=True, timeout=None): def get(self, block=True, timeout=None):
return self.queue.get(block=block, timeout=timeout) return self.queue.get(block=block, timeout=timeout)
...@@ -158,7 +158,7 @@ class Win32Spawn(object): ...@@ -158,7 +158,7 @@ class Win32Spawn(object):
result = self.exit_code == 0 result = self.exit_code == 0
self.close() self.close()
self.is_terminated = True self.is_terminated = True
return result return result
# This method gets called on a worker thread to read from either a stderr # This method gets called on a worker thread to read from either a stderr
...@@ -180,6 +180,6 @@ class Win32Spawn(object): ...@@ -180,6 +180,6 @@ class Win32Spawn(object):
def start_pipe(self): def start_pipe(self):
def worker(pipe): def worker(pipe):
return pipe.wait() return pipe.wait()
thrd = threading.Thread(target=worker, args=(self, )) thrd = threading.Thread(target=worker, args=(self, ))
thrd.start() thrd.start()
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
# #
""" """
wizard.py - a script to generate SConscript in RT-Thread RTOS. wizard.py - a script to generate SConscript in RT-Thread RTOS.
`wizard --component name' to generate SConscript for name component. `wizard --component name' to generate SConscript for name component.
`wizard --bridge' to generate SConscript as a bridge to connect each `wizard --bridge' to generate SConscript as a bridge to connect each
SConscript script file of sub-directory. SConscript script file of sub-directory.
""" """
import sys import sys
...@@ -86,7 +86,7 @@ if __name__ == '__main__': ...@@ -86,7 +86,7 @@ if __name__ == '__main__':
if len(sys.argv) == 1: if len(sys.argv) == 1:
usage() usage()
sys.exit(2) sys.exit(2)
if sys.argv[1] == '--component': if sys.argv[1] == '--component':
gen_component(sys.argv[2]) gen_component(sys.argv[2])
elif sys.argv[1] == '--bridge': elif sys.argv[1] == '--bridge':
......
...@@ -71,8 +71,8 @@ class XmakeProject: ...@@ -71,8 +71,8 @@ class XmakeProject:
with open(template_path, "r") as f: with open(template_path, "r") as f:
data = f.read() data = f.read()
data = Template(data) data = Template(data)
data = data.safe_substitute(toolchain=self.toolchain, sdkdir=self.sdkdir, src_path=self.src_path, inc_path=self.inc_path, data = data.safe_substitute(toolchain=self.toolchain, sdkdir=self.sdkdir, src_path=self.src_path, inc_path=self.inc_path,
define=self.define, cflags=self.cflags, cxxflags=self.cxxflags, asflags=self.asflags, define=self.define, cflags=self.cflags, cxxflags=self.cxxflags, asflags=self.asflags,
ldflags=self.ldflags, target="rt-thread") ldflags=self.ldflags, target="rt-thread")
with open("xmake.lua", "w") as f: with open("xmake.lua", "w") as f:
f.write(data) f.write(data)
...@@ -88,4 +88,4 @@ def XMakeProject(env,project): ...@@ -88,4 +88,4 @@ def XMakeProject(env,project):
print('Done!') print('Done!')
return return
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册