CoreValidation: Moved common parts of command line build script to Utilities.
diff --git a/CMSIS/Utilities/buildutils/uv4cmd.py b/CMSIS/Utilities/buildutils/uv4cmd.py
new file mode 100644
index 0000000..8c7f932
--- /dev/null
+++ b/CMSIS/Utilities/buildutils/uv4cmd.py
@@ -0,0 +1,29 @@
+#! python
+
+from buildcmd import BuildCmd
+from string import maketrans
+from datetime import datetime
+import mmap
+
+class Uv4Cmd(BuildCmd):
+
+ def __init__(self, project, config):
+ BuildCmd.__init__(self)
+ self._project = project
+ self._config = config
+ self._log = "UV4_{0}_{1}.log".format(self._config.translate(maketrans(" ", "_"), "()[],"), datetime.now().strftime("%Y%m%d%H%M%S"))
+
+ def getCommand(self):
+ return "UV4.exe"
+
+ def getArguments(self):
+ return [ "-t", self._config, "-cr", self._project, "-j0", "-o", self._log ]
+
+ def isSuccess(self):
+ return self._result <= 1
+
+ def getLog(self):
+ try:
+ return open(self._log, "r")
+ except:
+ return None