Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
buildsupport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
buildsupport
Commits
b9fe60b0
Commit
b9fe60b0
authored
Mar 26, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix buildsupport.gpr and prepare new AST
parent
c376d36e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
30 deletions
+84
-30
Makefile
Makefile
+5
-4
ada/buildsupport.adb
ada/buildsupport.adb
+8
-4
ada/buildsupport_utils.adb
ada/buildsupport_utils.adb
+4
-2
ada/buildsupport_utils.ads
ada/buildsupport_utils.ads
+60
-15
ada/imported_routines.ads
ada/imported_routines.ads
+2
-1
buildsupport.gpr
buildsupport.gpr
+5
-4
No files found.
Makefile
View file @
b9fe60b0
...
...
@@ -16,11 +16,11 @@ checkVersion:
$(exec)
:
$(sources)
ifeq
($(UNAME), Linux)
@
echo
"package
buildsupport_v
ersion is"
>
ada/buildsupport_version.ads.new
@
echo
-n
"
buildsupport_release : constant s
tring :=
\"
"
>>
ada/buildsupport_version.ads.new
@
echo
"package
Buildsupport_V
ersion is"
>
ada/buildsupport_version.ads.new
@
echo
-n
"
Buildsupport_Release : constant S
tring :=
\"
"
>>
ada/buildsupport_version.ads.new
@
git log
--oneline
|
head
-1
|
cut
-f1
-d
' '
|
tr
-d
'\012'
>>
ada/buildsupport_version.ads.new
@
echo
"
\"
;"
>>
ada/buildsupport_version.ads.new
@
echo
-n
"end
buildsupport_v
ersion;"
>>
ada/buildsupport_version.ads.new
@
echo
-n
"end
Buildsupport_V
ersion;"
>>
ada/buildsupport_version.ads.new
@
if
[
!
-f
"ada/buildsupport_version.ads"
]
;
then
\
mv
ada/buildsupport_version.ads.new ada/buildsupport_version.ads
;
\
else
\
...
...
@@ -39,7 +39,8 @@ endif
#clang -c -Wall -Werror -Iinclude c/*.c
$(CC)
-c
-W
-g3
-g
-Wall
-Werror
-Wextra
-Werror
=
format-security
-Wconversion
-Wno-deprecated
-Winit-self
-Wsign-conversion
-Wredundant-decls
-Wvla
-Wshadow
-Wlogical-op
-Wmissing-include-dirs
-Winit-self
-Wpointer-arith
-Wcast-qual
-Wcast-align
-Wno-error
=
old-style-cast
-Wundef
-std
=
c99
-pedantic
-Iinclude
c/
*
.c
mv
*.o
tmpBuild/
ADA_PROJECT_PATH
=
`
ocarina-config
--prefix
`
/lib/gnat:
$$
ADA_PROJECT_PATH
$(gnatpath)
gnatmake
-x
-g
$(exec)
-p
-P
buildsupport.gpr
-XBUILD
=
"debug"
#ADA_PROJECT_PATH=`ocarina-config --prefix`/lib/gnat:$$ADA_PROJECT_PATH $(gnatpath)gnatmake -x -g $(exec) -p -P buildsupport.gpr -XBUILD="debug"
ADA_PROJECT_PATH
=
`
ocarina-config
--prefix
`
/lib/gnat:
$$
ADA_PROJECT_PATH
$(gnatpath)
gprbuild
-x
-g
$(exec)
-p
-P
buildsupport.gpr
-XBUILD
=
"debug"
# strip $(exec)
install
:
...
...
ada/buildsupport.adb
View file @
b9fe60b0
...
...
@@ -11,8 +11,10 @@ with Ada.Strings.Unbounded,
GNAT
.
OS_Lib
,
Errors
,
Locations
,
Ocarina
.
Namet
,
Ocarina
.
Types
,
-- Ocarina.Namet,
-- Ocarina.Types,
Namet
,
Types
,
System
.
Assertions
,
Ocarina
.
Analyzer
,
Ocarina
.
Backends
.
Properties
,
...
...
@@ -36,8 +38,10 @@ use Ada.Strings.Unbounded,
Ada
.
Text_IO
,
Ada
.
Characters
.
Handling
,
Locations
,
Ocarina
.
Namet
,
Ocarina
.
Types
,
-- Ocarina.Namet,
-- Ocarina.Types,
Namet
,
Types
,
Ocarina
,
Ocarina
.
Analyzer
,
Ocarina
.
Backends
.
Properties
,
...
...
ada/buildsupport_utils.adb
View file @
b9fe60b0
...
...
@@ -5,7 +5,8 @@
with
Ada
.
Text_IO
;
with
GNAT
.
OS_Lib
;
with
Ocarina
.
Namet
;
-- with Ocarina.Namet;
with
Namet
;
with
Ocarina
.
Configuration
;
with
Ocarina
.
AADL_Values
;
with
Ocarina
.
Instances
.
Queries
;
...
...
@@ -19,7 +20,8 @@ package body Buildsupport_Utils is
use
Ada
.
Text_IO
;
use
GNAT
.
OS_Lib
;
use
Ocarina
.
Namet
;
-- use Ocarina.Namet;
use
Namet
;
use
Ocarina
.
Instances
.
Queries
;
use
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
use
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
...
...
ada/buildsupport_utils.ads
View file @
b9fe60b0
...
...
@@ -4,16 +4,22 @@
-- Set of helper functions for buildsupport
with
Ocarina
,
Ocarina
.
Types
,
-- Ocarina.Types,
Types
,
Ocarina
.
Backends
.
Properties
,
Ada
.
Containers
.
Indefinite_Ordered_Maps
,
Ada
.
Containers
.
Vectors
;
Ada
.
Containers
.
Indefinite_Vectors
,
Ada
.
Strings
.
Unbounded
;
use
Ocarina
,
Ada
.
Containers
;
Ocarina
.
Backends
.
Properties
,
Ada
.
Containers
,
Ada
.
Strings
.
Unbounded
;
package
Buildsupport_Utils
is
use
Ocarina
.
Types
;
-- use Ocarina.Types;
use
Types
;
procedure
Banner
;
...
...
@@ -33,8 +39,7 @@ package Buildsupport_Utils is
Sporadic_Operation
,
Unknown_Operation
);
function
Get_RCM_Operation_Kind
(
E
:
Node_Id
)
function
Get_RCM_Operation_Kind
(
E
:
Node_Id
)
return
Supported_RCM_Operation_Kind
;
function
Get_RCM_Operation
(
E
:
Node_Id
)
return
Node_Id
;
...
...
@@ -61,7 +66,8 @@ package Buildsupport_Utils is
ASN1_Unknown
);
package
Property_Maps
is
new
Indefinite_Ordered_Maps
(
String
,
String
);
package
String_Vectors
is
new
Vectors
(
Natural
,
String
);
use
Property_Maps
;
package
String_Vectors
is
new
Indefinite_Vectors
(
Natural
,
String
);
function
Get_ASN1_Basic_Type
(
E
:
Node_Id
)
return
Supported_ASN1_Basic_Type
;
...
...
@@ -75,25 +81,64 @@ package Buildsupport_Utils is
function
Get_Properties_Map
(
D
:
Node_Id
)
return
Property_Maps
.
Map
;
type
Taste_Interface
is
-- Types needed to build the AST of the TASTE Interface View in Ada
type
Parameter_Direction
is
(
param_in
,
param_out
);
type
ASN1_Parameter
is
record
null
;
Name
:
Unbounded_String
;
Sort
:
Unbounded_String
;
ASN1_Module
:
Unbounded_String
;
ASN1_Basic_Type
:
Supported_ASN1_Basic_Type
;
ASN1_File_Name
:
Unbounded_String
;
Encoding
:
Supported_ASN1_Encoding
;
Direction
:
Parameter_Direction
;
end
record
;
subtype
Taste_Provided_Interface
is
Taste_Interface
;
subtype
Taste_Required_Interface
is
Taste_Interface
;
package
Parameters
is
new
Indefinite_Vectors
(
Natural
,
ASN1_Parameter
);
package
Interfaces
is
new
Vectors
(
Natural
,
Taste_Interface
);
type
Taste_Interface
is
record
Name
:
Unbounded_String
;
In_Parameters
:
Parameters
.
Vector
;
Out_Parameters
:
Parameters
.
Vector
;
RCM
:
Supported_RCM_Operation_Kind
;
Period_Or_MIAT
:
Natural
;
WCET
:
Natural
;
WCET_Unit
:
Unbounded_String
;
Queue_Size
:
Natural
;
end
record
;
package
Interfaces
is
new
Indefinite_Vectors
(
Natural
,
Taste_Interface
);
type
Taste_Function
is
type
Taste_
Terminal_
Function
is
record
Name
_Full_Case
:
String
;
Name
:
Unbounded_
String
;
Language
:
Supported_Source_Language
;
Zip_File
:
String
;
Zip_File
:
Unbounded_
String
;
Context_Params
:
Property_Maps
.
Map
;
Timers
:
String_Vectors
.
Vector
;
Provided
:
Interfaces
.
Vector
;
Required
:
Interfaces
.
Vector
;
end
record
;
package
Functions
is
new
Indefinite_Vectors
(
Natural
,
Taste_Terminal_Function
);
type
Connection
is
record
Source_Function
:
Taste_Terminal_Function
;
Dest_Function
:
Taste_Terminal_Function
;
Source_RI
:
Taste_Interface
;
Dest_PI
:
Taste_Interface
;
end
record
;
package
Channels
is
new
Indefinite_Vectors
(
Natural
,
Connection
);
type
Complete_Interface_View
is
limited
record
Flat_Functions
:
Functions
.
Vector
;
Connections
:
Channels
.
Vector
;
end
record
;
end
Buildsupport_Utils
;
ada/imported_routines.ads
View file @
b9fe60b0
...
...
@@ -2,7 +2,8 @@
-- (c) 2015 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
with
Ocarina
.
Types
;
use
Ocarina
.
Types
;
-- with Ocarina.Types; use Ocarina.Types;
with
Types
;
use
Types
;
package
Imported_Routines
is
...
...
buildsupport.gpr
View file @
b9fe60b0
...
...
@@ -9,10 +9,11 @@ project BuildSupport is
for
Main
use
(
"buildsupport.adb"
);
for
Languages
use
(
"Ada"
,
"C"
);
for
Source_Files
use
(
"c_backend.c"
,
"sdl_gateway.c"
,
"my_types.h"
,
"build_sdl_glue.c"
,
"imported_routines.ads"
,
"buildsupport.adb"
,
"buildsupport_utils.ads"
,
"buildsupport_utils.adb"
,
"simulink_gateway.c"
);
for
Source_Files
use
(
"imported_routines.ads"
,
"buildsupport.adb"
,
"buildsupport_utils.ads"
,
"buildsupport_utils.adb"
,
"buildsupport_version.ads"
);
package
Builder
is
for
Default_Switches
(
"ada"
)
use
(
"-m"
);
...
...
Write
Preview
Markdown
is supported
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