summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/iar.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/iar.py b/tools/iar.py
index 040020aa6c..40b8408971 100644
--- a/tools/iar.py
+++ b/tools/iar.py
@@ -37,7 +37,10 @@ def IARAddGroup(parent, name, files, project_path):
file = SubElement(group, 'file')
file_name = SubElement(file, 'name')
- file_name.text = ('$PROJ_DIR$\\' + path).decode(fs_encoding)
+ if os.path.isabs(path):
+ file_name.text = path.decode(fs_encoding)
+ else:
+ file_name.text = ('$PROJ_DIR$\\' + path).decode(fs_encoding)
def IARWorkspace(target):
# make an workspace
@@ -91,7 +94,11 @@ def IARProject(target, script):
if name.text == 'CCIncludePath2' or name.text == 'newCCIncludePaths':
for path in paths:
state = SubElement(option, 'state')
- state.text = '$PROJ_DIR$\\' + path
+ if os.path.isabs(path):
+ state.text = path
+ else:
+ state.text = '$PROJ_DIR$\\' + path
+
if name.text == 'CCDefines':
for define in CPPDEFINES:
state = SubElement(option, 'state')