Skip to content

Commit

Permalink
-xml file generation for functionsblock
Browse files Browse the repository at this point in the history
  • Loading branch information
RuedKamp authored and unknown committed Nov 19, 2015
1 parent 65da0bc commit 50f43eb
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -88,7 +88,7 @@ template translateModel(SimCode simCode)

match target
case "vxworks69" then
let()= textFile(functionBlock(simCode), '<%fileNamePrefix%>_PLCOPEN.xml')
let()= textFile(functionBlock(simCode), '<%fileNamePrefix%>_spsblock.txt')
let()= textFile(ftp_script(simCode), '<%fileNamePrefix%>_ftp.bat')
""
else ""
Expand Down Expand Up @@ -2522,11 +2522,7 @@ then

let outputnames = vars.outputVars |> SIMVAR(__) hasindex i0 =>
<<
<variable name= "<%crefST(name, false)%>">
<type>
<<%crefTypeST(name)%>/>
</type>
</variable>
<%crefST(name, false)%> : <%crefTypeST(name)%>;
>>
;separator="\n"

Expand Down Expand Up @@ -2555,11 +2551,7 @@ then

let inputnames = vars.inputVars |> SIMVAR(__) hasindex i0 =>
<<
<variable name= "<%crefST(name, false)%>">
<type>
<<%crefTypeST(name)%>/>
</type>
</variable>
<%crefST(name, false)%> : <%crefTypeST(name)%> ;
>>
;separator="\n"

Expand Down Expand Up @@ -2593,7 +2585,11 @@ then

let outputnames = vars.outputVars |> SIMVAR(__) hasindex i0 =>
<<
<%crefTypeMLPI(name)%> <%crefST(name, false)%>;
<variable name= "<%crefST(name, false)%>">
<type>
<<%crefTypeST(name)%>/>
</type>
</variable>
>>
;separator="\n"

Expand Down Expand Up @@ -3281,8 +3277,8 @@ case "vxworks69" then


WIND_HOME := $(subst \,/,$(WIND_HOME))
WIND_BASE := $(WIND_HOME)/customBosch/vxworks-6.9
MLPI_SDK_01 := $(subst \,/,$(MLPI_SDK_01))
WIND_BASE := $(subst \,/,$(WIND_BASE))
MLPI := $(subst \,/,$(MLPI))
OMDEV := $(subst \,/,$(OMDEV))
CPP_RUNTIME := $(subst \,/,$(CPP_RUNTIME))

Expand Down Expand Up @@ -3332,7 +3328,7 @@ case "vxworks69" then
LIBPATH =
LIBS =

IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -I$(MLPI_SDK_01)/mlpiCore/include -I$(OMDEV)/lib/3rdParty/boost-1_49 -I$(CPP_RUNTIME)/Include/Core -I$(CPP_RUNTIME)/Include
IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -I$(MLPI)/mlpiCore/include -I$(OMDEV)/lib/3rdParty/boost-1_49 -I$(CPP_RUNTIME)/Include/Core -I$(CPP_RUNTIME)/Include

IDE_LIBRARIES = $(CPP_RUNTIME)/Build/VxWorks/SimCore.a

Expand Down Expand Up @@ -3381,7 +3377,7 @@ case "vxworks69" then
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : DEBUGFLAGS_Librarian =
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : DEBUGFLAGS_Assembler = -O2
endif
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -I$(MLPI_SDK_01)/mlpiCore/include -I$(OMDEV)/lib/3rdParty/boost-1_49 -I$(CPP_RUNTIME)/Include/Core -I$(CPP_RUNTIME)/Include
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -I$(MLPI)/mlpiCore/include -I$(OMDEV)/lib/3rdParty/boost-1_49 -I$(CPP_RUNTIME)/Include/Core -I$(CPP_RUNTIME)/Include
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : IDE_LIBRARIES = $(CPP_RUNTIME)/Build/VxWorks/SimCore.a
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : IDE_DEFINES = -DCPU=_VX_$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\"$(VSB_DIR)/h/config/vsbConfig.h\"
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/% : PROJECT_TYPE = DKM
Expand All @@ -3403,7 +3399,7 @@ case "vxworks69" then

ifeq ($(TARGET_JOBS),1)
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/com.boschrexroth.$(MODEL_NAME).out : $(OBJECTS_com.boschrexroth.$(MODEL_NAME))
<%\t%>$(TRACE_FLAG)if [ ! -d "`dirname "$@"`" ]; then mkdir -p "`dirname "$@"`"; fi;echo "building $@";rm -f "$@";nmpentium $(OBJECTS_com.boschrexroth.$(MODEL_NAME)) | $(WIND_HOME)/workbench-3.3/foundation/x86-win32/bin/tclsh $(WIND_BASE)/host/resource/hutils/tcl/munch.tcl -c pentium -tags $(VSB_DIR)/tags/pentium/ATOM/common/dkm.tags > $(OBJ_DIR)/ctdt.c; $(TOOL_PATH)ccpentium $(DEBUGFLAGS_Linker) $(CC_ARCH_SPEC) -fdollars-in-identifiers -Wall -Wsystem-headers $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) $(IDE_DEFINES) $(DEFINES) -o $(OBJ_DIR)/ctdt.o -c $(OBJ_DIR)/ctdt.c; $(TOOL_PATH)ccpentium -r -nostdlib -Wl,-X -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT -o "$@" $(OBJ_DIR)/ctdt.o $(OBJECTS_com.boschrexroth.$(MODEL_NAME)) $(IDE_LIBRARIES) $(LIBPATH) $(LIBS) $(ADDED_LIBPATH) $(ADDED_LIBS) && if [ "$(EXPAND_DBG)" = "1" ]; then plink "$@";fi
<%\t%>$(TRACE_FLAG)if [ ! -d "`dirname "$@"`" ]; then mkdir -p "`dirname "$@"`"; fi;echo "building $@";rm -f "$@";nmpentium $(OBJECTS_com.boschrexroth.$(MODEL_NAME)) | tclsh $(WIND_BASE)/host/resource/hutils/tcl/munch.tcl -c pentium -tags $(VSB_DIR)/tags/pentium/ATOM/common/dkm.tags > $(OBJ_DIR)/ctdt.c; $(TOOL_PATH)ccpentium $(DEBUGFLAGS_Linker) $(CC_ARCH_SPEC) -fdollars-in-identifiers -Wall -Wsystem-headers $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) $(IDE_DEFINES) $(DEFINES) -o $(OBJ_DIR)/ctdt.o -c $(OBJ_DIR)/ctdt.c; $(TOOL_PATH)ccpentium -r -nostdlib -Wl,-X -T $(WIND_BASE)/target/h/tool/gnu/ldscripts/link.OUT -o "$@" $(OBJ_DIR)/ctdt.o $(OBJECTS_com.boschrexroth.$(MODEL_NAME)) $(IDE_LIBRARIES) $(LIBPATH) $(LIBS) $(ADDED_LIBPATH) $(ADDED_LIBS) && if [ "$(EXPAND_DBG)" = "1" ]; then plink "$@";fi

else
com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/com.boschrexroth.$(MODEL_NAME).out : com.boschrexroth.$(MODEL_NAME)/$(MODE_DIR)/com.boschrexroth.$(MODEL_NAME).out_jobs
Expand Down Expand Up @@ -3433,7 +3429,7 @@ case "vxworks69" then
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : DEBUGFLAGS_Librarian =
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : DEBUGFLAGS_Assembler = -O2
endif
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -I$(MLPI_SDK_01)/mlpiCore/include -I$(OMDEV)/lib/3rdParty/boost-1_49 -I$(CPP_RUNTIME)/Include/Core -I$(CPP_RUNTIME)/Include
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -I$(MLPI)/mlpiCore/include -I$(OMDEV)/lib/3rdParty/boost-1_49 -I$(CPP_RUNTIME)/Include/Core -I$(CPP_RUNTIME)/Include
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : IDE_LIBRARIES = $(CPP_RUNTIME)/Build/VxWorks/SimCore.a
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : IDE_DEFINES = -DCPU=_VX_$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\"$(VSB_DIR)/h/config/vsbConfig.h\"
com.boschrexroth.$(MODEL_NAME)_partialImage/$(MODE_DIR)/% : PROJECT_TYPE = DKM
Expand Down Expand Up @@ -11911,7 +11907,11 @@ let modelname = identOfPath(modelInfo.name)
<%inputVars%>
</inputVars>
<outputVars>
<%outputVars%>
<variable name="y">
<type>
<LREAL/>
</type>
</variable>
</outputVars>
<localVars>
<variable name="cycletime">
Expand Down Expand Up @@ -11973,7 +11973,7 @@ typedef struct <%modelname%>_struct
void* __VFTABLEPOINTER;
<%inputVars%>
<%outputVars%>
MLPI_IEC_LREAL cycletime;
MLPI_IEC_REAL cycletime;
MLPI_IEC_BOOL bAlreadyInitialized;
MLPI_IEC_BOOL bErrorOccured;
ISimController* controller;
Expand Down

0 comments on commit 50f43eb

Please sign in to comment.