--- a/LPCBeremiz.py Thu Feb 17 10:11:04 2011 +0100
+++ b/LPCBeremiz.py Thu Feb 17 15:59:56 2011 +0100
@@ -375,7 +375,7 @@
elif os.path.isfile(srcpath):
shutil.copy2(srcpath, dstpath)
-[SIMULATION_MODE, ONLINE_MODE] = range(2)
+[SIMULATION_MODE, TRANSFER_MODE] = range(2) class LPCPluginsRoot(PluginsRoot):
@@ -494,7 +494,7 @@
if self.StatusTimer and not self.StatusTimer.IsRunning():
- self.StatusTimer.Start(milliseconds=1000, oneShot=False)
+ self.StatusTimer.Start(milliseconds=2000, oneShot=False) if self.previous_plcstate=="Started":
if self.DebugAvailable() and self.GetIECProgramsAndVariables():
@@ -507,7 +507,7 @@
elif self.StatusTimer and self.StatusTimer.IsRunning():
- if self.CurrentMode == ONLINE_MODE:
+ if self.CurrentMode == TRANSFER_MODE: if self.OnlineMode == "BOOTLOADER":
@@ -795,7 +795,7 @@
if self.CurrentMode is None and self.OnlineMode != "OFF":
- self.CurrentMode = ONLINE_MODE
+ self.CurrentMode = TRANSFER_MODE --- a/targets/toolchain_makefile.py Thu Feb 17 10:11:04 2011 +0100
+++ b/targets/toolchain_makefile.py Thu Feb 17 15:59:56 2011 +0100
@@ -14,7 +14,9 @@
self.SetBuildPath(self.PluginsRootInstance._getBuildPath())
def SetBuildPath(self, buildpath):
- self.buildpath = buildpath
+ if self.buildpath != buildpath: + self.buildpath = buildpath @@ -34,8 +36,9 @@
+ print self.PluginsRootInstance.LocationCFilesAndCFLAGS for Location, CFilesAndCFLAGS, DoCalls in self.PluginsRootInstance.LocationCFilesAndCFLAGS:
# Get CFiles list to give it to makefile
for CFile, CFLAGS in CFilesAndCFLAGS:
CFileName = os.path.basename(CFile)
@@ -43,32 +46,39 @@
srcfiles.append(CFileName)
- self.md5key = hashlib.md5(wholesrcdata).hexdigest()
- props = self.PluginsRootInstance.GetProjectProperties()
- self.md5key += '#'.join([props[key] for key in ['companyName',
- self.md5key += '#' #+','.join(map(str,time.localtime()))
- # Store new PLC filename based on md5 key
- f = open(self._GetMD5FileName(), "w")
- beremizcommand = {"src": ' '.join(srcfiles),
- "cflags": ' '.join(cflags),
- "md5": '"'+self.md5key+'"'
- target = self.PluginsRootInstance.GetTarget().getcontent()["value"]
- command = target.getCommand().split(' ') +\
- [target.getBuildPath()] +\
- [arg % beremizcommand for arg in target.getArguments().split(' ')] +\
- target.getRule().split(' ')
- # Call Makefile to build PLC code and link it with target specific code
- status, result, err_result = ProcessLogger(self.PluginsRootInstance.logger,
- self.PluginsRootInstance.logger.write_error(_("C compilation of %s failed.\n"))
+ self.md5key = hashlib.md5(wholesrcdata).hexdigest() + props = self.PluginsRootInstance.GetProjectProperties() + self.md5key += '#'.join([props[key] for key in ['companyName', + self.md5key += '#' #+','.join(map(str,time.localtime())) + # Store new PLC filename based on md5 key + f = open(self._GetMD5FileName(), "w") + if oldmd5 != self.md5key : + beremizcommand = {"src": ' '.join(srcfiles), + "cflags": ' '.join(cflags), + "md5": '"'+self.md5key+'"' + target = self.PluginsRootInstance.GetTarget().getcontent()["value"] + command = target.getCommand().split(' ') +\ + [target.getBuildPath()] +\ + [arg % beremizcommand for arg in target.getArguments().split(' ')] +\ + target.getRule().split(' ') + # Call Makefile to build PLC code and link it with target specific code + status, result, err_result = ProcessLogger(self.PluginsRootInstance.logger, + self.PluginsRootInstance.logger.write_error(_("C compilation of %s failed.\n")) + self.PluginsRootInstance.logger.write(_("Source didn't change, no build.\n"))