From f949a6d4f8f2de193a5e57449feb09b7cd7504ea Mon Sep 17 00:00:00 2001 From: Sarah Marsh Date: Tue, 27 Sep 2016 16:08:17 -0500 Subject: [PATCH 1/4] Initial Eclipse suport --- tools/export/__init__.py | 4 +- tools/export/cdt/.cproject.tmpl | 84 ++++++++++++++++++++++++ tools/export/cdt/.project.tmpl | 27 ++++++++ tools/export/cdt/necessary_software.tmpl | 16 +++++ tools/export/cdt/py_ocd_settings.tmpl | 67 +++++++++++++++++++ 5 files changed, 196 insertions(+), 2 deletions(-) create mode 100644 tools/export/cdt/.cproject.tmpl create mode 100644 tools/export/cdt/.project.tmpl create mode 100644 tools/export/cdt/necessary_software.tmpl create mode 100644 tools/export/cdt/py_ocd_settings.tmpl diff --git a/tools/export/__init__.py b/tools/export/__init__.py index 4b0a29471e..3728eb5a96 100644 --- a/tools/export/__init__.py +++ b/tools/export/__init__.py @@ -21,7 +21,7 @@ import yaml from tools.export import uvision4, uvision5, codered, makefile, ds5_5, iar from tools.export import emblocks, coide, kds, simplicityv3, atmelstudio -from tools.export import sw4stm32, e2studio, zip +from tools.export import sw4stm32, e2studio, zip, eclipse from tools.export.exporters import OldLibrariesException, FailedBuildException from tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP @@ -45,7 +45,7 @@ EXPORTERS = { 'atmelstudio' : atmelstudio.AtmelStudio, 'sw4stm32' : sw4stm32.Sw4STM32, 'e2studio' : e2studio.E2Studio, - 'zip' : zip.ZIP, + 'zip' : zip.ZIP } ERROR_MESSAGE_UNSUPPORTED_TOOLCHAIN = """ diff --git a/tools/export/cdt/.cproject.tmpl b/tools/export/cdt/.cproject.tmpl new file mode 100644 index 0000000000..9635abfbcb --- /dev/null +++ b/tools/export/cdt/.cproject.tmpl @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/export/cdt/.project.tmpl b/tools/export/cdt/.project.tmpl new file mode 100644 index 0000000000..ce4e268083 --- /dev/null +++ b/tools/export/cdt/.project.tmpl @@ -0,0 +1,27 @@ + + + {{name}} + + + + + + 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/tools/export/cdt/necessary_software.tmpl b/tools/export/cdt/necessary_software.tmpl new file mode 100644 index 0000000000..e3c0b3c4a0 --- /dev/null +++ b/tools/export/cdt/necessary_software.tmpl @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tools/export/cdt/py_ocd_settings.tmpl b/tools/export/cdt/py_ocd_settings.tmpl new file mode 100644 index 0000000000..29ed6f419b --- /dev/null +++ b/tools/export/cdt/py_ocd_settings.tmpl @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 32b1203b6ccd088de7d2cae18619f79bc0a786a8 Mon Sep 17 00:00:00 2001 From: Sarah Marsh Date: Wed, 24 Aug 2016 12:54:34 -0500 Subject: [PATCH 2/4] Generic makefile in eclipse --- tools/export/__init__.py | 5 ++- tools/export/cdt/.cproject.tmpl | 2 +- tools/export/cdt/__init__.py | 47 ++++++++++++++++++++++++ tools/export/cdt/necessary_software.tmpl | 9 +---- 4 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 tools/export/cdt/__init__.py diff --git a/tools/export/__init__.py b/tools/export/__init__.py index 3728eb5a96..16e5d48563 100644 --- a/tools/export/__init__.py +++ b/tools/export/__init__.py @@ -21,7 +21,7 @@ import yaml from tools.export import uvision4, uvision5, codered, makefile, ds5_5, iar from tools.export import emblocks, coide, kds, simplicityv3, atmelstudio -from tools.export import sw4stm32, e2studio, zip, eclipse +from tools.export import sw4stm32, e2studio, zip, cdt from tools.export.exporters import OldLibrariesException, FailedBuildException from tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP @@ -45,6 +45,9 @@ EXPORTERS = { 'atmelstudio' : atmelstudio.AtmelStudio, 'sw4stm32' : sw4stm32.Sw4STM32, 'e2studio' : e2studio.E2Studio, + 'eclipse_gcc_arm' : cdt.EclipseGcc, + 'eclipse_iar' : cdt.EclipseIAR, + 'eclipse_armc5' : cdt.EclipseArmc5, 'zip' : zip.ZIP } diff --git a/tools/export/cdt/.cproject.tmpl b/tools/export/cdt/.cproject.tmpl index 9635abfbcb..53cd29cfb3 100644 --- a/tools/export/cdt/.cproject.tmpl +++ b/tools/export/cdt/.cproject.tmpl @@ -18,7 +18,7 @@ - +