Commit daa1b164 authored by Filip Demski's avatar Filip Demski
Browse files

SAMV71: Minimal template set

parent cbf0c8c6
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Protected block name
@@-- @_Language_@ : Implementation language
@@-- @_Calling_Threads_@ : List of calling threads
@@-- @_Node name_@ : Node name
@@-- @_Protected_PIs_@ : Protected Provided interfaces (from pi.tmplt)
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
\ No newline at end of file
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node as defined in the Deployment View
@@-- The content of this file is generated from node.tmplt
@@-- If there is no string defined here, no file will be generated per node,
@@-- (that's an option if the intent is to generate only one file per system)
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Partition_Name_@/request_size.h
@@-- Specify the file name for the complete system (including nodes)
@@-- (no template tag)
@@-- Specify the file name for a thread
@@-- @_Thread_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@@-- The up to date list of tags available for this template is available here:
@@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fnode.tmplt
@@-- If you are using vim, go over the URL and pres gx in to follow the link
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_node.ascii
@@-- The up to date list of tags available for this template is available here:
@@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fpartition.tmplt
@@-- If you are using vim, go over the URL and pres gx in to follow the link
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_partition.ascii
#ifndef REQUEST_SIZE_H
#define REQUEST_SIZE_H
#include <stdint.h>
#include "dataview-uniq.h"
// struct used to calculate buffer size for drivers
struct GenericLinuxAllParametersStub
{
union
{
// input ports
@@TABLE@@
@@IF@@ @_In_Port_Encoding_Name_@ = NATIVE
uint8_t @_In_Port_Thread_Name_@[sizeof (asn1Scc@_REPLACE_ALL(-/_):In_Port_Type_Name_@)];
@@ELSIF@@ @_In_Port_Encoding_Name_@ = UPE
uint8_t @_In_Port_Thread_Name_@[asn1Scc@_REPLACE_ALL(-/_):In_Port_Type_Name_@_REQUIRED_BYTES_FOR_ENCODING];
@@ELSIF@@ @_In_Port_Encoding_Name_@ = ACN
uint8_t @_In_Port_Thread_Name_@[asn1Scc@_REPLACE_ALL(-/_):In_Port_Type_Name_@_REQUIRED_BYTES_FOR_ACN_ENCODING];
@@ELSE@@
uint8_t @_In_Port_Thread_Name_@[1];
@@END_IF@@
@@END_TABLE@@
// output ports
@@TABLE@@
@@IF@@ @_Out_Port_Encoding_Name_@ = NATIVE
uint8_t @_Out_Port_Names_@[sizeof (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@)];
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = UPE
uint8_t @_Out_Port_Names_@[asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ENCODING];
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = ACN
uint8_t @_Out_Port_Names_@[asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ACN_ENCODING];
@@ELSE@@
uint8_t @_Out_Port_Names_@[1];
@@END_IF@@
@@END_TABLE@@
uint8_t dummy_union_field[1];
} all_types;
};
// GENERIC_PARTITION_BUFFER_SIZE should be even number
#define GENERIC_PARTITION_BUFFER_SIZE (((sizeof(struct GenericLinuxAllParametersStub) + 1) / 2) * 2)
@_Threads_@
@@TABLE@@
@@IF@@ @_Out_Port_Encoding_Name_@ = NATIVE
#define @_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@_REQUEST_SIZE (sizeof (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@))
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = UPER
#define @_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@_REQUEST_SIZE (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ENCODING)
@@ELSIF@@ @_Out_Port_Encoding_Name_@ = ACN
#define @_UPPER:Out_Port_Remote_Function_@_@_UPPER:Out_Port_Remote_Port_Name_@_REQUEST_SIZE (asn1Scc@_REPLACE_ALL(-/_):Out_Port_Type_Name_@_REQUIRED_BYTES_FOR_ACN_ENCODING)
@@END_IF@@
@@END_TABLE@@
#endif
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the interface
@@-- @_Direction_@ : "PI" or "RI"
@@-- @_Kind_@ : The RCM Kind
@@-- @_Parent_Function_@ : The name of the function
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the interface
@@-- @_Direction_@ : "PI" or "RI"
@@-- @_Kind_@ : The RCM Kind
@@-- @_Parent_Function_@ : The name of the function
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
\ No newline at end of file
@@-- The following tags are available in this template:
@@--
@@-- @_Nodes_@ : Code generated for the nodes
@@-- @_Node_Names_@ : Vector Tag of node names
@@-- @_Node_CPU_@ : |_ Corresponding CPU name (eg x86_linux)
@@-- @_Node_CPU_Classifier_@ : |_ CPU Classifier (ocarina...::x86_linux)
@@-- @_Partition_Names_@ : Vector Tag of partition names
@@-- @_Partition_Node_@ : |_ Corresponding node name
@@-- @_Partition_CPU_@ : |_ Corresponding CPU name
@@-- @_Threads_@ : Code generated for the threads
@@-- @_Thread_Names_@ : List of all threads in the complete system
@@-- @_Target_Packages_@ : List of all target package names in the complete system
@@-- And all the system configuration obtained from the command line:
@@-- Interface_View, Deployment_View, Data_View, Binary_Path, Check_Data_View,
@@-- Output_Dir, Skeletons, Glue, Use_POHIC, Timer_Resolution, Debug_Flag,
@@-- No_Stdlib_Flag, Timer_Resolution, Other_Files (list of aadl files)
@@-- The following tags are available in this template:
@@--
@@-- @_Thread_Name_@ : Thread name
@@-- @_Entry_Port_Name_@ : Name of the PI
@@-- @_RCM_@ : One of "CYCLIC_OPERATION", "SPORADIC_OPERATION"
@@-- @_Pro_Block_Name_@ : Name of the protected function
@@-- @_Node_Name_@ : Name of the deployment node
@@-- @_Remote_Threads_@ : Vector tag: output remote thread list
@@-- @_RI_Port_Name_@ : |_ Corresponding local RI name
@@-- @_Remote_PIs_@ : |_ Associated PI Name
@@-- @_Remote_PI_Sorts_@ : |_ Optional param type of the remote thread
@@-- @_Remote_PI_Modules_@ : |_ Asn1 module of the optional param type
@@-- Tags related to the PI that is at the origin of the thread creation:
@@-- @_Name_@, @_Kind_@, @_Parent_Function_@ : shoud be useless here
@@-- @_Param_Names_@, _Types_@, _ASN1_Modules, _Encodings_@, _Directions_@ : param vector tag
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : relevant here
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI @_Name_@
@@IF@@ @_Param_Encodings_@ = NATIVE
#define @_UPPER:Thread_Name_@_REQUEST_SIZE (sizeof (asn1Scc@_REPLACE_ALL(-/_):Param_Types_@))
@@ELSIF@@ @_Param_Encodings_@ = UPER
#define @_UPPER:Thread_Name_@_REQUEST_SIZE (asn1Scc@_REPLACE_ALL(-/_):Param_Types_@_REQUIRED_BYTES_FOR_ENCODING)
@@ELSIF@@ @_Param_Encodings_@ = ACN
#define @_UPPER:Thread_Name_@_REQUEST_SIZE (asn1Scc@_REPLACE_ALL(-/_):Param_Types_@_REQUIRED_BYTES_FOR_ACN_ENCODING)
@@ELSE@@
#define @_UPPER:Thread_Name_@_REQUEST_SIZE (1)
@@END_IF@@
\ No newline at end of file
@@-- The following boolean tags are available to decide if the file
@@-- shall be generated or not:
@@-- Filename_Is_Present
@@-- Skeletons
@@-- Glue
@@-- Use_POHIC
@@-- Debug
@@-- No_Stdlib
@@-- CPU_Name
@@IF@@ @_CPU_Platform_@ = PLATFORM_SAMV71_FREERTOS
TRUE
@@END_IF@@
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Protected block name
@@-- @_Language_@ : Implementation language
@@-- @_Calling_Threads_@ : List of calling threads
@@-- @_Node name_@ : Node name
@@-- @_Protected_PIs_@ : Protected Provided interfaces (from pi.tmplt)
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node as defined in the Deployment View
@@-- The content of this file is generated from node.tmplt
@@-- If there is no string defined here, no file will be generated per node,
@@-- (that's an option if the intent is to generate only one file per system)
Makefile.@_LOWER:Node_Name_@
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Partition_Name_@.gpr
@@-- Specify the file name for the complete system (including nodes)
@@-- (no template tag)
@@-- Specify the file name for a thread
@@-- @_Thread_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@@-- The up to date list of tags available for this template is available here:
@@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fnode.tmplt
@@-- If you are using vim, go over the URL and pres gx in to follow the link
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_node.ascii
# This file is generated for Generic Linux partition
# @_Node_Name_@ @_CPU_Name_@ @_Ada_Runtime_@ @_CPU_Platform_@ @_CPU_Classifier_@
@@INLINE(.PHONY: all clean partitions )( )()@@
@@TABLE@@
partition_@_LOWER:Partition_Names_@
runtime_@_LOWER:Partition_Names_@
@@END_TABLE@@
@@END_INLINE@@
all: partitions
@@INLINE(partitions: )( )()@@
partition_@_LOWER:Partition_Names_@
@@END_INLINE@@
@@TABLE@@
partition_@_LOWER:Partition_Names_@: runtime_@_LOWER:Partition_Names_@
gprbuild -R -p -P @_LOWER:Partition_Names_@.gpr -XCFG="Release" -cargs:C -DSTATIC=""
@@END_TABLE@@
clean:
@@TABLE@@
gprclean -P @_LOWER:Partition_Names_@.gpr
@@END_TABLE@@
@@TABLE@@
runtime_@_LOWER:Partition_Names_@:
sh ./runtime_@_LOWER:Partition_Names_@.sh
@@END_TABLE@@
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment