diff --git a/workspace_tools/export/__init__.py b/workspace_tools/export/__init__.py
index dd2d0756f5..ff84ace69d 100755
--- a/workspace_tools/export/__init__.py
+++ b/workspace_tools/export/__init__.py
@@ -20,7 +20,7 @@ from shutil import copytree, rmtree, copy
import yaml
from workspace_tools.utils import mkdir
-from workspace_tools.export import uvision4, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio, sw4stm32
+from workspace_tools.export import uvision4, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio, sw4stm32, e2studio
from workspace_tools.export.exporters import zip_working_directory_and_clean_up, OldLibrariesException
from workspace_tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP
@@ -38,6 +38,7 @@ EXPORTERS = {
'simplicityv3' : simplicityv3.SimplicityV3,
'atmelstudio' : atmelstudio.AtmelStudio,
'sw4stm32' : sw4stm32.Sw4STM32,
+ 'e2studio' : e2studio.E2Studio,
}
ERROR_MESSAGE_UNSUPPORTED_TOOLCHAIN = """
diff --git a/workspace_tools/export/e2studio.py b/workspace_tools/export/e2studio.py
new file mode 100644
index 0000000000..66cd9dec9b
--- /dev/null
+++ b/workspace_tools/export/e2studio.py
@@ -0,0 +1,47 @@
+"""
+mbed SDK
+Copyright (c) 2011-2013 ARM Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+from exporters import Exporter
+from os.path import splitext, basename
+
+
+class E2Studio(Exporter):
+ NAME = 'e2 studio'
+ TOOLCHAIN = 'GCC_ARM'
+
+ TARGETS = [
+ 'RZ_A1H',
+ ]
+
+ def generate(self):
+ libraries = []
+ for lib in self.resources.libraries:
+ l, _ = splitext(basename(lib))
+ libraries.append(l[3:])
+
+ ctx = {
+ 'name': self.program_name,
+ 'include_paths': self.resources.inc_dirs,
+ 'linker_script': self.resources.linker_script,
+
+ 'object_files': self.resources.objects,
+ 'libraries': libraries,
+ 'symbols': self.get_symbols()
+ }
+ self.gen_file('e2studio_%s_project.tmpl' % self.target.lower(), ctx, '.project')
+ self.gen_file('e2studio_%s_cproject.tmpl' % self.target.lower(), ctx, '.cproject')
+ self.gen_file('e2studio_%s_gdbinit.tmpl' % self.target.lower(), ctx, '.gdbinit')
+ self.gen_file('e2studio_launch.tmpl', ctx, '%s OpenOCD.launch' % self.program_name)
diff --git a/workspace_tools/export/e2studio_launch.tmpl b/workspace_tools/export/e2studio_launch.tmpl
new file mode 100644
index 0000000000..2524c4d9d6
--- /dev/null
+++ b/workspace_tools/export/e2studio_launch.tmpl
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/workspace_tools/export/e2studio_rz_a1h_cproject.tmpl b/workspace_tools/export/e2studio_rz_a1h_cproject.tmpl
new file mode 100644
index 0000000000..85dcd99424
--- /dev/null
+++ b/workspace_tools/export/e2studio_rz_a1h_cproject.tmpl
@@ -0,0 +1,318 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/workspace_tools/export/e2studio_rz_a1h_gdbinit.tmpl b/workspace_tools/export/e2studio_rz_a1h_gdbinit.tmpl
new file mode 100644
index 0000000000..a59f78c10c
--- /dev/null
+++ b/workspace_tools/export/e2studio_rz_a1h_gdbinit.tmpl
@@ -0,0 +1,29 @@
+define hook-step
+mon cortex_a maskisr on
+end
+
+define hook-stepi
+mon cortex_a maskisr on
+end
+
+define hook-next
+mon cortex_a maskisr on
+end
+
+define hook-nexti
+mon cortex_a maskisr on
+end
+
+define hook-finish
+mon cortex_a maskisr on
+end
+
+define hook-stop
+mon cortex_a maskisr off
+end
+
+define hook-kill
+mon reset init
+end
+
+set mem inaccessible-by-default off
\ No newline at end of file
diff --git a/workspace_tools/export/e2studio_rz_a1h_project.tmpl b/workspace_tools/export/e2studio_rz_a1h_project.tmpl
new file mode 100644
index 0000000000..0bab8dd408
--- /dev/null
+++ b/workspace_tools/export/e2studio_rz_a1h_project.tmpl
@@ -0,0 +1,27 @@
+
+
+ {{name}}
+ This file was automagically generated by mbed.org. For more information, see http://mbed.org/handbook/Exporting-To-e2studio
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/workspace_tools/export_test.py b/workspace_tools/export_test.py
index 32b1cd6b4e..81f5471307 100644
--- a/workspace_tools/export_test.py
+++ b/workspace_tools/export_test.py
@@ -306,6 +306,8 @@ if __name__ == '__main__':
('sw4stm32', 'NUCLEO_F042K6'),
('sw4stm32', 'NUCLEO_F303K8'),
('sw4stm32', 'NUCLEO_F410RB'),
+
+ ('e2studio', 'RZ_A1H'),
# Removed following item to avoid script error
#(None, None),
]: