diff --git a/tools/export/makefile/__init__.py b/tools/export/makefile/__init__.py
index 683ecd08fa..3002b66a79 100644
--- a/tools/export/makefile/__init__.py
+++ b/tools/export/makefile/__init__.py
@@ -124,6 +124,10 @@ class Makefile(Exporter):
'to_be_compiled']:
ctx[key] = sorted(ctx[key])
ctx.update(self.format_flags())
+ # Add the virtual path the the include option in the ASM flags
+ for index, flag in enumerate(ctx['asm_flags']):
+ if flag.startswith('-I'):
+ ctx['asm_flags'][index] = "-I" + ctx['vpath'][0] + "/" + ctx['asm_flags'][index][2:]
for templatefile in \
['makefile/%s_%s.tmpl' % (self.TEMPLATE,
diff --git a/tools/export/uvision/uvision.tmpl b/tools/export/uvision/uvision.tmpl
index f49c79659d..49c708c3bb 100644
--- a/tools/export/uvision/uvision.tmpl
+++ b/tools/export/uvision/uvision.tmpl
@@ -394,7 +394,7 @@
{{asm_flags}}
-
+ {{include_paths}}