Commit 0a8b3119 authored by julien.delange's avatar julien.delange

* backends/ocarina-backends-po_hi_c-deployment.adb

   backends/ocarina-backends-build_utils.adb
   - Fix the path of configuration drivers sources

 * backends/ocarina-backends-po_hi_c-naming.adb
   - Remove the definition of useless arrays



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2056 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 8f092113
...@@ -383,10 +383,11 @@ package body Ocarina.Backends.Build_Utils is ...@@ -383,10 +383,11 @@ package body Ocarina.Backends.Build_Utils is
-- Generate a makefile target to compile C_Sources C files -- Generate a makefile target to compile C_Sources C files
procedure Handle_C_Source procedure Handle_C_Source
(E : Node_Id; (E : Node_Id;
Implem_Name : Name_Id; Implem_Name : Name_Id;
Source_Files : Name_Array; Source_Files : Name_Array;
M : Makefile_Type); M : Makefile_Type;
Custom_Source_Dir : Name_Id := No_Name);
-- Update the makefile structure by adding necessary paths to -- Update the makefile structure by adding necessary paths to
-- sources or libraries provided by the 'Source_Files' array. E -- sources or libraries provided by the 'Source_Files' array. E
-- is the node for which the source files are given, it is used -- is the node for which the source files are given, it is used
...@@ -493,16 +494,16 @@ package body Ocarina.Backends.Build_Utils is ...@@ -493,16 +494,16 @@ package body Ocarina.Backends.Build_Utils is
--------------------- ---------------------
procedure Handle_C_Source procedure Handle_C_Source
(E : Node_Id; (E : Node_Id;
Implem_Name : Name_Id; Implem_Name : Name_Id;
Source_Files : Name_Array; Source_Files : Name_Array;
M : Makefile_Type) M : Makefile_Type;
Custom_Source_Dir : Name_Id := No_Name)
is is
Source_Basename : Name_Id; Source_Basename : Name_Id;
Source_Dirname : Name_Id; Source_Dirname : Name_Id;
S_Name : Name_Id; S_Name : Name_Id;
Binding_Key : constant String := "%user_src_dir%"; Binding_Key : constant String := "%user_src_dir%";
begin begin
-- Ensure the user gives at most one source file (.c) -- Ensure the user gives at most one source file (.c)
...@@ -527,6 +528,10 @@ package body Ocarina.Backends.Build_Utils is ...@@ -527,6 +528,10 @@ package body Ocarina.Backends.Build_Utils is
Source_Basename, Source_Basename,
Source_Dirname); Source_Dirname);
if Custom_Source_Dir /= No_Name then
Source_Dirname := Custom_Source_Dir;
end if;
Set_Str_To_Name_Buffer (Binding_Key); Set_Str_To_Name_Buffer (Binding_Key);
Get_Name_String_And_Append (Source_Dirname); Get_Name_String_And_Append (Source_Dirname);
Get_Name_String_And_Append (M.Node_Name); Get_Name_String_And_Append (M.Node_Name);
...@@ -558,6 +563,10 @@ package body Ocarina.Backends.Build_Utils is ...@@ -558,6 +563,10 @@ package body Ocarina.Backends.Build_Utils is
Source_Basename, Source_Basename,
Source_Dirname); Source_Dirname);
if Custom_Source_Dir /= No_Name then
Source_Dirname := Custom_Source_Dir;
end if;
Get_Name_String (Source_Basename); Get_Name_String (Source_Basename);
if Name_Buffer (Name_Len - 1 .. Name_Len) = ".o" if Name_Buffer (Name_Len - 1 .. Name_Len) = ".o"
...@@ -746,7 +755,10 @@ package body Ocarina.Backends.Build_Utils is ...@@ -746,7 +755,10 @@ package body Ocarina.Backends.Build_Utils is
:= Get_Source_Text (Current_Device); := Get_Source_Text (Current_Device);
begin begin
Handle_C_Source Handle_C_Source
(Current_Device, No_Name, Source_Files, M); (Parent_Subcomponent (Current_Device),
No_Name,
Source_Files,
M);
end; end;
end if; end if;
C := Next_Node (C); C := Next_Node (C);
......
...@@ -540,11 +540,12 @@ package body Ocarina.Backends.PO_HI_C.Deployment is ...@@ -540,11 +540,12 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Device_Implementation := Get_Implementation (Current_Device); Device_Implementation := Get_Implementation (Current_Device);
if Is_Defined_Property if Is_Defined_Property (Device_Implementation,
(Device_Implementation, "taste::configuration_type") then "deployment::configuration_type") then
Configuration_Data Configuration_Data
:= Get_Classifier_Property := Get_Classifier_Property
(Device_Implementation, "taste::configuration_type"); (Device_Implementation,
"deployment::configuration_type");
if Configuration_Data /= No_Node and then if Configuration_Data /= No_Node and then
Is_Defined_Property Is_Defined_Property
(Configuration_Data, "type_source_name") then (Configuration_Data, "type_source_name") then
......
...@@ -614,41 +614,6 @@ package body Ocarina.Backends.PO_HI_C.Naming is ...@@ -614,41 +614,6 @@ package body Ocarina.Backends.PO_HI_C.Naming is
null; null;
end case; end case;
N := Make_Expression
(Left_Expr =>
Make_Variable_Declaration
(Defining_Identifier =>
Make_Array_Declaration
(Defining_Identifier =>
RE (RE_Node_Port),
Array_Size =>
RE (RE_Nb_Nodes)),
Used_Type =>
RE (RE_Inetport_T)),
Operator => Op_Equal,
Right_Expr =>
Inetport_Enumerator_List);
Append_Node_To_List
(N, CTN.Declarations (Current_File));
N := Make_Expression
(Left_Expr =>
Make_Variable_Declaration
(Defining_Identifier =>
Make_Array_Declaration
(Defining_Identifier =>
RE (RE_Node_Addr),
Array_Size =>
RE (RE_Nb_Nodes)),
Used_Type =>
RE (RE_Inetaddr_T)),
Operator => Op_Equal,
Right_Expr =>
Inetaddr_Enumerator_List);
Append_Node_To_List
(N, CTN.Declarations (Current_File));
N := Make_Expression N := Make_Expression
(Left_Expr => (Left_Expr =>
Make_Variable_Declaration Make_Variable_Declaration
......
Markdown is supported
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