blob: dabf58fb23994cd55ad20aaae10a647cbb5cb612 [file] [log] [blame]
Jonatan Antonicdd14922017-09-12 15:14:07 +02001#! python
2
3from buildcmd import BuildCmd
4from string import maketrans
5from datetime import datetime
6import mmap
7
8class IarCmd(BuildCmd):
9
10 def __init__(self, project, config):
11 BuildCmd.__init__(self)
12 self._project = project
13 self._config = config
14 self._log = "iar_{0}.log".format(datetime.now().strftime("%Y%m%d%H%M%S"))
15
16 def getCommand(self):
17 return "iarbuild.exe"
18
19 def getArguments(self):
20 return [ self._project, "-build", self._config ]
21
22 def isSuccess(self):
23 return self._result <= 1
24
25 def getLog(self):
26 try:
27 return open(self._log, "r")
28 except:
29 return None