Moved LPC specific code from toolchain_makefile into LPC target, added FROM_BEREMIZ variable to tell LPC's makefile it is invoked from here.
authoredouard
Wed, 02 Jun 2010 10:08:58 +0200
changeset 538 ad05f27222cd
parent 537 881c0b3f0204
child 539 6ff2c1d34640
Moved LPC specific code from toolchain_makefile into LPC target, added FROM_BEREMIZ variable to tell LPC's makefile it is invoked from here.
targets/LPC/__init__.py
targets/XSD_toolchain_makefile
targets/toolchain_makefile.py
--- 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")