Skip to content

Tools/project - project dir should be the list #1912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tools/export/uvision4.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from tools.export.exporters import Exporter
from tools.targets import TARGET_MAP, TARGET_NAMES
from tools.settings import ARM_INC

# If you wish to add a new target, add it to project_generator_definitions, and then
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)
Expand Down Expand Up @@ -67,11 +68,14 @@ def generate(self):

# get flags from toolchain and apply
project_data['tool_specific']['uvision']['misc'] = {}
project_data['tool_specific']['uvision']['misc']['asm_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['asm']))
project_data['tool_specific']['uvision']['misc']['c_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['c']))
# asm flags only, common are not valid within uvision project, they are armcc specific
project_data['tool_specific']['uvision']['misc']['asm_flags'] = list(set(self.toolchain.flags['asm']))
# cxx flags included, as uvision have them all in one tab
project_data['tool_specific']['uvision']['misc']['c_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['c'] + self.toolchain.flags['cxx']))
# not compatible with c99 flag set in the template
project_data['tool_specific']['uvision']['misc']['c_flags'].remove("--c99")
project_data['tool_specific']['uvision']['misc']['cxx_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['ld']))
# ARM_INC is by default as system inclusion, not required for exported project
project_data['tool_specific']['uvision']['misc']['c_flags'].remove("-I \""+ARM_INC+"\"")
project_data['tool_specific']['uvision']['misc']['ld_flags'] = self.toolchain.flags['ld']

i = 0
Expand Down
7 changes: 4 additions & 3 deletions tools/export/uvision5.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ def generate(self):

# get flags from toolchain and apply
project_data['tool_specific']['uvision5']['misc'] = {}
project_data['tool_specific']['uvision5']['misc']['asm_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['asm']))
project_data['tool_specific']['uvision5']['misc']['c_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['c']))
# asm flags only, common are not valid within uvision project, they are armcc specific
project_data['tool_specific']['uvision5']['misc']['asm_flags'] = list(set(self.toolchain.flags['asm']))
# cxx flags included, as uvision have them all in one tab
project_data['tool_specific']['uvision5']['misc']['c_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['c'] + self.toolchain.flags['cxx']))
# not compatible with c99 flag set in the template
project_data['tool_specific']['uvision5']['misc']['c_flags'].remove("--c99")
project_data['tool_specific']['uvision5']['misc']['cxx_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['ld']))
project_data['tool_specific']['uvision5']['misc']['ld_flags'] = self.toolchain.flags['ld']

i = 0
Expand Down
6 changes: 3 additions & 3 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@

# Build the project with the same directory structure of the mbed online IDE
project_name = test.id
project_dir = join(EXPORT_WORKSPACE, project_name)
project_dir = [join(EXPORT_WORKSPACE, project_name)]
project_temp = EXPORT_TMP
setup_user_prj(project_dir, test.source_dir, test.dependencies)
setup_user_prj(project_dir[0], test.source_dir, test.dependencies)

# Export to selected toolchain
tmp_path, report = export(project_dir, project_name, ide, mcu, project_dir, project_temp, clean=clean, zip=zip, extra_symbols=lib_symbols, relative=sources_relative)
tmp_path, report = export(project_dir, project_name, ide, mcu, project_dir[0], project_temp, clean=clean, zip=zip, extra_symbols=lib_symbols, relative=sources_relative)
if report['success']:
zip_path = join(EXPORT_DIR, "%s_%s_%s.zip" % (project_name, ide, mcu))
if zip:
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ARM(mbedToolchain):
DEFAULT_FLAGS = {
'common': ["-c", "--gnu",
"-Otime", "--split_sections", "--apcs=interwork",
"--brief_diagnostics", "--restrict", "--multibyte_chars", "-I", "\""+ARM_INC+"\""],
"--brief_diagnostics", "--restrict", "--multibyte_chars", "-I \""+ARM_INC+"\""],
'asm': [],
'c': ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
'cxx': ["--cpp", "--no_rtti"],
Expand Down