Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
4e39e858
Commit
4e39e858
authored
Aug 05, 2019
by
Maxime Perrotin
Browse files
Improve templates
parent
ae0675cc
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/taste-aadl_parser.adb
View file @
4e39e858
...
...
@@ -17,6 +17,7 @@ with System.Assertions,
Ocarina
.
Files
,
Ocarina
.
Parser
,
Ocarina
.
FE_AADL
.
Parser
,
TASTE
.
Backend
,
TASTE
.
Backend
.
Build_Script
,
TASTE
.
Backend
.
Code_Generators
,
TASTE
.
Semantic_Check
;
...
...
@@ -415,7 +416,7 @@ package body TASTE.AADL_Parser is
Block
:
Protected_Block
:=
(
Name
=>
F
.
Name
,
Language
=>
F
.
Language
,
Language
=>
US
(
TASTE
.
Backend
.
Language_Spelling
(
F
))
,
Node
=>
Node
,
others
=>
<>
);
begin
...
...
src/taste-concurrency_view.adb
View file @
4e39e858
...
...
@@ -339,6 +339,7 @@ package body TASTE.Concurrency_View is
else
""
);
begin
Block_Names
:=
Block_Names
&
Block_Name
;
Block_Languages
:=
Block_Languages
&
B
.
Language
;
for
PI_Assoc
of
Tmpl
.
Protected_Provided
loop
...
...
templates/concurrency_view/aadl_4_makefile/block.tmplt
View file @
4e39e858
...
...
@@ -8,7 +8,7 @@
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
@_LOWER:Name_@ :
@@IF@@ @_Language_@ = "sdl"
@@IF@@ @_
LOWER:
Language_@ = "sdl"
# Call opengeode to generate the functional code
make -j -C ../@_LOWER:Name_@/SDL generate-code
@@ELSE@@
...
...
templates/concurrency_view/air_gpr/partition.tmplt
View file @
4e39e858
...
...
@@ -23,6 +23,12 @@
@@--
@
_Thread_Dst_Port_
@
:
Vector
tag
:
connection
port
name
(
dest
)
--
Node
name
:
@
_Name_
@
--
Execution
platform
:
@
_CPU_Platform_
@
@@--
Not
all
systems
use
Ada
so
we
must
not
always
include
Ada
dataview
folder
@@
TABLE
@@
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
or
@
_LOWER
:
Block_Names_
@
=
ada
@@
SET
@@
Need_Ada
=
TRUE
@@
END_IF
@@
@@
END_TABLE
@@
project
@
_CAPITALIZE
:
Name_
@
_AIR
is
type
Build_Type
is
(
"Debug"
,
"Release"
);
...
...
@@ -32,7 +38,11 @@ project @_CAPITALIZE:Name_@_AIR is
for
Object_Dir
use
"@_LOWER:Name_@_obj"
;
for
Exec_Dir
use
"../deploymentview_final/@_Name_@"
;
@@
IF
@@
@
_Need_Ada_
@
=
TRUE
for
Languages
use
(
"Ada"
,
"C"
);
@@
ELSE
@@
for
Languages
use
(
"C"
);
@@
END_IF
@@
for
Main
use
(
"main.c"
);
...
...
@@ -63,12 +73,6 @@ project @_CAPITALIZE:Name_@_AIR is
for
Executable_Suffix
use
".exe"
;
for
Executable
(
"main.c"
)
use
"@_Name_@"
;
end
Builder
;
@@--
Not
all
systems
use
Ada
so
we
must
not
always
include
Ada
dataview
folder
@@
TABLE
@@
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
or
@
_LOWER
:
Block_Names_
@
=
ada
@@
SET
@@
Need_Ada
=
TRUE
@@
END_IF
@@
@@
END_TABLE
@@
--
following
to
be
updated
with
all
relevant
source
dirs
for
Source_Dirs
use
...
...
@@ -84,12 +88,13 @@ project @_CAPITALIZE:Name_@_AIR is
"ada_code_startup"
,
@@
END_IF
@@
@@
TABLE
@@
@@
IF
@@
@
_Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/code"
,
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/SDL/code"
,
"../../@_LOWER:Block_Names_@/SDL/wrappers"
,
@@
ELSE
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/src"
,
"../../@_LOWER:Block_Names_@/@_Block_Languages_@/src"
,
"../../@_LOWER:Block_Names_@/@_Block_Languages_@/wrappers"
,
@@
END_IF
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/wrappers"
,
@@
END_TABLE
@@
"../deploymentview_final/@_LOWER:Name_@"
)
&
external_as_list
(
"ADA_INCLUDE_PATH"
,
":"
);
...
...
templates/concurrency_view/c_pohi_gpr/partition.tmplt
View file @
4e39e858
...
...
@@ -50,12 +50,13 @@ project @_CAPITALIZE:Name_@ is
"../../dataview/Ada"
,
@@
END_IF
@@
@@
TABLE
@@
@@
IF
@@
@
_Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/code"
,
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/SDL/code"
,
"../../@_LOWER:Block_Names_@/SDL/wrappers"
,
@@
ELSE
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/src"
,
"../../@_LOWER:Block_Names_@/@_Block_Languages_@/src"
,
"../../@_LOWER:Block_Names_@/@_Block_Languages_@/wrappers"
,
@@
END_IF
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/wrappers"
,
@@
END_TABLE
@@
"../deploymentview_final/@_LOWER:Name_@"
)
&
external_as_list
(
"ADA_INCLUDE_PATH"
,
":"
);
...
...
@@ -63,7 +64,11 @@ project @_CAPITALIZE:Name_@ is
for
Object_Dir
use
"obj"
;
for
Exec_Dir
use
"../../binaries"
;
@@
IF
@@
@
_Need_Ada_
@
=
TRUE
for
Languages
use
(
"Ada"
,
"C"
);
@@
ELSE
@@
for
Languages
use
(
"C"
);
@@
END_IF
@@
for
Main
use
(
"main.c"
);
...
...
templates/concurrency_view/c_pohi_rtems_with_ada_gpr/partition.tmplt
View file @
4e39e858
...
...
@@ -29,6 +29,12 @@
@@--
@
_Out_Port_Type_Name_
@
:
|
_
corresponding
parameter
type
name
(
optional
)
--
Node
name
:
@
_Name_
@
--
Execution
platform
:
@
_CPU_Platform_
@
@@--
Not
all
systems
use
Ada
so
we
must
not
always
include
Ada
dataview
folder
@@
TABLE
@@
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
or
@
_LOWER
:
Block_Names_
@
=
ada
@@
SET
@@
Need_Ada
=
TRUE
@@
END_IF
@@
@@
END_TABLE
@@
project
@
_CAPITALIZE
:
Name_
@
_RTEMS_Ada
is
type
Build_Type
is
(
"Debug"
,
"Release"
);
...
...
@@ -38,7 +44,11 @@ project @_CAPITALIZE:Name_@_RTEMS_Ada is
for
Object_Dir
use
"obj_rtems_with_ada"
;
for
Exec_Dir
use
"../../binaries"
;
@@
IF
@@
@
_Need_Ada_
@
=
TRUE
for
Languages
use
(
"Ada"
,
"C"
);
@@
ELSE
@@
for
Languages
use
(
"C"
);
@@
END_IF
@@
for
Main
use
(
"main.c"
);
...
...
@@ -67,12 +77,6 @@ project @_CAPITALIZE:Name_@_RTEMS_Ada is
for
Executable_Suffix
use
".exe"
;
for
Executable
(
"main.c"
)
use
"@_Name_@_leon3_rtems"
;
end
Builder
;
@@--
Not
all
systems
use
Ada
so
we
must
not
always
include
Ada
dataview
folder
@@
TABLE
@@
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
or
@
_LOWER
:
Block_Names_
@
=
ada
@@
SET
@@
Need_Ada
=
TRUE
@@
END_IF
@@
@@
END_TABLE
@@
--
following
to
be
updated
with
all
relevant
source
dirs
for
Source_Dirs
use
...
...
@@ -85,12 +89,13 @@ project @_CAPITALIZE:Name_@_RTEMS_Ada is
"ada_code_startup"
,
@@
END_IF
@@
@@
TABLE
@@
@@
IF
@@
@
_Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/code"
,
@@
IF
@@
@
_LOWER
:
Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/SDL/code"
,
"../../@_LOWER:Block_Names_@/SDL/wrappers"
,
@@
ELSE
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/src"
,
"../../@_LOWER:Block_Names_@/@_Block_Languages_@/src"
,
"../../@_LOWER:Block_Names_@/@_Block_Languages_@/wrappers"
,
@@
END_IF
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/wrappers"
,
@@
END_TABLE
@@
"../deploymentview_final/@_LOWER:Name_@"
)
&
external_as_list
(
"ADA_INCLUDE_PATH"
,
":"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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