--- a/plugger.py Sun Dec 09 17:15:56 2007 +0100
+++ b/plugger.py Sun Dec 09 18:58:39 2007 +0100
@@ -513,7 +513,12 @@
####################################################################################
####################################################################################
-iec2c_path = os.path.join(base_folder, "matiec", "iec2c")
+if wx.Platform != '__WXMSW__': +iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+exe_ext) ieclib_path = os.path.join(base_folder, "matiec", "lib")
# import for project creation timestamping
@@ -580,6 +585,9 @@
<xsd:attribute name="Compiler" type="xsd:string" use="required" default="gcc"/>
+ <xsd:attribute name="CFLAGS" type="xsd:string" use="required" default=""/> + <xsd:attribute name="Linker" type="xsd:string" use="required" default="ld"/> + <xsd:attribute name="LDFLAGS" type="xsd:string" use="required" default=""/> @@ -873,6 +881,9 @@
# Compile the resulting code into object files.
compiler = self.BeremizRoot.getCompiler()
+ _CFLAGS = self.BeremizRoot.getCFLAGS() + linker = self.BeremizRoot.getLinker() + _LDFLAGS = self.BeremizRoot.getLDFLAGS() for Location, CFilesAndCFLAGS, DoCalls in LocationCFilesAndCFLAGS:
@@ -887,7 +898,7 @@
logger.write(" [CC] "+bn+" -> "+obn+"\n")
objectfilename = os.path.splitext(CFile)[0]+".o"
- status, result, err_result = logger.LogCommand("%s -c %s -o %s %s"%(compiler, CFile, objectfilename, CFLAGS))
+ status, result, err_result = logger.LogCommand("%s -c %s -o %s %s %s"%(compiler, CFile, objectfilename, _CFLAGS, CFLAGS)) logger.write_error("Build failed\n")
@@ -899,7 +910,7 @@
exe_path = os.path.join(buildpath, exe)
logger.write(" [CC] " + ' '.join(obns)+" -> " + exe + "\n")
- status, result, err_result = logger.LogCommand("%s %s -o %s %s"%(compiler, " ".join(objs), exe_path, ' '.join(LDFLAGS)))
+ status, result, err_result = logger.LogCommand("%s %s -o %s %s"%(linker, " ".join(objs), exe_path, ' '.join(LDFLAGS+[_LDFLAGS]))) logger.write_error("Build failed\n")
--- a/plugins/canfestival/cf_runtime.c Sun Dec 09 17:15:56 2007 +0100
+++ b/plugins/canfestival/cf_runtime.c Sun Dec 09 18:58:39 2007 +0100
@@ -77,7 +77,7 @@
int __init_%(locstr)s(int argc,char **argv)
#ifndef NOT_USE_DYNAMIC_LOADING
- if( !LoadCanDriver("libcanfestival_can_%(candriver)s.so") ){
+ if( !LoadCanDriver("%(candriver)s") ){ fprintf(stderr, "Cannot load CAN interface library for CanFestival (%(candriver)s)\n");\
--- a/runtime/plc_Win32_main.c Sun Dec 09 17:15:56 2007 +0100
+++ b/runtime/plc_Win32_main.c Sun Dec 09 18:58:39 2007 +0100
@@ -6,10 +6,11 @@
struct _timeb timebuffer;
- CURRENT_TIME.tv_sec = timebuffer.time;
- CURRENT_TIME.tv_nsec = timebuffer.millitm * 1000000
+ __CURRENT_TIME.tv_sec = timebuffer.time; + __CURRENT_TIME.tv_nsec = timebuffer.millitm * 1000000; @@ -18,10 +19,10 @@
- liDueTime.QuadPart = -10000 * maxval(common_ticktime__,1);;
+ liDueTime.QuadPart = -10000 * maxval(common_ticktime__,1); // Create a waitable timer.
- hTimer = CreateWaitableTimer(NULL, TRUE, "WaitableTimer");
+ hTimer = CreateWaitableTimer(NULL, FALSE, "WaitableTimer"); printf("CreateWaitableTimer failed (%d)\n", GetLastError());
@@ -30,6 +31,7 @@
if( __init(argc,argv) == 0 ){
+ printf("Tick Time : %d ms\n", common_ticktime__); if (!SetWaitableTimer(hTimer, &liDueTime, common_ticktime__, NULL, NULL, 0))