partition.tmplt 2.88 KB
Newer Older
1
2
3
4
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@            : Partition name (usually the name of the binary)
@@-- @_Threads_@         : Code generated for the threads
5
6
@@-- @_Thread_Names_@    : Vector Tag: list of thread names
@@-- @_Thread_Has_Param_@ :  |_  true if the thread has a param
7
8
@@-- @_Node_Name_@       : Name of the node containing this partition
@@-- @_Blocks_@          : Code generated for protected functions
Maxime Perrotin's avatar
Maxime Perrotin committed
9
10
@@-- @_Block_Names@      : Vector Tag: list of block (user functions) names
@@-- @_Block_Languages@  :   |_ Corresponding implementation language
11
@@-- @_Coverage_@        : True if user requested code coverage enable
Maxime Perrotin's avatar
Maxime Perrotin committed
12
@@-- @_Package_Name_@    : AADL Package name for the target (e.g. ocarina_processors_x86)
13
14
15
16
17
18
19
20
21
22
23
@@-- @_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
@@-- @_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)
Maxime Perrotin's avatar
Maxime Perrotin committed
24
#  Build of partition @_Name_@ (common to all targets)
25
# (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt)
26
@@INLINE()( )(\n)@@
Maxime Perrotin's avatar
Maxime Perrotin committed
27
@_LOWER:Name_@:
28
29
30
31
   @@TABLE@@
      @_LOWER:Block_Names_@
   @@END_TABLE@@
@@END_INLINE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
32

33
34
# Build of partition @_Name_@ for RTEMS (generate adainit)
# (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt)
Maxime Perrotin's avatar
Maxime Perrotin committed
35
@_LOWER:Name_@_rtems_ada : @_LOWER:Name_@
36
37
38
@@-- On RTEMS if using POHIC we need to have adainit created for Ada functions
	mkdir -p @_LOWER:Name_@_adainit && \
@@INLINE(    echo ')()()@@
39
40
41
42
43
44
   @@TABLE@@
      @@IF@@ @_LOWER:Block_Languages_@ = sdl or @_LOWER:Block_Languages_@ = ada
         with @_CAPITALIZE:Block_Names_@;
      @@END_IF@@
   @@END_TABLE@@
   package adainit is end adainit;' >@_LOWER:Name_@_adainit/tasteada.ads && \
45
46
@@END_INLINE@@
        cd @_LOWER:Name_@_adainit && \
Maxime Perrotin's avatar
Maxime Perrotin committed
47
@@INLINE(    )(:)( \\)@@
48
49
50
51
52
53
54
55
   ADA_INCLUDE_PATH=../../dataview/Ada
   @@TABLE'TERSE@@
      @@IF@@ @_LOWER:Block_Languages_@ = sdl
         ../../@_LOWER:Block_Names_@/SDL/code
      @@ELSIF@@ @_LOWER:Block_Languages_@ = ada
         ../../@_LOWER:Block_Names_@/Ada/src
      @@END_IF@@
   @@END_TABLE@@
56
57
@@END_INLINE@@
sparc-rtems5-gnatmake -c tasteada.ads && sparc-rtems5-gnatbind -t -n tasteada.ali -o ada-start.adb && mkdir -p ../@_LOWER:Node_Name_@/ada_code_startup && mv ada-start.* ../@_LOWER:Node_Name_@/ada_code_startup
58
59

@_Blocks_@