#!/bin/bash -e # This script will build your TASTE system. # You should not change this file as it was automatically generated. # If you need additional preprocessing, there are three hook files # that you can provide and that are called dring the build: # user_init_pre.sh, user_init_post.sh and user_init_last.sh # These files will never get overwritten by TASTE.' # Inside these files you may set some environment variables: # C_INCLUDE_PATH=/usr/include/xenomai/analogy/:${C_INCLUDE_PATH} # unset USE_POHIC CWD=$(pwd) if [ -t 1 ] ; then COLORON="\e[1m\e[32m" COLOROFF="\e[0m" else COLORON="" COLOROFF="" fi INFO="${COLORON}[INFO]${COLOROFF}" if [ -f user_init_pre.sh ] then echo -e "${INFO} Executing user-defined init script" source user_init_pre.sh fi # Use PolyORB-HI-C runtime USE_POHIC=1 # Detect models from Ellidiss tools v2, and convert them to 1.3 INTERFACEVIEW=InterfaceView.aadl grep "version => \"2" InterfaceView.aadl >/dev/null && { echo -e "${INFO} Converting interface view from V2 to V1.3" TASTE --load-interface-view InterfaceView.aadl --export-interface-view-to-1_3 __iv_1_3.aadl INTERFACEVIEW=__iv_1_3.aadl }; if [ -z "$DEPLOYMENTVIEW" ] then DEPLOYMENTVIEW=DeploymentView.aadl fi # Detect models from Ellidiss tools v2, and convert them to 1.3 grep "version => \"2" "$DEPLOYMENTVIEW" >/dev/null && { echo -e "${INFO} Converting deployment view from V2 to V1.3" TASTE --load-deployment-view "$DEPLOYMENTVIEW" --export-deployment-view-to-1_3 __dv_1_3.aadl DEPLOYMENTVIEW=__dv_1_3.aadl }; SKELS="./" # Check if Dataview references existing files taste-extract-asn-from-design.exe -i "$INTERFACEVIEW" -j /tmp/dv.asn cd "$SKELS" && rm -f gnd.zip && zip gnd gnd/* && cd $OLDPWD cd "$SKELS" && rm -f payload.zip && zip payload payload/* && cd $OLDPWD [ ! -z "$CLEANUP" ] && rm -rf binary* if [ -f ConcurrencyView.pro ] then ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro " fi if [ -f user_init_post.sh ] then echo -e "${INFO} Executing user-defined post-init script" source user_init_post.sh fi if [ ! -z "$USE_POHIC" ] then OUTPUTDIR=binary.c ORCHESTRATOR_OPTIONS+=" -p " elif [ ! -z "$USE_POHIADA" ] then OUTPUTDIR=binary.ada else OUTPUTDIR=binary fi cd "$CWD" && assert-builder-ocarina.py \ --fast \ --debug \ --aadlv2 \ --keep-case \ --interfaceView "$INTERFACEVIEW" \ --deploymentView "$DEPLOYMENTVIEW" \ -o "$OUTPUTDIR" \ --subC gnd:"$SKELS"/gnd.zip \ --subMicroPython payload:"$SKELS"/payload.zip \ $ORCHESTRATOR_OPTIONS if [ -f user_init_last.sh ] then echo -e "${INFO} Executing user-defined post-build script" source user_init_last.sh fi