--- a/ProjectController.py Tue Mar 26 00:35:52 2013 +0100
+++ b/ProjectController.py Tue Mar 26 09:31:20 2013 +0900
@@ -894,6 +894,9 @@
# Now we can forget ExtraFiles (will close files object)
+ # Header file for extensions + open(os.path.join(buildpath,"beremiz.h"), "w").write(targets.GetHeader()) # Template based part of C code generation
# files are stacked at the beginning, as files of confnode tree root
for generator, filename, name in [
--- a/targets/__init__.py Tue Mar 26 00:35:52 2013 +0100
+++ b/targets/__init__.py Tue Mar 26 09:31:20 2013 +0900
@@ -70,6 +70,10 @@
def GetTargetCode(targetname):
return open(targets[targetname]["code"]).read()
+ filename = path.join(path.split(__file__)[0],"beremiz.h") + return open(filename).read() filename = path.join(path.split(__file__)[0],name + ".c")
return open(filename).read()
--- a/targets/plc_main_head.c Tue Mar 26 00:35:52 2013 +0100
+++ b/targets/plc_main_head.c Tue Mar 26 09:31:20 2013 +0900
@@ -2,7 +2,7 @@
* Head of code common to all C targets
* Prototypes of functions provided by generated C softPLC
@@ -28,8 +28,6 @@
* Variable generated by C softPLC and plugins
extern unsigned long greatest_tick_count__;
-/* Tick time provided by POUS.C */
-extern unsigned long long common_ticktime__;
/* Effective tick time with 1ms default value */
static long long Ttick = 1000000;
--- a/targets/plc_main_tail.c Tue Mar 26 00:35:52 2013 +0100
+++ b/targets/plc_main_tail.c Tue Mar 26 09:31:20 2013 +0900
@@ -6,12 +6,6 @@
#define LOG_BUFFER_SIZE (1<<14) /*16Ko*/