Fix some tracebacks, add zip exporter to the CLI

pull/2245/head
Jimmy Brisson 2016-08-23 17:28:07 -05:00
parent cadd233b8e
commit c550f9da75
4 changed files with 8 additions and 6 deletions

View File

@ -42,6 +42,7 @@ EXPORTERS = {
'atmelstudio' : atmelstudio.AtmelStudio,
'sw4stm32' : sw4stm32.Sw4STM32,
'e2studio' : e2studio.E2Studio,
'zip' : zip.ZIP,
}
ERROR_MESSAGE_UNSUPPORTED_TOOLCHAIN = """

View File

@ -80,9 +80,9 @@ class Uvision4(Exporter):
project_data['misc']['asm_flags'] = [asm_flag_string]
# cxx flags included, as uvision have them all in one tab
project_data['misc']['c_flags'] = list(set(['-D__ASSERT_MSG']
+ self.progen_flags['common_flags']
+ self.progen_flags['c_flags']
+ self.progen_flags['cxx_flags']))
+ self.flags['common_flags']
+ self.flags['c_flags']
+ self.flags['cxx_flags']))
# not compatible with c99 flag set in the template
project_data['misc']['c_flags'].remove("--c99")
# cpp is not required as it's implicit for cpp files

View File

@ -79,9 +79,9 @@ class Uvision5(Exporter):
project_data['misc']['asm_flags'] = [asm_flag_string]
# cxx flags included, as uvision have them all in one tab
project_data['misc']['c_flags'] = list(set(['-D__ASSERT_MSG']
+ self.progen_flags['common_flags']
+ self.progen_flags['c_flags']
+ self.progen_flags['cxx_flags']))
+ self.flags['common_flags']
+ self.flags['c_flags']
+ self.flags['cxx_flags']))
# not compatible with c99 flag set in the template
project_data['misc']['c_flags'].remove("--c99")
# cpp is not required as it's implicit for cpp files

View File

@ -256,6 +256,7 @@ def export_project(src_paths, export_path, target, ide,
files, exporter = generate_project_files(resources, export_path,
target, name, toolchain, ide,
macros=macros)
files.append(config_header)
if zip_proj:
if isinstance(zip_proj, basestring):
zip_export(join(export_path, zip_proj), name, resource_dict, files)