Commit f6ad99ce authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complete support of RPI platforms

parent 47feab93
......@@ -5,11 +5,24 @@
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_node.ascii
# Build of node @_Node_Name_@ for @_CPU_Platform_@
# (rule generated by templates/concurrency_view/aadl_4_makefile/node.tmplt)
@@IF@@ @_CPU_Platform_@ = PLATFORM_LEON_RTEMS_POSIX
@@-- To mix Ada and C some platforms require the generation of a symbol named "adainit" that
@@-- is in charge of initializing all Ada modules when the program entry point is in C
@@-- Native (Linux/x86) gnat generate this automatically, but not RTEMS and RPI cross-compilers
@@-- The pattern to generate this symbol is in partition.tmplt ; it depends on the platform-
@@-- specific gnatmake and gnatbind, that we define here
@@IF@@ @_CPU_Platform_@ = PLATFORM_LEON_RTEMS_POSIX or @_CPU_Platform_@ = PLATFORM_AIR
CROSS_GNATMAKE?=sparc-rtems5-gnatmake
CROSS_GNATBIND?=sparc-rtems5-gnatbind
@@ELSIF@@ @_CPU_Platform_@ = PLATFORM_RPI
CROSS_GNATMAKE?=arm-linux-gnueabihf-gnatmake
CROSS_GNATBIND?=arm-linux-gnueabihf-gnatbind
@@END_IF@@
@@IF@@ @_CPU_Platform_@ = PLATFORM_LEON_RTEMS_POSIX or @_CPU_Platform_@ = PLATFORM_RPI
@@INLINE@@
@_LOWER:Node_Name_@_@_CPU_Name_@:
@@TABLE@@
@_Partition_Names_@_rtems_ada
@_Partition_Names_@_with_adainit
@@END_TABLE@@
DriversConfig/drivers_config.h
@@END_INLINE@@
......@@ -17,7 +30,7 @@
@@INLINE@@
@_LOWER:Node_Name_@_@_CPU_Name_@:
@@TABLE@@
@_LOWER:Partition_Names_@_rtems_ada
@_LOWER:Partition_Names_@_with_adainit
@@END_TABLE@@
@@END_INLINE@@
# generate the xml file for AIR and call AIR's configure script
......
......@@ -61,10 +61,12 @@
# Build of partition @_Name_@ for RTEMS (generate adainit)
@@IF@@ @_CPU_Platform_@ = PLATFORM_LEON_RTEMS_POSIX or @_CPU_Platform_@ = PLATFORM_AIR or @_CPU_Platform_@ = PLATFORM_RPI
# Build of partition @_Name_@ with the additional generation of adainit symbol
# to initialize Ada modules while the entry point of the node is in C (POHIC)
# This is only needed on some platforms ; gnat on Linux generates it automatically
# (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt)
@_LOWER:Name_@_rtems_ada : @_LOWER:Name_@
@@-- On RTEMS if using POHIC we need to have adainit created for Ada functions
@_LOWER:Name_@_with_adainit : @_LOWER:Name_@
mkdir -p @_LOWER:Name_@_adainit && \
@@INLINE( echo ')()()@@
@@TABLE@@
......@@ -85,6 +87,7 @@
@@END_IF@@
@@END_TABLE@@
@@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
$(CROSS_GNATMAKE) -c tasteada.ads && $(CROSS_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
@@END_IF@@
@_Blocks_@
......@@ -24,6 +24,9 @@ project @_CAPITALIZE:Name_@ is
@@-- Detect distributed systems (no virtual processor) - add DriversConfig folder
"../DriversConfig",
@@END_IF@@
@@IF@@ @_CPU_Platform_@ = PLATFORM_RPI
"ada_code_startup",
@@END_IF@@
"../deploymentview_final/polyorb-hi-c/src",
"../deploymentview_final/polyorb-hi-c/include",
"../../dataview/C",
......@@ -180,6 +183,9 @@ project @_CAPITALIZE:Name_@ is
"-lrt",
"-lpthread",
"-lm",
@@IF@@ @_CPU_Platform_@ = PLATFORM_RPI
"-lgnat",
@@END_IF@@
@@IF@@ @_Coverage_@
"-fprofile-arcs",
"-ftest-coverage",
......
Supports Markdown
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