partition.tmplt 5.38 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@            : Partition name (usually the name of the binary)
@@-- @_Threads_@         : Code generated for the threads
@@-- @_Thread_Names_@    : Tag: list of thread names
@@-- @_Node_Name_@       : Name of the node containing this partition
@@-- @_Blocks_@          : Code generated for protected functions
@@-- @_Block_Names@      : Vector Tag: list of block (user functions) names
@@-- @_Block_Languages@  :   |_ Corresponding implementation language
@@-- @_Coverage_@        : True if user requested code coverage enable
@@-- @_Package_Name_@    : AADL Package name for the target (e.g. ocarina_porocessors_x86)
@@-- @_CPU_Name_@        : CPU Name (e.g. x86_linux)
@@-- @_CPU_Platform_@    : AADL CPU_Platform (e.g. PLATFORM_NATIVE)
@@-- @_CPU_Classifier_@  : AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
@@-- @_VP_Name_@         : Virtual processor name on which the partition is bounded
@@-- @_VP_Platform_@     : Virtual processor platform (e.g. PLATFORM_AIR)
@@-- @_VP_Classifier_@   : Virtual processor classifier
@@-- @_Ada_Runtime_@     : Set if CPU_Platform = PLATFORM_GNAT_RUNTIME
@@-- @_Bound_Functions_@ : List of user functions from Interface view
@@-- @_Thread_Src_Name_@ : Vector tag : connection thread name (source)
@@-- @_Thread_Dst_Name_@ : Vector tag : connection thread name (dest)
@@-- @_Thread_Src_Port_@ : Vector tag : connection port name (source)
@@-- @_Thread_Dst_Port_@ : Vector tag : connection port name (dest)
--  Node name          : @_Name_@
--  Execution platform : @_CPU_Platform_@
project @_CAPITALIZE:Name_@_AIR is

   type Build_Type is ("Debug", "Release");
   Build : Build_Type := external ("CFG", "Debug");

   for Create_Missing_Dirs use "True";
32
   for Object_Dir use "@_LOWER:Name_@_obj";
33
   for Exec_Dir   use "../deploymentview_final/@_Name_@";
Maxime Perrotin's avatar
Maxime Perrotin committed
34
35
36
37
38
39
40
41
42
43
44
45
46

   for Languages use ("Ada", "C");

   for Main use ("main.c");

   package Compiler is
      Common_C_Switches :=
          ("-Wall",
           "-Wextra",
           "-g",
           "-fdiagnostics-show-option",
           "-Wcast-align",
           "-Wswitch",
47
48
           --"-ffunction-sections",
           --"-fdata-sections",
Maxime Perrotin's avatar
Maxime Perrotin committed
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
           "-Wmissing-prototypes",
           "-Wimplicit-function-declaration",
           "-Wstrict-prototypes",
           "-Wnested-externs");

      case Build is
         when "Release" =>
            for Default_Switches ("C") use Common_C_Switches & ("-O2", "-DNDEBUG");
         when "Debug" =>
            for Default_Switches ("C") use Common_C_Switches & ("-D__PO_HI_USE_VCD=1");
      end case;
   end Compiler;

   package Builder is
      for Executable_Suffix use ".exe";
64
      for Executable ("main.c") use "@_Name_@";
Maxime Perrotin's avatar
Maxime Perrotin committed
65
66
67
68
69
70
71
72
73
74
   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
Maxime Perrotin's avatar
Maxime Perrotin committed
75
      ("@_LOWER:Name_@",
76
77
78
       "/home/taste/tool-src/air/air/pmk/core/include",
       "/home/taste/tool-src/air/air/pmk/arch/sparc/include",
       "/home/taste/tool-src/air/air/install/libs/imaspex/include",
Maxime Perrotin's avatar
Maxime Perrotin committed
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
       "../deploymentview_final/polyorb-hi-c/src",
       "../deploymentview_final/polyorb-hi-c/include",
       "../../dataview/C",
@@IF@@ @_Need_Ada_@ = TRUE
       "../../dataview/Ada",
       "ada_code_startup",
@@END_IF@@
@@TABLE@@
@@IF@@ @_Block_Languages_@ = sdl
       "../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/code",
@@ELSE@@
       "../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/src",
@@END_IF@@
       "../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/wrappers",
@@END_TABLE@@
       "../deploymentview_final/@_LOWER:Name_@")
        & external_as_list("ADA_INCLUDE_PATH", ":");

   --  These files are not needed to use POHIC: don' t compile them
   for Excluded_Source_Files use
      ("cheddar_schedule.cc",
       "cheddar_schedule.hh",
       "cheddar_types.hh",
       "config.c",
103
       "init.c",
104
       "marshallers.c",
Maxime Perrotin's avatar
Maxime Perrotin committed
105
       "config_leon3_drvmgr.c",
Maxime Perrotin's avatar
Maxime Perrotin committed
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
       "config_leon4_n2x.c",
       "grspw_api.c",
       "grspw_pkt_lib.c",
       "hyperperriod_config.hh",
       "po_hi_driver_drvmgr_common.c",
       "po_hi_driver_exarm.c",
       "po_hi_driver_exarm_ni_6071e_analog.c",
       "po_hi_driver_exarm_ni_6071e_digital.c",
       "po_hi_driver_keyboard.c",
       "po_hi_driver_leon_eth.c",
       "po_hi_driver_leon_serial.c",
       "po_hi_driver_linux_serial.c",
       "po_hi_driver_rasta_1553_brmlib.c",
       "po_hi_driver_rasta_1553.c",
       "po_hi_driver_rasta_common.c",
       "po_hi_driver_rasta_serial.c",
       "po_hi_driver_rasta_spacewire.c",
       "po_hi_driver_rtems_drvmgr_ethernet.c",
       "po_hi_driver_rtems_drvmgr_serial.c",
       "po_hi_driver_rtems_drvmgr_spacewire.c",
       "po_hi_driver_rtems_ne2000.c",
       "po_hi_driver_serial_common.c",
       "po_hi_driver_sockets.c",
       "po_hi_driver_stardundee.c",
       "po_hi_driver_usbbrick_spacewire.c",
       "po_hi_driver_xc4v_fpga.c",
       "po_hi_giop.c",
       "po_hi_gprof_rtems_leon.c",
       "po_hi_lua.c",
       "po_hi_monitor.c",
       "po_hi_simulink.c",
       "po_hi_storage.c",
       "remote_configuration.cc",
       "spwrouter_custom_config.c",
       "star_dundee_api.c",
       "trace_manager.c",
       "trace_manager.cc",
       "um_threads.c");

end @_CAPITALIZE:Name_@_AIR;