Commit baea5515 authored by Maxime Perrotin's avatar Maxime Perrotin
parents f57e80a5 ad99c632
......@@ -43,7 +43,8 @@ property set Deployment is
VXWORKS, -- VXWORKS
FREERTOS, -- FREERTOS
MSP430_FREERTOS, -- MSP430 board with FreeRTOS
AIR -- AIR Hypervisor, by GMV
AIR, -- AIR Hypervisor, by GMV
AIR_IOP -- AIR IOP partition
);
-- Supported platforms
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2018-2019 ESA & ISAE. --
-- Copyright (C) 2018-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -160,11 +160,13 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
P : Node_Id;
Q : Node_Id;
F : Node_Id;
Personnality : Supported_Execution_Platform;
begin
Associated_Processor := Get_Bound_Processor (E);
Associated_Memory := Get_Bound_Memory (E);
Associated_Module :=
Parent_Component (Parent_Subcomponent (Associated_Processor));
Personnality := Get_Execution_Platform (Associated_Processor);
-- Some checks on the model in order to make sure that
-- everything is correctly defined.
......@@ -368,8 +370,16 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
PartitionConfiguration := Make_XML_Node ("PartitionConfiguration");
XTU.Add_Attribute ("Personality", "RTEMS5",
PartitionConfiguration); -- XXX hardcoded
if Personnality = Platform_AIR then
XTU.Add_Attribute ("Personality", "RTEMS5",
PartitionConfiguration);
elsif Personnality = Platform_AIR_IOP then
XTU.Add_Attribute ("Personality", "Bare",
PartitionConfiguration);
else
raise Program_Error with "Unsupported platform " & Personnality'Img;
end if;
XTU.Add_Attribute ("Cores", "1",
PartitionConfiguration); -- XXX hardcoded
......@@ -381,10 +391,17 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
Libs_Node := Make_XML_Node ("Libs");
Append_Node_To_List (Libs_Node, XTN.Subitems (Partitionconfiguration));
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name ("LIBAIR; IMASPEX; LIBPRINTF")),
XTN.Subitems (Libs_Node));
if Personnality = Platform_AIR then
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name ("LIBAIR; IMASPEX; LIBPRINTF")),
XTN.Subitems (Libs_Node));
elsif Personnality = Platform_AIR_IOP then
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name ("LIBIOP")),
XTN.Subitems (Libs_Node));
end if;
-- Devices node, child of PartitionConfiguration
......@@ -423,12 +440,18 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
Permissions_Node := Make_XML_Node ("Permissions");
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name
("FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;"
& "SET_TOD; SET_PARTITION_MODE;")), -- XXX hardcoded
XTN.Subitems (Permissions_Node));
if Personnality = Platform_AIR then
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name
("FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;"
& "SET_TOD; SET_PARTITION_MODE;")), -- XXX hardcoded
XTN.Subitems (Permissions_Node));
elsif Personnality = Platform_AIR_IOP then
Append_Node_To_List
(Make_Defining_Identifier (Get_String_Name ("SUPERVISOR;")),
XTN.Subitems (Permissions_Node));
end if;
Append_Node_To_List (Permissions_Node,
XTN.Subitems (Partitionconfiguration));
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -2433,6 +2433,11 @@ package body Ocarina.Backends.Ada_Tree.Nutils is
N := Make_Ada_Comment (Name_Find);
Append_Node_To_List (N, Package_Header);
Set_Str_To_Name_Buffer
(SCM_Version.all);
N := Make_Ada_Comment (Name_Find);
Append_Node_To_List (N, Package_Header);
Set_Str_To_Name_Buffer
("Do NOT hand-modify this file, as your --");
N := Make_Ada_Comment (Name_Find);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -921,6 +921,11 @@ package body Ocarina.Backends.C_Tree.Nutils is
N := Make_C_Comment (Name_Find);
Append_Node_To_List (N, Header);
Set_Str_To_Name_Buffer
(SCM_Version.all);
N := Make_C_Comment (Name_Find);
Append_Node_To_List (N, Header);
Set_Str_To_Name_Buffer
("Do NOT hand-modify this file, as your ");
N := Make_C_Comment (Name_Find);
......
......@@ -1482,7 +1482,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line
("# This Makefile has been generated automatically #");
Write_Line
("# by the Ocarina AADL toolsuite. #");
("# by the Ocarina AADL toolsuite #");
Write_Line ("# " & SCM_Version.all & ". #");
Write_Line
("# Do not edit this file, all your changes will #");
Write_Line
......@@ -1584,7 +1585,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line ("###################################################");
Write_Line ("# This Makefile has been generated automatically #");
Write_Line ("# by the Ocarina AADL toolsuite. #");
Write_Line ("# by the Ocarina AADL toolsuite #");
Write_Line ("# " & SCM_Version.all & ". #");
Write_Line ("# Do not edit this file, all your changes will #");
Write_Line ("# be overridden at the next code generation. #");
Write_Line ("###################################################");
......@@ -1761,7 +1763,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line ("###################################################");
Write_Line ("# This Makefile has been generated automatically #");
Write_Line ("# by the Ocarina AADL toolsuite. #");
Write_Line ("# by the Ocarina AADL toolsuite #");
Write_Line ("# " & SCM_Version.all & ". #");
Write_Line ("# Do not edit this file, all your changes will #");
Write_Line ("# be overridden at the next code generation. #");
Write_Line ("###################################################");
......@@ -2946,7 +2949,8 @@ package body Ocarina.Backends.Build_Utils is
Write_Line
("-- This project file has been generated automatically --");
Write_Line
("-- by the Ocarina AADL toolsuite. --");
("-- by the Ocarina AADL toolsuite --");
Write_Line ("-- " & SCM_Version.all & " --");
Write_Line
("-- Do not edit this file since all your changes will --");
Write_Line
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -334,6 +334,7 @@ package body Ocarina.Backends.Properties is
Platform_GNAT_Runtime_Name : Name_Id;
Platform_AIR_Name : Name_Id;
Platform_MSP430_FREERTOS_Name : Name_Id;
Platform_Air_IOP_Name : Name_Id;
Transport_BSD_Sockets_Name : Name_Id;
Transport_SpaceWire_Name : Name_Id;
......@@ -2515,6 +2516,8 @@ package body Ocarina.Backends.Properties is
return Platform_AIR;
elsif P_Name = Platform_MSP430_FREERTOS_Name then
return Platform_MSP430_FREERTOS;
elsif P_Name = Platform_AIR_IOP_Name then
return Platform_AIR_IOP;
else
return Platform_None;
end if;
......@@ -3082,6 +3085,7 @@ package body Ocarina.Backends.Properties is
Platform_GNAT_Runtime_Name := Get_String_Name ("gnat_runtime");
Platform_AIR_Name := Get_String_Name ("air");
Platform_MSP430_FREERTOS_Name := Get_String_Name ("msp430_freertos");
Platform_AIR_IOP_Name := Get_String_Name ("air_iop");
Transport_BSD_Sockets_Name := Get_String_Name ("bsd_sockets");
Transport_SpaceWire_Name := Get_String_Name ("spacewire");
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -568,6 +568,7 @@ package Ocarina.Backends.Properties is
Platform_GNAT_Runtime,
Platform_AIR,
Platform_MSP430_FREERTOS,
Platform_AIR_IOP,
Platform_None); -- Unspecified
function Get_Execution_Platform
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -241,7 +241,10 @@ package body Ocarina.Backends.Utils is
& Simple_Name (Simple_Name (Directory_Entry)));
when Directory =>
if Simple_Name (Simple_Name (Directory_Entry)) /= "" then
if Simple_Name (Simple_Name (Directory_Entry)) /= "" and then
Simple_Name (Simple_Name (Directory_Entry)) /= ".." and then
Simple_Name (Simple_Name (Directory_Entry)) /= "."
then
Copy_Directory
(Full_Name (Directory_Entry),
Compose (Dest, Simple_Name (Directory_Entry)));
......
......@@ -115,6 +115,8 @@ package Ocarina.Backends is
Scenario_Dir : String_Ptr;
-- Path to scenario directory, required to get source path to user code
SCM_Version : String_Ptr;
Compile_Generated_Sources : aliased Boolean := False;
Remove_Generated_Sources : aliased Boolean := False;
Do_Coverage_Test : aliased Boolean := False;
......
......@@ -47,7 +47,7 @@ with Ocarina.Analyzer;
with Ocarina.Options; use Ocarina.Options;
with Ocarina.Parser; use Ocarina.Parser;
-- with GNAT.Compiler_Version;
with GNAT.Compiler_Version;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with GNAT.Source_Info;
with Ada.Command_Line; use Ada.Command_Line;
......@@ -287,7 +287,7 @@ package body Ocarina.Configuration is
-------------
procedure Version is
-- package Compiler_Version is new GNAT.Compiler_Version;
package Compiler_Version is new GNAT.Compiler_Version;
begin
Write_Line
......@@ -297,7 +297,7 @@ package body Ocarina.Configuration is
Ocarina_Last_Configure_Year &
" ESA & ISAE");
Write_Line ("Build date: " & Ocarina_Last_Configure_Date);
-- Write_Line ("Compiled with: " & Compiler_Version.Version);
Write_Line ("Compiled with: " & Compiler_Version.Version);
end Version;
end Ocarina.Configuration;
......@@ -603,7 +603,7 @@ begin
Language := Get_String_Name ("aadl");
Default_AADL_Version := Get_Default_AADL_Version;
AADL_Version := Default_AADL_Version;
SCM_Version := new String'(Ocarina_Revision);
-- Process the command line
Ocarina.Cmd_Line.Process;
......
......@@ -74,7 +74,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -74,7 +74,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -74,7 +74,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -78,7 +78,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -78,7 +78,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -78,7 +78,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -78,7 +78,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
......@@ -78,7 +78,7 @@ property set Deployment is
Protocol : Deployment::Protocol_Type
applies to (system);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR);
Allowed_Execution_Platform : type enumeration (Native, Native_Compcert, bench, GNAT_Runtime, LEON_ORK, LEON_RTEMS, LEON_RTEMS_POSIX, LEON3_SCOC3, LEON3_XTRATUM, LEON3_XM3, LEON_GNAT, LINUX32, LINUX_DLL, LINUX32_XENOMAI_NATIVE, LINUX32_XENOMAI_POSIX, LINUX64, ERC32_ORK, X86_RTEMS_POSIX, X86_LINUXTASTE, MARTE_OS, WIN32, VXWORKS, FREERTOS, AIR, AIR_IOP);
Execution_Platform : Deployment::Allowed_Execution_Platform
applies to ( all);
......
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