Skip to content

Commit a62f89d

Browse files
committed
Correct uvision template to correctly pass include paths
1 parent 8db0fa9 commit a62f89d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tools/export/uvision/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ def format_flags(self):
167167
"""Format toolchain flags for Uvision"""
168168
flags = copy.deepcopy(self.flags)
169169
# to be preprocessed with armcc
170-
asm_flag_string = '--cpreproc --cpreproc_opts=-D__ASSERT_MSG,' + \
171-
",".join(flags['asm_flags'])
170+
asm_flag_string = (
171+
'--cpreproc --cpreproc_opts=-D__ASSERT_MSG,' +
172+
",".join(filter(lambda f: f.startswith("-D"), flags['asm_flags'])))
172173
flags['asm_flags'] = asm_flag_string
173174
# All non-asm flags are in one template field
174175
c_flags = list(set(flags['c_flags'] + flags['cxx_flags'] +flags['common_flags']))

tools/export/uvision/uvision.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@
394394
<MiscControls>{{asm_flags}}</MiscControls>
395395
<Define></Define>
396396
<Undefine></Undefine>
397-
<IncludePath></IncludePath>
397+
<IncludePath>{{include_paths}}</IncludePath>
398398
</VariousControls>
399399
</Aads>
400400
<LDads>

0 commit comments

Comments
 (0)