@@-- The up to date list of tags available for this template is available here: @@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fpartition.tmplt @@-- If you are using vim, go over the URL and pres gx in to follow the link @@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc: @@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_partition.ascii # Build of partition @_Name_@ (common to all targets) # (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt) @_LOWER:Name_@: @_REPLACE_ALL(,/ ):LOWER:Block_Names_@ @@-- Opengeode generates intermediate ASN.1 files, they must be compiled @@-- (at partition level, not shared by all nodes) @@-- The code below is needed because if there is more than one instance of @@-- a component type, opengeode will generate the _datamodel.asn file in @@-- the folder of the instance, i.e. there may be more than one reference @@-- to the same file generated at different places The python code checks @@-- that when this happens only one _datamodel.asn file is kept to avoid @@-- an error that would otherwise be raised by asn2dataModel @@INLINE( args=$$\(python3 -c "import os, sys; print\(' '.join\({os.path.basename\(f\):f for f in sys.argv[1:]}.values\(\)\)\)" )( )(\); \\\n mkdir -p ..\/dataview\/Ada; mono $(shell which asn1.exe) -Ada -equal --target allboards -typePrefix asn1Scc -o ..\/dataview\/Ada $$args )@@ @@TABLE@@ @@IF@@ @_Block_Languages_@ = SDL @@-- Use wildcard because in the case of the SDL to C backend the _datamodel files are not generated (yet) @@IF@@ @_Block_Instance_Of_@ = "" ${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Names_@_datamodel.asn} @@ELSE@@ @@IF@@ @_Block_Is_Shared_Type_@ @@-- instance of a shared type stored in a shared folder ${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Instance_Of_@_datamodel.asn} @@-- context parameters of the function type must be added too ${wildcard @_Shared_Lib_Dir_@/@_LOWER:Block_Instance_Of_@/@_LOWER:Block_Instance_Of_@/SDL/Context*.asn} @@ELSE@@ ${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Instance_Of_@_datamodel.asn} @@-- context parameters of the function type must be added too ${wildcard ../@_LOWER:Block_Instance_Of_@/SDL/Context*.asn} @@END_IF@@ @@END_IF@@ @@-- If the function has context parameters, add the file ${wildcard ../@_LOWER:Block_Names_@/SDL/Context-@_LOWER:REPLACE_ALL(_/-):Block_Names_@.asn} @@END_IF@@ @@END_TABLE@@ ../dataview/dataview-uniq.asn @@END_INLINE@@ @@-- For simulation target, add simulation.asn and uPER encoders @_LOWER:Name_@_simu: @_REPLACE_ALL(,/ ):LOWER:Block_Names_@ @@INLINE( args=")( )("; \\\n mkdir -p ..\/dataview\/Ada; mono $(shell which asn1.exe) -Ada -uPER -equal --target allboards -typePrefix asn1Scc -o ..\/dataview\/Ada $$args; \\)@@ @@TABLE@@ @@IF@@ @_Block_Languages_@ = SDL @@-- Use wildcard because in the case of the SDL to C backend the _datamodel files are not generated (yet) @@IF@@ @_Block_Instance_Of_@ = "" ${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Names_@_datamodel.asn} @@ELSE@@ ${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Instance_Of_@_datamodel.asn} @@END_IF@@ @@-- If the function has context parameters, add the file ${wildcard ../@_LOWER:Block_Names_@/SDL/Context-@_LOWER:REPLACE_ALL(_/-):Block_Names_@.asn} @@END_IF@@ @@END_TABLE@@ ../dataview/dataview-uniq.asn simulation.asn @@END_INLINE@@ taste-asn1-gser -o ../dataview/Ada/src --raw $$args || exit 1 @@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_@_with_adainit : @_LOWER:Name_@ mkdir -p @_LOWER:Name_@_adainit && \ @@INLINE( echo ')()()@@ @@TABLE@@ @@IF@@ @_Block_Languages_@ = SDL or @_Block_Languages_@ = Ada with @_CAPITALIZE:Block_Names_@; @@END_IF@@ @@END_TABLE@@ package adainit is end adainit;' >@_LOWER:Name_@_adainit/tasteada.ads && \ @@END_INLINE@@ cd @_LOWER:Name_@_adainit && \ @@INLINE( )(:)( \\)@@ ADA_INCLUDE_PATH=../../dataview/Ada/src:../../dataview/Ada/asn1rtl:../../dataview/Ada/boards/x86 @@TABLE'TERSE@@ @@IF@@ @_Block_Languages_@ = SDL ../../@_LOWER:Block_Names_@/SDL/code:../../@_LOWER:Block_Names_@/SDL/wrappers @@ELSIF@@ @_Block_Languages_@ = Ada ../../@_LOWER:Block_Names_@/Ada/src @@END_IF@@ @@END_TABLE@@ @@END_INLINE@@ $(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_@