Skip to content

Commit 613b92a

Browse files
authored
Merge pull request #3531 from bittailor/fix-include-paths-for-eclipse-export
Correctly format include paths for eclipse export
2 parents 7b83e0f + 75a61df commit 613b92a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/export/cdt/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import re
2+
13
from os.path import join, exists, realpath, relpath, basename
24
from os import makedirs
35

@@ -12,13 +14,14 @@ def generate(self):
1214
py_ocd_settings launch file, and software link .p2f file
1315
"""
1416
super(Eclipse, self).generate()
17+
starting_dot = re.compile(r'(^[.]/|^[.]$)')
1518
ctx = {
1619
'name': self.project_name,
1720
'elf_location': join('BUILD',self.project_name)+'.elf',
1821
'c_symbols': self.toolchain.get_symbols(),
1922
'asm_symbols': self.toolchain.get_symbols(True),
2023
'target': self.target,
21-
'include_paths': self.resources.inc_dirs,
24+
'include_paths': [starting_dot.sub('%s/' % self.project_name, inc) for inc in self.resources.inc_dirs],
2225
'load_exe': str(self.LOAD_EXE).lower()
2326
}
2427

0 commit comments

Comments
 (0)