Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: export/cdt/__init__.py
- Revision:
- 35:da9c89f8be7d
- Parent:
- 31:8ea194f6145b
- Child:
- 40:7d3fa6b99b2b
--- a/export/cdt/__init__.py Mon Feb 13 09:29:13 2017 -0600
+++ b/export/cdt/__init__.py Wed Feb 15 13:53:18 2017 -0600
@@ -1,3 +1,5 @@
+import re
+
from os.path import join, exists, realpath, relpath, basename
from os import makedirs
@@ -12,13 +14,14 @@
py_ocd_settings launch file, and software link .p2f file
"""
super(Eclipse, self).generate()
+ starting_dot = re.compile(r'(^[.]/|^[.]$)')
ctx = {
'name': self.project_name,
'elf_location': join('BUILD',self.project_name)+'.elf',
'c_symbols': self.toolchain.get_symbols(),
'asm_symbols': self.toolchain.get_symbols(True),
'target': self.target,
- 'include_paths': self.resources.inc_dirs,
+ 'include_paths': [starting_dot.sub('%s/' % self.project_name, inc) for inc in self.resources.inc_dirs],
'load_exe': str(self.LOAD_EXE).lower()
}
