diff --git a/tools/export/__init__.py b/tools/export/__init__.py index 78efc4cb2e2..151f4fd90e1 100644 --- a/tools/export/__init__.py +++ b/tools/export/__init__.py @@ -57,8 +57,6 @@ 'eclipse_armc5' : cdt.EclipseArmc5, 'gnuarmeclipse': gnuarmeclipse.GNUARMEclipse, 'qtcreator': qtcreator.QtCreator, - 'zip' : zip.ZIP, - 'cmsis' : cmsis.CMSIS, 'vscode_gcc_arm' : vscode.VSCodeGcc, 'vscode_iar' : vscode.VSCodeIAR, 'vscode_armc5' : vscode.VSCodeArmc5 diff --git a/tools/export/atmelstudio/__init__.py b/tools/export/atmelstudio/__init__.py index bab012db694..f123810b8aa 100644 --- a/tools/export/atmelstudio/__init__.py +++ b/tools/export/atmelstudio/__init__.py @@ -17,9 +17,10 @@ import uuid from os.path import splitext, basename, dirname -from tools.export.exporters import Exporter +from tools.export.exporters import Exporter, deprecated_exporter +@deprecated_exporter class AtmelStudio(Exporter): NAME = 'AtmelStudio' TOOLCHAIN = 'GCC_ARM' @@ -36,6 +37,10 @@ class AtmelStudio(Exporter): MBED_CONFIG_HEADER_SUPPORTED = True + @classmethod + def is_target_supported(cls, maybe_supported): + return maybe_supported in cls.TARGETS + def generate(self): source_files = [] diff --git a/tools/export/coide/__init__.py b/tools/export/coide/__init__.py index 87ffda57117..99a79381a43 100644 --- a/tools/export/coide/__init__.py +++ b/tools/export/coide/__init__.py @@ -16,9 +16,10 @@ """ from os.path import splitext, basename -from tools.export.exporters import Exporter +from tools.export.exporters import Exporter, deprecated_exporter +@deprecated_exporter class CoIDE(Exporter): NAME = 'CoIDE' TOOLCHAIN = 'GCC_ARM' diff --git a/tools/export/e2studio/__init__.py b/tools/export/e2studio/__init__.py index a80d53553b7..447dee58a8a 100644 --- a/tools/export/e2studio/__init__.py +++ b/tools/export/e2studio/__init__.py @@ -16,8 +16,9 @@ """ from os.path import splitext, basename -from tools.export.exporters import Exporter +from tools.export.exporters import Exporter, deprecated_exporter +@deprecated_exporter class E2Studio(Exporter): NAME = 'e2 studio' TOOLCHAIN = 'GCC_ARM' diff --git a/tools/export/exporters.py b/tools/export/exporters.py index a60ea860309..d700ccdf4e2 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -25,6 +25,18 @@ def __init__(self, func): def __get__(self, inst, cls): return self.func(cls) +def deprecated_exporter(CLS): + old_init = CLS.__init__ + old_name = CLS.NAME + def __init__(*args, **kwargs): + print("==================== DEPRECATION NOTICE ====================") + print("The exporter %s is no longer maintained, and deprecated." % old_name) + print("%s will be removed from mbed OS for the mbed OS 5.6 release." % old_name) + old_init(*args, **kwargs) + CLS.__init__ = __init__ + CLS.NAME = "%s (DEPRECATED)" % old_name + return CLS + class Exporter(object): """Exporter base class diff --git a/tools/export/kds/__init__.py b/tools/export/kds/__init__.py index c663c9c875c..6df777a19a0 100644 --- a/tools/export/kds/__init__.py +++ b/tools/export/kds/__init__.py @@ -16,9 +16,10 @@ """ from os.path import splitext, basename -from tools.export.exporters import Exporter +from tools.export.exporters import Exporter, deprecated_exporter +@deprecated_exporter class KDS(Exporter): NAME = 'Kinetis Design Studio' TOOLCHAIN = 'GCC_ARM' diff --git a/tools/export/lpcxpresso/__init__.py b/tools/export/lpcxpresso/__init__.py index aeaa12df021..263a5f7f593 100644 --- a/tools/export/lpcxpresso/__init__.py +++ b/tools/export/lpcxpresso/__init__.py @@ -16,8 +16,9 @@ """ from os.path import splitext, basename -from tools.export.exporters import Exporter +from tools.export.exporters import Exporter, deprecated_exporter +@deprecated_exporter class LPCXpresso(Exporter): NAME = 'LPCXpresso' TOOLCHAIN = 'GCC_ARM' diff --git a/tools/export/simplicity/__init__.py b/tools/export/simplicity/__init__.py index 74ec93a666f..8319e58637f 100644 --- a/tools/export/simplicity/__init__.py +++ b/tools/export/simplicity/__init__.py @@ -16,7 +16,7 @@ """ from os.path import split,splitext, basename -from tools.export.exporters import Exporter +from tools.export.exporters import Exporter, deprecated_exporter class Folder: def __init__(self, name): @@ -54,6 +54,7 @@ def addChild(self, folderName): return self.findChild(folderName) +@deprecated_exporter class SimplicityV3(Exporter): NAME = 'SimplicityV3' TOOLCHAIN = 'GCC_ARM'