From ca3575516770db401d3decc444ec4bc3b2cab3c5 Mon Sep 17 00:00:00 2001 From: Marcelo Salazar Date: Sat, 3 Sep 2016 09:44:15 +0100 Subject: [PATCH 1/3] Change default uvision exporter to uvision5 uVision4 is no longer maintained by the Keil team (support was stopped long time ago). This is why we need to make the uvision exporter able to generate uVision5 projects by default (which is based on software packs). Also, adding note that the uvision4 exporter is now deprecated and will be removed in the future. --- tools/export/__init__.py | 4 ++-- tools/export/uvision4.py | 3 +++ tools/test/export/build_test.py | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/export/__init__.py b/tools/export/__init__.py index 301dc7117a..35cdd3f2ff 100644 --- a/tools/export/__init__.py +++ b/tools/export/__init__.py @@ -28,8 +28,8 @@ from tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP from project_generator_definitions.definitions import ProGenDef EXPORTERS = { - 'uvision': uvision4.Uvision4, - 'uvision4': uvision4.Uvision4, + 'uvision': uvision5.Uvision5, + 'uvision4': uvision4.Uvision4, # deprecated - to be removed in future version 'uvision5': uvision5.Uvision5, 'lpcxpresso': codered.CodeRed, 'gcc_arm': gccarm.GccArm, diff --git a/tools/export/uvision4.py b/tools/export/uvision4.py index 5d3b548d74..1bc41e46a9 100644 --- a/tools/export/uvision4.py +++ b/tools/export/uvision4.py @@ -55,6 +55,9 @@ class Uvision4(Exporter): def generate(self): """ Generates the project files """ + + print "WARNING: exporting to uVision4 is deprecated and will be removed in a future version" + project_data = self.progen_get_project_data() tool_specific = {} # Expand tool specific settings by uvision specific settings which are required diff --git a/tools/test/export/build_test.py b/tools/test/export/build_test.py index e87b4875b1..317f4b174f 100644 --- a/tools/test/export/build_test.py +++ b/tools/test/export/build_test.py @@ -69,8 +69,8 @@ class ProgenBuildTest(object): created project files """ log = '' - if tool == 'uvision' or tool == 'uvision5': - log = path.join(project_dir, "build", "build_log.txt") + if tool == 'uvision' or tool == 'uvision4': + log = os.path.join(project_dir,"build","build_log.txt") elif tool == 'iar': log = path.join(project_dir, 'build_log.txt') try: @@ -129,7 +129,7 @@ class ProgenBuildTest(object): def main(): """Entry point""" - toolchainlist = ["iar", "uvision", "uvision5"] + toolchainlist = ["iar", "uvision", "uvision4"] default_tests = [test_name_known("MBED_BLINKY")] targetnames = TARGET_NAMES targetnames.sort() From 1192744a068ef6e1099bdca22a37232997604ccf Mon Sep 17 00:00:00 2001 From: Marcelo Salazar Date: Mon, 12 Sep 2016 20:12:54 +0100 Subject: [PATCH 2/3] Minor fix to match with master --- tools/test/export/build_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/export/build_test.py b/tools/test/export/build_test.py index 317f4b174f..2a3c906bfd 100644 --- a/tools/test/export/build_test.py +++ b/tools/test/export/build_test.py @@ -70,7 +70,7 @@ class ProgenBuildTest(object): """ log = '' if tool == 'uvision' or tool == 'uvision4': - log = os.path.join(project_dir,"build","build_log.txt") + log = path.join(project_dir,"build","build_log.txt") elif tool == 'iar': log = path.join(project_dir, 'build_log.txt') try: From 64d33810fc62c401d1a49efbc9cf7ac2f8d80916 Mon Sep 17 00:00:00 2001 From: Marcelo Salazar Date: Fri, 16 Sep 2016 10:11:07 +0100 Subject: [PATCH 3/3] Minor tweak on spaces --- tools/test/export/build_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/export/build_test.py b/tools/test/export/build_test.py index 2a3c906bfd..52c172f7fa 100644 --- a/tools/test/export/build_test.py +++ b/tools/test/export/build_test.py @@ -70,7 +70,7 @@ class ProgenBuildTest(object): """ log = '' if tool == 'uvision' or tool == 'uvision4': - log = path.join(project_dir,"build","build_log.txt") + log = path.join(project_dir, "build", "build_log.txt") elif tool == 'iar': log = path.join(project_dir, 'build_log.txt') try: