Moved LPC specific code from toolchain_makefile into LPC target, added FROM_BEREMIZ variable to tell LPC's makefile it is invoked from here.
--- a/targets/LPC/__init__.py Tue Jun 01 13:08:13 2010 +0200
+++ b/targets/LPC/__init__.py Wed Jun 02 10:08:58 2010 +0200
@@ -3,3 +3,9 @@
class LPC_target(toolchain_makefile):
extension = ".ld"
DebugEnabled = False
+
+ def GetBinaryCode(self):
+ try:
+ return open(os.path.join(self.buildpath, "ArmPLC_rom.bin"), "rb").read()
+ except Exception, e:
+ return None
--- a/targets/XSD_toolchain_makefile Tue Jun 01 13:08:13 2010 +0200
+++ b/targets/XSD_toolchain_makefile Wed Jun 02 10:08:58 2010 +0200
@@ -1,6 +1,6 @@
<xsd:attribute name="BuildPath" type="xsd:string" use="optional" default=""/>
<xsd:attribute name="Command" type="xsd:string" use="optional" default="make -C"/>
- <xsd:attribute name="Arguments" type="xsd:string" use="optional" default="BEREMIZSRC=%(src)s BEREMIZCFLAGS=%(cflags)s MD5=%(md5)s USE_BEREMIZ=1 --quiet"/>
+ <xsd:attribute name="Arguments" type="xsd:string" use="optional" default="BEREMIZSRC=%(src)s BEREMIZCFLAGS=%(cflags)s MD5=%(md5)s USE_BEREMIZ=1 FROM_BEREMIZ=1 --quiet"/>
<xsd:attribute name="Rule" type="xsd:string" use="optional" default="all"/>
--- a/targets/toolchain_makefile.py Tue Jun 01 13:08:13 2010 +0200
+++ b/targets/toolchain_makefile.py Wed Jun 02 10:08:58 2010 +0200
@@ -15,14 +15,9 @@
def SetBuildPath(self, buildpath):
self.buildpath = buildpath
- self.exe_path = os.path.join(self.buildpath, "ArmPLC_rom.bin")
- self.md5_path = os.path.join(self.buildpath, "ArmPLC.md5")
def GetBinaryCode(self):
- try:
- return open(self.exe_path, "rb").read()
- except Exception, e:
- return None
+ return None
def _GetMD5FileName(self):
return os.path.join(self.buildpath, "lastbuildPLC.md5")