Skip to content

Commit 7247150

Browse files
committed
uvision - flags consolidation
Remove error for include system path in the exporters. Assembly does not use armcc flags, fails to build, as those are not valid armasm.
1 parent dbc940b commit 7247150

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tools/export/uvision4.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
from tools.export.exporters import Exporter
2121
from tools.targets import TARGET_MAP, TARGET_NAMES
22+
from tools.settings import ARM_INC
2223

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

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

7781
i = 0

tools/export/uvision5.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def generate(self):
6767

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

0 commit comments

Comments
 (0)