Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
068580be
Commit
068580be
authored
Apr 15, 2021
by
Maxime Perrotin
Browse files
Add templates for RPi target
Contribution from Angel Grover Pérez Muñoz
parent
49bda816
Changes
16
Hide whitespace changes
Inline
Side-by-side
templates/concurrency_view/c_pohi_gpr/node.tmplt
View file @
068580be
...
...
@@ -85,6 +85,20 @@ debug:
@@END_TABLE@@
release: debug
@@ELSIF@@ @_CPU_Platform_@ = PLATFORM_RPI
debug:
# RPi xcompilation:
@@TABLE@@
# In debug mode, add -v to gprbuild command for verbose output
gprbuild --target=arm-linux-gnueabihf -p -v --config=rpi.cgpr -P @_LOWER:Partition_Names_@_rpi.gpr -XCFG="Debug" -cargs:C -DSTATIC=""
@@END_TABLE@@
release:
# RPi xcompilation:
@@TABLE@@
gprbuild --target=arm-linux-gnueabihf -p --config=rpi.cgpr -P @_LOWER:Partition_Names_@.gpr -XCFG="Release" -cargs:C -DSTATIC=""
@@END_TABLE@@
@@ELSE@@
@@-- Unsupported platform
debug:
...
...
templates/concurrency_view/c_pohi_gpr/partition.tmplt
View file @
068580be
...
...
@@ -120,9 +120,13 @@ project @_CAPITALIZE:Name_@ is
"remote_configuration.cc"
);
package
Compiler
is
@@
IF
@@
@
_CPU_Platform_
@
=
PLATFORM_RPI
for
Driver
(
"C"
)
use
External
(
"CC"
,
"arm-linux-gnueabihf-gcc"
);
for
Driver
(
"C++"
)
use
External
(
"CXX"
,
"arm-linux-gnueabihf-g++"
);
@@
ELSE
@@
for
Driver
(
"C"
)
use
External
(
"CC"
,
"gcc"
);
for
Driver
(
"C++"
)
use
External
(
"CXX"
,
"g++"
);
@@
END_IF
@@
Common_C_Switches
:=
(
"-DTARGET=native"
,
"-DPOSIX"
,
...
...
templates/concurrency_view/rpi_cgpr/README.md
0 → 100644
View file @
068580be
Generate a gpr configuration file for RTEMS with Ada support (POHIC)
templates/concurrency_view/rpi_cgpr/block.tmplt
0 → 100644
View file @
068580be
@@-- 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)
templates/concurrency_view/rpi_cgpr/fileblock.tmplt
0 → 100644
View file @
068580be
@@-- 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
templates/concurrency_view/rpi_cgpr/filenode.tmplt
0 → 100644
View file @
068580be
@@-- 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)
templates/concurrency_view/rpi_cgpr/filepart.tmplt
0 → 100644
View file @
068580be
@@-- 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
rpi.cgpr
templates/concurrency_view/rpi_cgpr/filesys.tmplt
0 → 100644
View file @
068580be
@@-- Specify the file name for the complete system (including nodes)
@@-- (no template tag)
templates/concurrency_view/rpi_cgpr/filethread.tmplt
0 → 100644
View file @
068580be
@@-- 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
templates/concurrency_view/rpi_cgpr/node.tmplt
0 → 100644
View file @
068580be
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node from deployment view
@@-- @_Partition_Names_@ : Tag listing the partitions in this node
@@-- @_Partitions_@ : List of rendered code for partitions
@@-- @_CPU_Name_@, _Platform_@, _Classifier_@, _Ada_Runtime_@ : Info about CPU
templates/concurrency_view/rpi_cgpr/partition.tmplt
0 → 100644
View file @
068580be
@@--
The
following
tags
are
available
in
this
template
:
@@--
@@--
@
_Name_
@
:
Partition
name
(
usually
the
name
of
the
binary
)
@@--
@
_Threads_
@
:
Code
generated
for
the
threads
@@--
@
_Thread_Names_
@
:
Tag
:
list
of
thread
names
@@--
@
_Node_Name_
@
:
Name
of
the
node
containing
this
partition
@@--
@
_Blocks_
@
:
Code
generated
for
protected
functions
@@--
@
_Block_Names
@
:
Vector
Tag
:
list
of
block
(
user
functions
)
names
@@--
@
_Block_Languages
@
:
|
_
Corresponding
implementation
language
@@--
@
_Coverage_
@
:
True
if
user
requested
code
coverage
enable
@@--
@
_Package_Name_
@
:
AADL
Package
name
for
the
target
(
e
.
g
.
ocarina_porocessors_x86
)
@@--
@
_CPU_Name_
@
:
CPU
Name
(
e
.
g
.
x86_linux
)
@@--
@
_CPU_Platform_
@
:
AADL
CPU_Platform
(
e
.
g
.
PLATFORM_NATIVE
)
@@--
@
_CPU_Classifier_
@
:
AADL
CPU
Classifier
(
e
.
g
.
ocarina_processors_x86
::
x86
.
linux
)
@@--
@
_CPU_Family_
@
:
e
.
g
.
gr740
or
x86
@@--
@
_CPU_Instance_
@
:
e
.
g
.
rtems51_posix
or
linux
@@--
@
_VP_Name_
@
:
Virtual
processor
name
on
which
the
partition
is
bounded
@@--
@
_VP_Platform_
@
:
Virtual
processor
platform
(
e
.
g
.
PLATFORM_AIR
)
@@--
@
_VP_Classifier_
@
:
Virtual
processor
classifier
@@--
@
_Ada_Runtime_
@
:
Set
if
CPU_Platform
=
PLATFORM_GNAT_RUNTIME
@@--
@
_Bound_Functions_
@
:
List
of
user
functions
from
Interface
view
@@--
@
_Thread_Src_Name_
@
:
Vector
tag
:
connection
thread
name
(
source
)
@@--
@
_Thread_Dst_Name_
@
:
Vector
tag
:
connection
thread
name
(
dest
)
@@--
@
_Thread_Src_Port_
@
:
Vector
tag
:
connection
port
name
(
source
)
@@--
@
_Thread_Dst_Port_
@
:
Vector
tag
:
connection
port
name
(
dest
)
@@--
@
_In_Port_Names_
@
:
Vector
tag
:
input
ports
of
the
partition
@@--
@
_In_Port_Thread_Name_
@
:
|
_
corresponding
thread
inside
the
partition
@@--
@
_In_Port_Type_Name_
@
:
|
_
corresponding
parameter
type
name
(
optional
)
@@--
@
_Out_Port_Names_
@
:
Vector
tag
:
output
ports
of
the
partition
@@--
@
_Out_Port_Thread_Name_
@
:
|
_
corresponding
thread
inside
the
partition
@@--
@
_Out_Port_Type_Name_
@
:
|
_
corresponding
parameter
type
name
(
optional
)
--
Node
name
:
@
_Name_
@
--
Execution
platform
:
@
_CPU_Platform_
@
--
Generic
gprbuild
configuration
file
for
rtems5
with
Ada
support
for
leon3
configuration
project
Raspberry_PI
is
for
Target
use
"arm-linux-gnueabihf"
;
for
Canonical_Target
use
"arm-linux-gnueabihf"
;
for
Inherit_Source_Path
(
"C++"
)
use
(
"C"
);
for
Inherit_Source_Path
(
"Asm_Cpp"
)
use
(
"Asm"
);
for
Default_Language
use
"Ada"
;
for
Object_Lister
use
(
"arm-linux-gnueabihf-nm"
,
"-g"
);
for
Object_Lister_Matcher
use
" [TDRBSG] (.*)"
;
for
Archive_Builder
use
(
"arm-linux-gnueabihf-ar"
,
"cr"
);
for
Archive_Builder_Append_Option
use
(
"q"
);
for
Archive_Indexer
use
(
"arm-linux-gnueabihf-ranlib"
);
for
Archive_Suffix
use
".a"
;
for
Symbolic_Link_Supported
use
"true"
;
for
Library_Major_Minor_Id_Supported
use
"true"
;
for
Library_Builder
use
"/usr/lib/gprbuild/gprlib"
;
for
Library_Support
use
"full"
;
for
Shared_Library_Prefix
use
"lib"
;
for
Shared_Library_Minimum_Switches
use
(
"-shared"
);
for
Library_Version_Switches
use
(
"-Wl,-soname,"
);
for
Shared_Library_Suffix
use
".so"
;
for
Library_Auto_Init_Supported
use
"true"
;
for
Run_Path_Option
use
(
"-Wl,-z,origin,-rpath,"
);
for
Run_Path_Origin
use
"$ORIGIN"
;
for
Library_Encapsulated_Options
use
(
"-shared"
,
"-static-libgcc"
);
for
Library_Partial_Linker
use
(
"/usr/bin/arm-linux-gnueabihf-gnatgcc"
,
"-nostdlib"
,
"-Wl,-r"
,
"-o"
);
for
Default_Language
use
"C"
;
package
Compiler
is
for
Driver
(
"C"
)
use
"arm-linux-gnueabihf-gcc"
;
for
Driver
(
"Ada"
)
use
"arm-linux-gnueabihf-gcc"
;
for
Driver
(
"C++"
)
use
"arm-linux-gnueabihf-g++"
;
for
Leading_Required_Switches
(
"C"
)
use
(
"-c"
,
"-x"
,
"c"
);
for
Leading_Required_Switches
(
"C++"
)
use
(
"-c"
,
"-x"
,
"c"
);
for
Required_Switches
(
"Ada"
)
use
(
"-c"
,
"-x"
,
"ada"
);
Common_C_Switches
:=
(
"-pipe"
,
"-fdata-sections"
,
"-ffunction-sections"
,
"-fPIC"
);
for
Required_Switches
(
"C"
)
use
Common_C_Switches
;
for
Required_Switches
(
"C++"
)
use
Common_C_Switches
;
for
Object_File_Suffix
(
"C"
)
use
".o"
;
for
Object_File_Suffix
(
"C++"
)
use
".o"
;
for
Object_File_Suffix
(
"Ada"
)
use
".o"
;
for
Dependency_Switches
(
"C"
)
use
(
"-MMD"
,
"-MF"
,
""
);
for
Dependency_Switches
(
"C++"
)
use
(
"-MMD"
,
"-MF"
,
""
);
for
Dependency_Switches
(
"Ada"
)
use
(
"-MMD"
,
"-MF"
,
""
);
for
Include_Switches
(
"C"
)
use
(
"-I"
);
for
Include_Switches
(
"C++"
)
use
(
"-I"
);
for
Include_Switches
(
"Ada"
)
use
(
"-I"
);
for
Include_Path
(
"Ada"
)
use
"ADA_INCLUDE_PATH"
;
for
Include_Path_File
(
"Ada"
)
use
"ADA_PRJ_INCLUDE_FILE"
;
end
Compiler
;
package
Naming
is
for
Spec_Suffix
(
"C"
)
use
".h"
;
for
Body_Suffix
(
"C"
)
use
".c"
;
for
Spec_Suffix
(
"Ada"
)
use
".ads"
;
for
Body_Suffix
(
"Ada"
)
use
".adb"
;
for
Spec_Suffix
(
"C"
)
use
".h"
;
for
Body_Suffix
(
"C++"
)
use
".cc"
;
for
Dot_Replacement
use
"-"
;
end
Naming
;
package
Linker
is
for
Driver
use
"arm-linux-gnueabihf-gcc"
;
Common_C_Linker_Switches
:=
(
"-pipe"
,
"-g"
,
"-lm"
);
for
Export_File_Switch
use
"-Wl,--version-script="
;
for
Map_File_Option
use
"-Wl,-Map,"
;
for
Default_Switches
(
"C"
)
use
Common_C_Linker_Switches
;
for
Default_Switches
(
"C++"
)
use
Common_C_Linker_Switches
;
for
Default_Switches
(
"Ada"
)
use
(
"-pipe"
,
"-g"
,
"-lm"
);
end
Linker
;
package
Clean
is
for
Source_Artifact_Extensions
(
"Ada"
)
use
(
".dg"
,
".rep"
);
for
Object_Artifact_Extensions
(
"Ada"
)
use
(
".s"
,
".ci"
,
".gcno"
,
".su"
);
for
Source_Artifact_Extensions
(
"C"
)
use
(
".gli"
);
for
Object_Artifact_Extensions
(
"C"
)
use
(
".s"
,
".ci"
,
".gcno"
,
".su"
);
for
Source_Artifact_Extensions
(
"C++"
)
use
(
".gli"
);
for
Object_Artifact_Extensions
(
"C++"
)
use
(
".s"
,
".ci"
,
".gcno"
,
".su"
);
end
Clean
;
end
Raspberry_PI
;
templates/concurrency_view/rpi_cgpr/pi.tmplt
0 → 100644
View file @
068580be
@@-- 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
templates/concurrency_view/rpi_cgpr/ri.tmplt
0 → 100644
View file @
068580be
@@-- 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
templates/concurrency_view/rpi_cgpr/system.tmplt
0 → 100644
View file @
068580be
@@-- 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)
templates/concurrency_view/rpi_cgpr/thread.tmplt
0 → 100644
View file @
068580be
@@-- 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_@
templates/concurrency_view/rpi_cgpr/trigger.tmplt
0 → 100644
View file @
068580be
@@-- 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
@@IF@@ @_Use_POHIC_@ and @_CPU_Platform_@ = PLATFORM_RPI and @_Target_@ /= SIMU
TRUE
@@END_IF@@
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment