equal
deleted
inserted
replaced
116 self.DebugTicks = [] |
116 self.DebugTicks = [] |
117 self.SetAppFrame(frame, logger) |
117 self.SetAppFrame(frame, logger) |
118 |
118 |
119 self.iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+(".exe" if wx.Platform == '__WXMSW__' else "")) |
119 self.iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+(".exe" if wx.Platform == '__WXMSW__' else "")) |
120 self.ieclib_path = os.path.join(base_folder, "matiec", "lib") |
120 self.ieclib_path = os.path.join(base_folder, "matiec", "lib") |
|
121 self.ieclib_c_path = os.path.join(base_folder, "matiec", "lib", "C") |
121 |
122 |
122 # Setup debug information |
123 # Setup debug information |
123 self.IECdebug_datas = {} |
124 self.IECdebug_datas = {} |
124 self.IECdebug_lock = Lock() |
125 self.IECdebug_lock = Lock() |
125 |
126 |
202 |
203 |
203 def GetCTRoot(self): |
204 def GetCTRoot(self): |
204 return self |
205 return self |
205 |
206 |
206 def GetIECLibPath(self): |
207 def GetIECLibPath(self): |
207 return self.ieclib_path |
208 return self.ieclib_c_path |
208 |
209 |
209 def GetIEC2cPath(self): |
210 def GetIEC2cPath(self): |
210 return self.iec2c_path |
211 return self.iec2c_path |
211 |
212 |
212 def GetCurrentLocation(self): |
213 def GetCurrentLocation(self): |
611 |
612 |
612 # Now compile IEC code into many C files |
613 # Now compile IEC code into many C files |
613 # files are listed to stdout, and errors to stderr. |
614 # files are listed to stdout, and errors to stderr. |
614 status, result, err_result = ProcessLogger( |
615 status, result, err_result = ProcessLogger( |
615 self.logger, |
616 self.logger, |
616 "\"%s\" -f -I \"%s\" -T \"%s\" \"%s\""%( |
617 "\"%s\" -f -l -p -I \"%s\" -T \"%s\" \"%s\""%( |
617 self.iec2c_path, |
618 self.iec2c_path, |
618 self.ieclib_path, |
619 self.ieclib_path, |
619 buildpath, |
620 buildpath, |
620 self._getIECcodepath()), |
621 self._getIECcodepath()), |
621 no_stdout=True, no_stderr=True).spin() |
622 no_stdout=True, no_stderr=True).spin() |
673 # Keep track of generated located variables for later use by self._Generate_C |
674 # Keep track of generated located variables for later use by self._Generate_C |
674 self.PLCGeneratedLocatedVars = self.GetLocations() |
675 self.PLCGeneratedLocatedVars = self.GetLocations() |
675 # Keep track of generated C files for later use by self.CTNGenerate_C |
676 # Keep track of generated C files for later use by self.CTNGenerate_C |
676 self.PLCGeneratedCFiles = C_files |
677 self.PLCGeneratedCFiles = C_files |
677 # compute CFLAGS for plc |
678 # compute CFLAGS for plc |
678 self.plcCFLAGS = '"-I%s" -Wno-unused-function'%self.ieclib_path |
679 self.plcCFLAGS = '"-I%s" -Wno-unused-function'%self.ieclib_c_path |
679 return True |
680 return True |
680 |
681 |
681 def GetBuilder(self): |
682 def GetBuilder(self): |
682 """ |
683 """ |
683 Return a Builder (compile C code into machine code) |
684 Return a Builder (compile C code into machine code) |