Skip to content

Commit c44dba3

Browse files
committed
Minimize include path size in uvision export
1 parent b60729d commit c44dba3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/export/uvision/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def format_flags(self):
178178
template = ["--no_vla", "--cpp", "--c99"]
179179
# Flag is invalid if set in template
180180
# Optimizations are also set in the template
181-
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
181+
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
182182
flags['c_flags'] = [flag.replace('"','\\"') for flag in c_flags if not invalid_flag(flag)]
183183
flags['c_flags'] = " ".join(flags['c_flags'])
184184
flags['ld_flags'] = " ".join(flags['ld_flags'])
@@ -215,7 +215,8 @@ def generate(self):
215215
# UVFile tuples defined above
216216
'project_files': sorted(list(self.format_src(srcs).items()),
217217
key=lambda tuple: tuple[0].lower()),
218-
'include_paths': '; '.join(self.resources.inc_dirs).encode('utf-8'),
218+
'include_paths': ';'.join(self.filter_dot(d) for d in
219+
self.resources.inc_dirs).encode('utf-8'),
219220
'device': DeviceUvision(self.target),
220221
}
221222
sct_file = self.resources.linker_script

0 commit comments

Comments
 (0)