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
buildsupport
Commits
ab23a8cf
Commit
ab23a8cf
authored
Jun 20, 2017
by
Maxime Perrotin
Browse files
Remove dependency on env variable ASN1SCC
parent
abe758a2
Changes
8
Hide whitespace changes
Inline
Side-by-side
c/ada_wrappers_backend.c
View file @
ab23a8cf
...
@@ -657,9 +657,9 @@ void add_RI_to_ada_wrappers(Interface * i)
...
@@ -657,9 +657,9 @@ void add_RI_to_ada_wrappers(Interface * i)
fprintf
(
b
,
"%d"
,
calltmp
->
value
->
thread_id
);
fprintf
(
b
,
"%d"
,
calltmp
->
value
->
thread_id
);
}
}
else
if
(
0
==
count
)
{
else
if
(
0
==
count
)
{
ERROR
(
"
** Error: f
unction
\"
%s
\"
is not called by anyone (dead code)!
\n
"
,
i
->
parent_fv
->
name
);
ERROR
(
"
[ERROR] F
unction
\"
%s
\"
is not called by anyone (dead code)!
\n
"
,
i
->
parent_fv
->
name
);
ERROR
(
"** This is not supported by the Ada runtime. You may have to change two things:
\n
"
);
ERROR
(
"** This is not supported by the Ada runtime. You may have to change two things:
\n
"
);
ERROR
(
"** 1)
(In any case) u
se the -p flag when calling the TASTE orchestrator, and
\n
"
);
ERROR
(
"** 1)
U
se the -p flag when calling the TASTE orchestrator
to use the C runtime
, and
\n
"
);
ERROR
(
"** 2) In your deployment view, if applicable, choose a non-Ada runtime
\n
"
);
ERROR
(
"** 2) In your deployment view, if applicable, choose a non-Ada runtime
\n
"
);
ERROR
(
"** (do not use
\"
LEON_ORK
\"
;
\"
Native
\"
or
\"
LEON_RTEMS
\"
are OK)
\n\n
"
);
ERROR
(
"** (do not use
\"
LEON_ORK
\"
;
\"
Native
\"
or
\"
LEON_RTEMS
\"
are OK)
\n\n
"
);
exit
(
-
1
);
exit
(
-
1
);
...
...
c/asn2datamodel.c
View file @
ab23a8cf
...
@@ -68,7 +68,7 @@ void Call_asn2dataModel(FV * fv)
...
@@ -68,7 +68,7 @@ void Call_asn2dataModel(FV * fv)
case
EEXIST
:
case
EEXIST
:
break
;
break
;
default:
default:
ERROR
(
"
Error
creating directory %s
\n
"
,
dataviewpath
);
ERROR
(
"
[ERROR] Issue
creating directory %s
\n
"
,
dataviewpath
);
add_error
();
add_error
();
return
;
return
;
break
;
break
;
...
@@ -87,7 +87,7 @@ void Call_asn2dataModel(FV * fv)
...
@@ -87,7 +87,7 @@ void Call_asn2dataModel(FV * fv)
}
}
if
(
!
file_exists
(
dataview_path
,
dataview_uniq
))
{
if
(
!
file_exists
(
dataview_path
,
dataview_uniq
))
{
ERROR
(
"
** Error:
%s/%s not found
\n
"
,
dataview_path
,
dataview_uniq
);
ERROR
(
"
[ERROR]
%s/%s not found
\n
"
,
dataview_path
,
dataview_uniq
);
exit
(
-
1
);
exit
(
-
1
);
}
}
...
@@ -100,7 +100,7 @@ void Call_asn2dataModel(FV * fv)
...
@@ -100,7 +100,7 @@ void Call_asn2dataModel(FV * fv)
if
(
system
(
command
))
{
if
(
system
(
command
))
{
ERROR
ERROR
(
"
** Error:
Check this command line and make sure all files are valid:
\n
%s
\n
"
,
command
);
(
"
[ERROR]
Check this command line and make sure all files are valid:
\n
%s
\n
"
,
command
);
exit
(
-
1
);
exit
(
-
1
);
}
}
free
(
command
);
free
(
command
);
...
...
c/c_ast_construction.c
View file @
ab23a8cf
...
@@ -337,8 +337,8 @@ void Set_Context_Variable (char *name, size_t len1, char *type, size_t len2,
...
@@ -337,8 +337,8 @@ void Set_Context_Variable (char *name, size_t len1, char *type, size_t len2,
/* First check the validity of the ASN.1 module name */
/* First check the validity of the ASN.1 module name */
if
(
!
strncmp
(
mod
,
"nomodule"
,
len4
))
{
if
(
!
strncmp
(
mod
,
"nomodule"
,
len4
))
{
ERROR
(
"
** Error:
The dataview you are using was generated using an old version
\n
"
);
ERROR
(
"
[ERROR]
The dataview you are using was generated using an old version
\n
"
);
ERROR
(
"
of the toolchain. You must update it by calling taste-update-data-view
\n
"
);
ERROR
(
" of the toolchain. You must update it by calling taste-update-data-view
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
}
}
/* Temporary for the SMP2 support until version of taste-IV withtout obj suffixes */
/* Temporary for the SMP2 support until version of taste-IV withtout obj suffixes */
...
@@ -451,7 +451,7 @@ void Set_Timer_Resolution(char *val, size_t len) {
...
@@ -451,7 +451,7 @@ void Set_Timer_Resolution(char *val, size_t len) {
char
*
str
=
make_string
(
"%.*s"
,
len
,
val
);
char
*
str
=
make_string
(
"%.*s"
,
len
,
val
);
int
time_res
=
(
int
)
strtol
(
str
,
(
char
**
)
NULL
,
10
);
int
time_res
=
(
int
)
strtol
(
str
,
(
char
**
)
NULL
,
10
);
if
(
0
!=
errno
)
{
if
(
0
!=
errno
)
{
ERROR
(
"
** Error:
Timer resolution must be a valid number
\n
"
);
ERROR
(
"
[ERROR]
Timer resolution must be a valid number
\n
"
);
}
}
else
{
else
{
printf
(
"[INFO] Set timer resolution to %d
\n
"
,
time_res
);
printf
(
"[INFO] Set timer resolution to %d
\n
"
,
time_res
);
...
@@ -496,8 +496,8 @@ void Set_OutDir(char *o, size_t len)
...
@@ -496,8 +496,8 @@ void Set_OutDir(char *o, size_t len)
/* create the root output directory */
/* create the root output directory */
if
(
-
1
==
mkdir
((
system_ast
->
context
)
->
output
,
0700
)
if
(
-
1
==
mkdir
((
system_ast
->
context
)
->
output
,
0700
)
&&
EEXIST
!=
errno
)
{
&&
EEXIST
!=
errno
)
{
ERROR
(
"
** Error:
output directory could not be created!
\n
"
);
ERROR
(
"
[ERROR]
output directory could not be created!
\n
"
);
ERROR
(
"
Current directory will be used instead...
\n
"
);
ERROR
(
" Current directory will be used instead...
\n
"
);
free
((
system_ast
->
context
)
->
output
);
free
((
system_ast
->
context
)
->
output
);
(
system_ast
->
context
)
->
output
=
NULL
;
(
system_ast
->
context
)
->
output
=
NULL
;
}
}
...
@@ -782,7 +782,7 @@ void Add_Binding(char *b, size_t length)
...
@@ -782,7 +782,7 @@ void Add_Binding(char *b, size_t length)
Create_Aplc_binding
(
&
binding
);
Create_Aplc_binding
(
&
binding
);
if
(
NULL
==
binding
)
{
if
(
NULL
==
binding
)
{
ERROR
(
"
** Error
in Add_Binding->Create_Aplc_binding
\n
"
);
ERROR
(
"
[ERROR]
in Add_Binding->Create_Aplc_binding
\n
"
);
return
;
return
;
}
}
...
@@ -802,7 +802,7 @@ void Add_Binding(char *b, size_t length)
...
@@ -802,7 +802,7 @@ void Add_Binding(char *b, size_t length)
APPEND_TO_LIST
(
Aplc_binding
,
process
->
bindings
,
binding
);
APPEND_TO_LIST
(
Aplc_binding
,
process
->
bindings
,
binding
);
result_fv
->
process
=
process
;
result_fv
->
process
=
process
;
}
else
{
}
else
{
ERROR
(
"
** Error:
Binding references a non-existing FV...(%s)
\n
"
,
ERROR
(
"
[ERROR]
Binding references a non-existing FV...(%s)
\n
"
,
binding_name
);
binding_name
);
add_error
();
add_error
();
}
}
...
...
c/context_parameters.c
View file @
ab23a8cf
...
@@ -31,7 +31,6 @@ void Process_Context_Parameters(FV *fv)
...
@@ -31,7 +31,6 @@ void Process_Context_Parameters(FV *fv)
FILE
*
asn
=
NULL
;
FILE
*
asn
=
NULL
;
char
*
fv_no_underscore
=
NULL
;
char
*
fv_no_underscore
=
NULL
;
char
*
cp_no_underscore
=
NULL
;
char
*
cp_no_underscore
=
NULL
;
char
*
asn1scc_path
=
NULL
;
int
will_fail
=
0
;
int
will_fail
=
0
;
char
*
dataview_uniq
=
NULL
;
char
*
dataview_uniq
=
NULL
;
char
*
dataview_path
=
NULL
;
char
*
dataview_path
=
NULL
;
...
@@ -142,13 +141,6 @@ void Process_Context_Parameters(FV *fv)
...
@@ -142,13 +141,6 @@ void Process_Context_Parameters(FV *fv)
/*
/*
* Next part: call asn1.exe with the newly-created ASN.1 file
* Next part: call asn1.exe with the newly-created ASN.1 file
*/
*/
asn1scc_path
=
getenv
(
"ASN1SCC"
);
if
(
NULL
==
asn1scc_path
)
{
ERROR
(
"** Error: Environment variable ASN1SCC not set
\n
"
);
build_string
(
&
asn1scc_path
,
"asn1.exe"
,
strlen
(
"asn1.exe"
));
will_fail
=
1
;
}
dataview_uniq
=
getASN1DataView
();
dataview_uniq
=
getASN1DataView
();
dataview_path
=
getDataViewPath
();
dataview_path
=
getDataViewPath
();
...
@@ -168,8 +160,7 @@ void Process_Context_Parameters(FV *fv)
...
@@ -168,8 +160,7 @@ void Process_Context_Parameters(FV *fv)
}
}
command
=
make_string
command
=
make_string
(
"mono %s -%s -typePrefix asn1Scc -o %s/%s %s %s/%s"
,
(
"mono $(which asn1.exe) -%s -typePrefix asn1Scc -o %s/%s %s %s/%s"
,
asn1scc_path
,
ada
==
fv
->
language
?
"Ada"
:
"c"
,
ada
==
fv
->
language
?
"Ada"
:
"c"
,
OUTPUT_PATH
,
OUTPUT_PATH
,
fv
->
name
,
fv
->
name
,
...
...
c/driver_configuration.c
View file @
ab23a8cf
...
@@ -26,24 +26,22 @@ void Process_Node_Driver_Configuration(Device *device, char *node)
...
@@ -26,24 +26,22 @@ void Process_Node_Driver_Configuration(Device *device, char *node)
char
*
command
=
NULL
;
char
*
command
=
NULL
;
FILE
*
asn
=
NULL
;
FILE
*
asn
=
NULL
;
char
*
device_no_underscore
=
NULL
;
char
*
device_no_underscore
=
NULL
;
char
*
asn1scc_path
=
NULL
;
int
will_fail
=
0
;
ASN1_Filename
*
filename
=
NULL
;
ASN1_Filename
*
filename
=
NULL
;
char
*
driver_conf_path
=
NULL
;
char
*
driver_conf_path
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
if
(
NULL
==
device
->
configuration
||
NULL
==
device
->
asn1_filename
)
return
;
if
(
NULL
==
device
->
configuration
||
NULL
==
device
->
asn1_filename
)
return
;
/*
/*
* Make sure the device name has no underscore (to be ASN.1-friendly)
* Make sure the device name has no underscore (to be ASN.1-friendly)
*/
*/
device_no_underscore
=
device_no_underscore
=
underscore_to_dash
(
device
->
name
,
strlen
(
device
->
name
));
underscore_to_dash
(
device
->
name
,
strlen
(
device
->
name
));
/*
/*
* Create the ASN.1 file to store the configuration variable
* Create the ASN.1 file to store the configuration variable
*/
*/
filename
=
make_string
(
"DeviceConfig-%s.asn"
,
device_no_underscore
);
filename
=
make_string
(
"DeviceConfig-%s.asn"
,
device_no_underscore
);
asn
=
fopen
(
filename
,
"wt"
);
asn
=
fopen
(
filename
,
"wt"
);
assert
(
NULL
!=
asn
);
assert
(
NULL
!=
asn
);
...
@@ -56,31 +54,25 @@ void Process_Node_Driver_Configuration(Device *device, char *node)
...
@@ -56,31 +54,25 @@ void Process_Node_Driver_Configuration(Device *device, char *node)
fprintf
(
asn
,
"DeviceConfig-%s DEFINITIONS ::=
\n
"
,
device_no_underscore
);
fprintf
(
asn
,
"DeviceConfig-%s DEFINITIONS ::=
\n
"
,
device_no_underscore
);
fprintf
(
asn
,
"BEGIN
\n
"
);
fprintf
(
asn
,
"BEGIN
\n
"
);
/*
/*
* Import the ASN.1 module containing the type definition
* Import the ASN.1 module containing the type definition
*/
*/
fprintf
(
asn
,
"IMPORTS %s FROM %s;
\n\n
"
,
device
->
asn1_typename
,
device
->
asn1_modulename
);
fprintf
(
asn
,
"IMPORTS %s FROM %s;
\n\n
"
,
device
->
asn1_typename
,
device
->
asn1_modulename
);
/*
/*
* Declare a variable of the configuration type.
* Declare a variable of the configuration type.
*/
*/
fprintf
(
asn
,
"
\n
pohidrv-%s-cv %s ::= %s
\n\n
"
,
fprintf
(
asn
,
"
\n
pohidrv-%s-cv %s ::= %s
\n\n
"
,
device_no_underscore
,
device_no_underscore
,
device
->
asn1_typename
,
device
->
asn1_typename
,
device
->
configuration
);
device
->
configuration
);
fprintf
(
asn
,
"END
\n
"
);
fprintf
(
asn
,
"END
\n
"
);
fclose
(
asn
);
fclose
(
asn
);
/*
/*
* Call asn1.exe with the newly-created ASN.1 file
* Call asn1.exe with the newly-created ASN.1 file
*/
*/
asn1scc_path
=
getenv
(
"ASN1SCC"
);
if
(
NULL
==
asn1scc_path
)
{
ERROR
(
"** Error: environment variable ASN1SCC not set
\n
"
);
will_fail
=
1
;
}
driver_conf_path
=
make_string
(
"%s/DriversConfig/"
,
OUTPUT_PATH
);
driver_conf_path
=
make_string
(
"%s/DriversConfig/"
,
OUTPUT_PATH
);
ret
=
mkdir
(
driver_conf_path
,
0700
);
ret
=
mkdir
(
driver_conf_path
,
0700
);
...
@@ -106,24 +98,15 @@ void Process_Node_Driver_Configuration(Device *device, char *node)
...
@@ -106,24 +98,15 @@ void Process_Node_Driver_Configuration(Device *device, char *node)
}
}
command
=
make_string
(
"mono %s -%s -o %s %s %s"
,
command
=
make_string
(
"mono $(which asn1.exe) %s -%s -o %s %s %s"
,
Maxime Perrotin
@maxime-esa
·
Jul 03, 2017
Author
Owner
Forgot to remove the first %s
Forgot to remove the first %s
Please
register
or
sign in
to reply
asn1scc_path
,
C_DRIVER
?
"c -typePrefix __po_hi_c_"
:
"Ada"
,
C_DRIVER
?
"c -typePrefix __po_hi_c_"
:
"Ada"
,
driver_conf_path
,
driver_conf_path
,
filename
,
filename
,
device
->
asn1_filename
);
device
->
asn1_filename
);
ERROR
(
"%s %s
\n
"
,
ERROR
(
"Executing %s
\n
"
,
command
);
will_fail
?
"Because of the above error(s), the following command cannot be executed :
\n
"
:
"Executing"
,
command
);
if
(
will_fail
)
{
ERROR
(
"Fix the errors and restart buildsupport!
\n
"
);
exit
(
-
1
);
}
if
(
!
will_fail
&&
system
(
command
))
{
if
(
system
(
command
))
{
ERROR
(
"The command failed. Try it yourself (correct paths, access to files, etc.)
\n
"
);
ERROR
(
"The command failed. Try it yourself (correct paths, access to files, etc.)
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
}
}
...
...
c/preprocessing_backend.c
View file @
ab23a8cf
...
@@ -375,7 +375,7 @@ void Add_Artificial_Function (Interface *duplicate_pi,
...
@@ -375,7 +375,7 @@ void Add_Artificial_Function (Interface *duplicate_pi,
/* 2) Add the new FV to the binding list of the Process */
/* 2) Add the new FV to the binding list of the Process */
if
(
NULL
==
fv
->
process
)
{
if
(
NULL
==
fv
->
process
)
{
ERROR
(
"
** Error:
function %s is not bound to any process
\n
"
,
ERROR
(
"
[ERROR]
function %s is not bound to any process
\n
"
,
fv
->
name
);
fv
->
name
);
add_error
();
add_error
();
return
;
return
;
...
...
c/semantic_checks.c
View file @
ab23a8cf
...
@@ -25,7 +25,7 @@ void Interface_Semantic_Check(Interface * i)
...
@@ -25,7 +25,7 @@ void Interface_Semantic_Check(Interface * i)
if
(
PI
==
i
->
direction
&&
cyclic
==
i
->
rcm
&&
NULL
!=
i
->
distant_fv
)
{
if
(
PI
==
i
->
direction
&&
cyclic
==
i
->
rcm
&&
NULL
!=
i
->
distant_fv
)
{
ERROR
ERROR
(
"
** Error:
In Function
\"
%s
\"
, interface
\"
%s
\"
is cyclic and should not be connected.
\n
"
,
(
"
[ERROR]
In Function
\"
%s
\"
, interface
\"
%s
\"
is cyclic and should not be connected.
\n
"
,
i
->
parent_fv
->
name
,
i
->
name
);
i
->
parent_fv
->
name
,
i
->
name
);
add_error
();
add_error
();
...
@@ -36,7 +36,7 @@ void Interface_Semantic_Check(Interface * i)
...
@@ -36,7 +36,7 @@ void Interface_Semantic_Check(Interface * i)
&&
(
NULL
!=
i
->
in
||
NULL
!=
i
->
out
))
{
&&
(
NULL
!=
i
->
in
||
NULL
!=
i
->
out
))
{
ERROR
ERROR
(
"
** Error:
In Function
\"
%s
\"
, interface
\"
%s
\"
is cyclic and should not have parameters.
\n
"
,
(
"
[ERROR]
In Function
\"
%s
\"
, interface
\"
%s
\"
is cyclic and should not have parameters.
\n
"
,
i
->
parent_fv
->
name
,
i
->
name
);
i
->
parent_fv
->
name
,
i
->
name
);
add_error
();
add_error
();
...
@@ -53,7 +53,7 @@ void Interface_Semantic_Check(Interface * i)
...
@@ -53,7 +53,7 @@ void Interface_Semantic_Check(Interface * i)
if
(
count_param
>
1
)
{
if
(
count_param
>
1
)
{
ERROR
ERROR
(
"
** Error:
In Function
\"
%s
\"
, sporadic interface
\"
%s
\"
cannot have more than 1 IN param.
\n
"
,
(
"
[ERROR]
In Function
\"
%s
\"
, sporadic interface
\"
%s
\"
cannot have more than 1 IN param.
\n
"
,
i
->
parent_fv
->
name
,
i
->
name
);
i
->
parent_fv
->
name
,
i
->
name
);
add_error
();
add_error
();
}
}
...
@@ -61,7 +61,7 @@ void Interface_Semantic_Check(Interface * i)
...
@@ -61,7 +61,7 @@ void Interface_Semantic_Check(Interface * i)
/* Check that SPO interfaces don't have any OUT parameters */
/* Check that SPO interfaces don't have any OUT parameters */
if
(
NULL
!=
i
->
out
)
{
if
(
NULL
!=
i
->
out
)
{
ERROR
ERROR
(
"
** Error:
In Function
\"
%s
\"
, sporadic interface
\"
%s
\"
cannot have OUT parameters.
\n
"
,
(
"
[ERROR]
In Function
\"
%s
\"
, sporadic interface
\"
%s
\"
cannot have OUT parameters.
\n
"
,
i
->
parent_fv
->
name
,
i
->
name
);
i
->
parent_fv
->
name
,
i
->
name
);
add_error
();
add_error
();
}
}
...
@@ -76,7 +76,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -76,7 +76,7 @@ void Function_Semantic_Check(FV * fv)
{
{
if
(
fv
->
system_ast
->
context
->
glue
&&
NULL
==
fv
->
process
)
{
if
(
fv
->
system_ast
->
context
->
glue
&&
NULL
==
fv
->
process
)
{
ERROR
ERROR
(
"
** Error:
Function
\"
%s
\"
is not bound to any partition.
\n
"
,
(
"
[ERROR]
Function
\"
%s
\"
is not bound to any partition.
\n
"
,
fv
->
name
);
fv
->
name
);
add_error
();
add_error
();
}
}
...
@@ -97,7 +97,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -97,7 +97,7 @@ void Function_Semantic_Check(FV * fv)
);
);
if
(
0
==
count_pi
)
{
if
(
0
==
count_pi
)
{
ERROR
ERROR
(
"
** Error:
Function
\"
%s
\"
shall contain at least one provided interface.
\n
"
,
(
"
[ERROR]
Function
\"
%s
\"
shall contain at least one provided interface.
\n
"
,
fv
->
name
);
fv
->
name
);
add_error
();
add_error
();
}
}
...
@@ -119,7 +119,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -119,7 +119,7 @@ void Function_Semantic_Check(FV * fv)
if
(
1
!=
count_pi
)
{
if
(
1
!=
count_pi
)
{
ERROR
ERROR
(
"
** Error:
%s function
\"
%s
\"
must contain ONE provided interface
\n
"
,
(
"
[ERROR]
%s function
\"
%s
\"
must contain ONE provided interface
\n
"
,
scade
==
fv
->
language
?
"SCADE"
:
"Simulink"
,
fv
->
name
);
scade
==
fv
->
language
?
"SCADE"
:
"Simulink"
,
fv
->
name
);
ERROR
ERROR
(
"** (but possibly several input and output parameters).
\n
"
);
(
"** (but possibly several input and output parameters).
\n
"
);
...
@@ -128,7 +128,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -128,7 +128,7 @@ void Function_Semantic_Check(FV * fv)
if
(
0
!=
count_ri
)
{
if
(
0
!=
count_ri
)
{
ERROR
ERROR
(
"
** Error:
%s function
\"
%s
\"
must NOT contain any required interface
\n
"
,
(
"
[ERROR]
%s function
\"
%s
\"
must NOT contain any required interface
\n
"
,
scade
==
fv
->
language
?
"SCADE"
:
"Simulink"
,
fv
->
name
);
scade
==
fv
->
language
?
"SCADE"
:
"Simulink"
,
fv
->
name
);
ERROR
ERROR
(
"** (use OUT parameters in the interface specification).
\n
"
);
(
"** (use OUT parameters in the interface specification).
\n
"
);
...
@@ -148,7 +148,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -148,7 +148,7 @@ void Function_Semantic_Check(FV * fv)
else
{
else
{
if
(
asynch
==
i
->
synchronism
)
{
if
(
asynch
==
i
->
synchronism
)
{
ERROR
ERROR
(
"
** Error:
Required interface %s of function %s should be PROTECTED or UNPROTECTED
\n
"
,
(
"
[ERROR]
Required interface %s of function %s should be PROTECTED or UNPROTECTED
\n
"
,
i
->
name
,
fv
->
name
);
i
->
name
,
fv
->
name
);
ERROR
ERROR
(
" because it is connected to a function that is using QGen as a source language
\n
"
);
(
" because it is connected to a function that is using QGen as a source language
\n
"
);
...
@@ -161,7 +161,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -161,7 +161,7 @@ void Function_Semantic_Check(FV * fv)
if
(
0
!=
count_ri
)
{
if
(
0
!=
count_ri
)
{
ERROR
ERROR
(
"
** Error:
%s function
\"
%s
\"
must NOT contain any required interface
\n
"
,
(
"
[ERROR]
%s function
\"
%s
\"
must NOT contain any required interface
\n
"
,
qgenc
==
fv
->
language
?
"QGenC"
:
"QGenAda"
,
fv
->
name
);
qgenc
==
fv
->
language
?
"QGenC"
:
"QGenAda"
,
fv
->
name
);
ERROR
ERROR
(
"** (use OUT parameters in the interface specification).
\n
"
);
(
"** (use OUT parameters in the interface specification).
\n
"
);
...
@@ -181,7 +181,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -181,7 +181,7 @@ void Function_Semantic_Check(FV * fv)
if
(
strcmp
(
i
->
name
,
fv
->
name
))
{
if
(
strcmp
(
i
->
name
,
fv
->
name
))
{
ERROR
ERROR
(
"
** Error:
PI
\"
%s
\"
should have the same name as SCADE function
\"
%s
\"\n
"
,
(
"
[ERROR]
PI
\"
%s
\"
should have the same name as SCADE function
\"
%s
\"\n
"
,
i
->
name
,
fv
->
name
);
i
->
name
,
fv
->
name
);
add_error
();
add_error
();
}
}
...
@@ -196,7 +196,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -196,7 +196,7 @@ void Function_Semantic_Check(FV * fv)
FOREACH
(
i
,
Interface
,
fv
->
interfaces
,
{
FOREACH
(
i
,
Interface
,
fv
->
interfaces
,
{
if
(
RI
==
i
->
direction
)
{
if
(
RI
==
i
->
direction
)
{
if
(
NULL
==
i
->
in
)
{
if
(
NULL
==
i
->
in
)
{
ERROR
(
"
** Error:
in GUI function
\"
%s
\"
,
\n
"
ERROR
(
"
[ERROR]
in GUI function
\"
%s
\"
,
\n
"
"** interface
\"
%s
\"
must contain a parameter.
\n
"
,
"** interface
\"
%s
\"
must contain a parameter.
\n
"
,
fv
->
name
,
fv
->
name
,
i
->
name
);
i
->
name
);
...
@@ -204,7 +204,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -204,7 +204,7 @@ void Function_Semantic_Check(FV * fv)
}
}
/* Undefined RCM corresponds to "any type" (=inherited from PI) */
/* Undefined RCM corresponds to "any type" (=inherited from PI) */
if
(
undefined
!=
i
->
rcm
&&
sporadic
!=
i
->
rcm
&&
variator
!=
i
->
rcm
)
{
if
(
undefined
!=
i
->
rcm
&&
sporadic
!=
i
->
rcm
&&
variator
!=
i
->
rcm
)
{
ERROR
(
"
** Error:
All interfaces of GUI
\"
%s
\"\n
"
ERROR
(
"
[ERROR]
All interfaces of GUI
\"
%s
\"\n
"
"** must be SPORADIC (e.g. %s is not).
\n
"
,
"** must be SPORADIC (e.g. %s is not).
\n
"
,
fv
->
name
,
fv
->
name
,
i
->
name
);
i
->
name
);
...
@@ -225,7 +225,7 @@ void Function_Semantic_Check(FV * fv)
...
@@ -225,7 +225,7 @@ void Function_Semantic_Check(FV * fv)
if
(
!
strcmp
(
function
->
name
,
i
->
distant_fv
)
if
(
!
strcmp
(
function
->
name
,
i
->
distant_fv
)
&&
function
->
process
!=
fv
->
process
)
{
&&
function
->
process
!=
fv
->
process
)
{
ERROR
ERROR
(
"
** Error:
Required interface %s of function %s should be SPORADIC
\n
"
,
(
"
[ERROR]
Required interface %s of function %s should be SPORADIC
\n
"
,
i
->
name
,
fv
->
name
);
i
->
name
,
fv
->
name
);
ERROR
ERROR
(
" because it is connected to a function that is bound to a different
\n
"
);
(
" because it is connected to a function that is bound to a different
\n
"
);
...
@@ -259,7 +259,7 @@ void Semantic_Checks()
...
@@ -259,7 +259,7 @@ void Semantic_Checks()
if
(
vhdl
==
binding
->
fv
->
language
)
count
++
;}
if
(
vhdl
==
binding
->
fv
->
language
)
count
++
;}
);
if
(
count
>
1
)
{
);
if
(
count
>
1
)
{
ERROR
ERROR
(
"
** Error:
in a distributed system, a partition can contain only ONE
\n
"
);
(
"
[ERROR]
in a distributed system, a partition can contain only ONE
\n
"
);
ERROR
(
" VHDL component. Partition
\"
%s
\"
has %d.
\n
"
,
ERROR
(
" VHDL component. Partition
\"
%s
\"
has %d.
\n
"
,
process
->
name
,
count
);
add_error
();}
process
->
name
,
count
);
add_error
();}
...
...
c/taste_directives.c
View file @
ab23a8cf
...
@@ -30,8 +30,6 @@ void Process_Directives(FV *fv)
...
@@ -30,8 +30,6 @@ void Process_Directives(FV *fv)
FILE
*
main_c
=
NULL
;
FILE
*
main_c
=
NULL
;
char
*
fv_no_underscore
=
NULL
;
char
*
fv_no_underscore
=
NULL
;
char
*
cp_no_underscore
=
NULL
;
char
*
cp_no_underscore
=
NULL
;
char
*
asn1scc_path
=
NULL
;
int
will_fail
=
0
;
bool
directive_present
=
false
;
bool
directive_present
=
false
;
ASN1_Filename
*
filename
=
NULL
;
ASN1_Filename
*
filename
=
NULL
;
...
@@ -116,13 +114,6 @@ void Process_Directives(FV *fv)
...
@@ -116,13 +114,6 @@ void Process_Directives(FV *fv)
/*
/*
* Next part: call asn1.exe with the newly-created ASN.1 file
* Next part: call asn1.exe with the newly-created ASN.1 file
*/
*/
asn1scc_path
=
getenv
(
"ASN1SCC"
);
if
(
NULL
==
asn1scc_path
)
{
ERROR
(
"** Error: environment variable ASN1SCC not set
\n
"
);
build_string
(
&
asn1scc_path
,
"asn1.exe"
,
strlen
(
"asn1.exe"
));
will_fail
=
1
;
}
char
*
directives_file
=
make_string
(
"$(taste-config --directives)"
);
char
*
directives_file
=
make_string
(
"$(taste-config --directives)"
);
...
@@ -132,26 +123,15 @@ void Process_Directives(FV *fv)
...
@@ -132,26 +123,15 @@ void Process_Directives(FV *fv)
mkdir
(
directive_path
,
0700
);
mkdir
(
directive_path
,
0700
);
free
(
directive_path
);
free
(
directive_path
);
command
=
make_string
(
"mono %s -c -XER -o %s/%s/directives %s %s"
,
command
=
make_string
(
"mono $(which asn1.exe) -c -XER -o %s/%s/directives %s %s"
,
asn1scc_path
,
OUTPUT_PATH
,
OUTPUT_PATH
,
fv
->
name
,
fv
->
name
,
filename
,
filename
,
directives_file
);
directives_file
);
ERROR
(
"%s %s
\n
"
,
ERROR
(
"[INFO] Executing %s
\n
"
,
command
);
will_fail
?
"Because of the above warning(s),"
" the following command cannot be executed :
\n
"
:
"Executing"
,
command
);
if
(
will_fail
)
{
ERROR
(
"Fix the warnings and restart buildsupport,"
" or run it manually, you need it!
\n
"
);
exit
(
-
1
);
}
if
(
!
will_fail
&&
system
(
command
))
{
if
(
system
(
command
))
{
ERROR
(
"The command failed. Try it yourself"
ERROR
(
"The command failed. Try it yourself"
" (correct paths, access to files, etc.)
\n
"
);
" (correct paths, access to files, etc.)
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
...
...
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