diff --git a/install/85_rtems.sh b/install/85_rtems.sh deleted file mode 100755 index 6cf3587b2a90e6fe0bf6c310bc026f99bd1db9e9..0000000000000000000000000000000000000000 --- a/install/85_rtems.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -INSTALLED_RTEMS_INFO="/opt/rtems_LATEST" -if [ -f "$INSTALLED_RTEMS_INFO" ] ; then - read OLD_RTEMS_MTIME OLD_RTEMS_FOLDER <<< $(cat "$INSTALLED_RTEMS_INFO") -else - OLD_RTEMS_MTIME=0 - OLD_RTEMS_FOLDER="" -fi - -echo Checking for new version of the RTEMS compiler... -URL_OF_NEW_RTEMS_INFO=http://download.tuxfamily.org/taste/RTEMS/LATEST -if wget -q -O /tmp/syncup.$$ "$URL_OF_NEW_RTEMS_INFO" ; then - read NEW_RTEMS_MTIME NEW_RTEMS_FOLDER NEW_RTEMS_URL <<< $(cat /tmp/syncup.$$) - rm -f /tmp/syncup.$$ - if [ "$OLD_RTEMS_MTIME" -lt "$NEW_RTEMS_MTIME" ] ; then - echo Downloading updated version of the RTEMS compiler... - cd /opt - NEW_COMPILER_TARBALL=/tmp/newCompiler.$$.tar.bz2 - if wget -O $NEW_COMPILER_TARBALL "$NEW_RTEMS_URL" ; then - if [ ! -z "$OLD_RTEMS_FOLDER" ] ; then - echo Removing old RTEMS compiler... - sudo rm -rf "$OLD_RTEMS_FOLDER" - fi - sudo tar jxvf $NEW_COMPILER_TARBALL || { - echo Failed to extract $NEW_COMPILER_TARBALL... - echo Aborting. - exit 1 - } - rm -f $NEW_COMPILER_TARBALL - NEWBIN=$NEW_RTEMS_FOLDER/bin - if ! grep "^export PATH=.*$NEWBIN" $HOME/.bashrc.taste ; then - echo Adding new compiler "$NEWBIN" to PATH... - echo "export PATH=$NEWBIN:\$PATH" >> "$HOME/.bashrc.taste" - fi - echo $NEW_RTEMS_MTIME $NEW_RTEMS_FOLDER | \ - sudo tee "$INSTALLED_RTEMS_INFO" - else - echo Failed to download the new compiler... Aborting. - exit 1 - fi - fi -else - echo Failed to get "$URL_OF_NEW_RTEMS_INFO" ... - echo Aborting. - exit 1 -fi - -# Make sure the RTEMS_MAKEFILE_PATH_LEON is set -grep RTEMS_MAKEFILE_PATH_LEON $HOME/.bashrc.taste >/dev/null || { - read UNUSED FINAL_RTEMS_FOLDER <<< $(cat "$INSTALLED_RTEMS_INFO") - LEON2_FOLDER="$(find $FINAL_RTEMS_FOLDER -type d -name leon2)" - echo Adding RTEMS_MAKEFILE_PATH_LEON env var to settings. - echo "export RTEMS_MAKEFILE_PATH_LEON=\"$LEON2_FOLDER\"" >> $HOME/.bashrc.taste -} diff --git a/misc/helper-scripts/taste-create-acn-model b/misc/helper-scripts/taste-create-acn-model index be8d502f3088c6c88bbf1b398380334fb89ca315..a216f21a4ccd9346e86cca0f4469e4ac4ad516e2 100755 --- a/misc/helper-scripts/taste-create-acn-model +++ b/misc/helper-scripts/taste-create-acn-model @@ -1,5 +1,16 @@ #!/bin/bash -e -echo TASTE ACN Editor - Use only the SAVE button - not \"Save as..\" ! + +# TASTE ACN File creator + +if [ -t 0 ] ; then + COLORON="\e[1m\e[32m" + REDCOLORON="\e[1m\e[31m" + COLOROFF="\e[0m" +else + COLORON="" + REDCOLORON="" + COLOROFF="" +fi DATAVIEW=DataView.asn @@ -19,16 +30,17 @@ then then DATAVIEW="$1" else - echo Invalid dataview filename - use $(basename "$0") \ + echo -e -n "${ERROR} Invalid dataview filename - " + echo use $(basename "$0") \ exit -1 fi fi if [ -f "$DATAVIEW" ] then - echo Creating dummy ACN file from existing DataView.asn + echo -e "${INFO} Creating dummy ACN file from existing DataView.asn" else - echo First create your ASN.1 data model: run taste-create-data-view + echo -e "${INFO} First create your ASN.1 data model: run taste-create-data-view" exit -1 fi @@ -44,6 +56,8 @@ fi taste-update-data-view $1 -echo 'Everything went fine. -If you want to edit your ACN model, run taste-edit-acn-model -' +if [ -z $NONINTERACTIVE ] +then + echo -e "${INFO} All OK" + echo -e "${INFO} If you want to edit your ACN model, run taste-edit-acn-model" +fi diff --git a/misc/helper-scripts/taste-create-data-view b/misc/helper-scripts/taste-create-data-view index 2156738a6a6856c04472e2e94605b5ac6866eb9b..2397376909b0dd1a4d80fcec718168132631a4a4 100755 --- a/misc/helper-scripts/taste-create-data-view +++ b/misc/helper-scripts/taste-create-data-view @@ -1,6 +1,17 @@ #!/bin/bash -e -echo TASTE Dataview Editor - Use only the SAVE button - not \"Save as..\" ! +# TASTE Dataview Editor + +if [ -t 0 ] ; then + COLORON="\e[1m\e[32m" + REDCOLORON="\e[1m\e[31m" + COLOROFF="\e[0m" +else + COLORON="" + REDCOLORON="" + COLOROFF="" +fi + # Find a suitable text editor, in order of priority: kate, gvim, vi @@ -14,22 +25,33 @@ else EDITOR=vi fi -if [ -f "DataView.asn" ]; - then echo Opening existing DataView.asn; +if [ -f "DataView.asn" ] +then + if [ -z $NONINTERACTIVE ] + then + echo -e "${INFO} Opening existing DataView.asn" + fi else - echo Creating a dummy ASN.1 file with a few type examples - feel free to add, edit, delete... + if [ -z $NONINTERACTIVE ] + then + echo -e "${INFO} Creating a dummy ASN.1 file with a few type examples - feel free to add, edit, delete..." + fi echo 'TASTE-Dataview DEFINITIONS ::= BEGIN IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes; --- A few simple types to start with ASN.1 -MyInteger ::= T-UInt8 +-- ASN.1 Type definitions must start with an uppercase +-- Field names in records (SEQUENCE) must start with a lowercase +-- Underscores are not allowed: use dash (hyphen) -MyReal ::= REAL (0.0 .. 1000.0) +-- Simple types: +MyInteger ::= INTEGER (0..255) +MyReal ::= REAL (0.0 .. 1000.0) MyBool ::= BOOLEAN +MyEnum ::= ENUMERATED { hello, world, how-are-you } -MyEnum ::= ENUMERATED { hello, world, howareyou } +-- Complex types: MySeq ::= SEQUENCE { input-data MyInteger, @@ -56,7 +78,7 @@ fi if [ -z $NONINTERACTIVE ] then $EDITOR DataView.asn - echo Converting the data view to AADL... + echo -e "${INFO} Converting the data view to AADL..." fi cp $(taste-config --prefix)/share/taste-types/taste-types.asn . @@ -65,8 +87,8 @@ taste-update-data-view if [ -z $NONINTERACTIVE ] then - echo 'Everything went fine. -You can now run taste-create-interface-view or if you want to edit your data view, run taste-edit-data-view -You can also create an ACN model of your data view by typing taste-create-acn-model -' + echo -e "${INFO} Data View created" + echo -e "${INFO} Run taste-edit-data-view to edit" + echo -e "${INFO} taste-create-acn-model to specify binary encodings with ACN" + echo -e "${INFO} taste-create-project to create a new TASTE project" fi diff --git a/misc/helper-scripts/taste-create-project b/misc/helper-scripts/taste-create-project index 4cac6d26e8fc6884a056fc5b61a800ea9430966d..1fbdbc3e32f636394466ff3d1e14fa01441af6a2 100755 --- a/misc/helper-scripts/taste-create-project +++ b/misc/helper-scripts/taste-create-project @@ -1,23 +1,53 @@ #!/bin/bash -e -echo 'TASTE Project Creator - Use only the SAVE button - not \"Save as..\" !' +echo 'TASTE Project Creator' + +if [ -t 0 ] ; then + COLORON="\e[1m\e[32m" + REDCOLORON="\e[1m\e[31m" + COLOROFF="\e[0m" +else + COLORON="" + REDCOLORON="" + COLOROFF="" +fi + +INFO="${COLORON}[INFO]${COLOROFF}" +ERROR="${REDCOLORON}[ERROR]${COLOROFF}" + if [ -f InterfaceView.aadl ] then - echo 'InterfaceView.aadl already exists. Use taste-edit-project instead.' - exit 0 + echo -e "${ERROR} InterfaceView.aadl already exists. Use taste-edit-project instead." + exit 1 fi if [ ! -f DataView.aadl ] then - echo 'Creating a default ASN.1 data model.' + echo -e "${INFO} Creating a default ASN.1 data model." NONINTERACTIVE=1 taste-create-data-view NONINTERACTIVE=1 taste-create-acn-model else - echo Using existing DataView.aadl + echo -e "${INFO} Using existing DataView.aadl" fi +# Add the components from the components library +FIRST=1 +LIBDIR=$(taste-config --prefix)/share/components_library +for each in $LIBDIR/* +do + if [ $FIRST -eq 1 ] + then + EXTRA_CMD+='--edit-aadl ' + else + EXTRA_CMD+=, + fi + EXTRA_CMD+=$each/interfaceview.aadl + FIRST=0 +done + # Invoke the GUI from Ellidiss -TASTE --data-view DataView.aadl \ +TASTE $EXTRA_CMD \ + --data-view DataView.aadl \ --load-interface-view InterfaceView.aadl \ --load-deployment-view DeploymentView.aadl \ --aadl-library $(taste-config --prefix)/share/ocarina/AADLv2/ocarina_components.aadl diff --git a/misc/helper-scripts/taste-edit-project b/misc/helper-scripts/taste-edit-project index 1056d565328e7cd86ea694ecf0da807e3804cf0c..f686b6380ba7ebbb4254a14cca0c97117d1dda68 100755 --- a/misc/helper-scripts/taste-edit-project +++ b/misc/helper-scripts/taste-edit-project @@ -1,26 +1,36 @@ #!/bin/bash + +if [ -t 0 ] ; then + COLORON="\e[1m\e[32m" + REDCOLORON="\e[1m\e[31m" + COLOROFF="\e[0m" +else + COLORON="" + REDCOLORON="" + COLOROFF="" +fi + + if [ -f InterfaceView.aadl ] then - echo 'Opening TASTE project' + echo -e "${INFO} Opening TASTE project" INTERFACEVIEW=InterfaceView.aadl else - echo Error: missing InterfaceView.aadl - echo First use taste-create-project to start a new project + echo -e "${ERROR} Missing InterfaceView.aadl" + echo -e "${ERROR} First use taste-create-project to start a new project" exit 1 fi grep -i taste-directives.aadl "$INTERFACEVIEW" >/dev/null && { - echo Your interface view needs to be upgraded\! - echo Please upgrade it with: + echo -e "${ERROR} Your interface view needs to be upgraded\!" + echo " Please upgrade it with:" echo - echo " taste-upgrade-IF-view oldIFview newIFview" + echo " taste-upgrade-IF-view oldIFview newIFview" echo - echo ...and use the newIFview instead. + echo " ...and use the newIFview instead." exit 1 } -echo TASTE Project Editor - Use only the SAVE button - not \"Save as..\" ! - # If there is no deployment view, only load interface view EXTRA_CMD= if [ ! -f DeploymentView.aadl ] @@ -47,5 +57,5 @@ do FIRST=0 done -echo TASTE $EXTRA_CMD --data-view DataView.aadl --load-deployment-view DeploymentView.aadl +# echo TASTE $EXTRA_CMD --data-view DataView.aadl --load-deployment-view DeploymentView.aadl TASTE $EXTRA_CMD --data-view DataView.aadl --load-deployment-view DeploymentView.aadl diff --git a/misc/helper-scripts/taste-update-data-view b/misc/helper-scripts/taste-update-data-view index fe14590a98de59ca01b2da42cc734c81e248573c..2f7b590e9191f255d8701ebc29e715264f4b1fda 100755 --- a/misc/helper-scripts/taste-update-data-view +++ b/misc/helper-scripts/taste-update-data-view @@ -45,7 +45,7 @@ if [ -z "$(echo -n $DATAVIEW)" ] then if [ -f DataView.asn ] then - echo -e '${INFO} Using file: DataView.asn' + echo -e "${INFO} Using file: DataView.asn" DATAVIEW=$(readlink -e DataView.asn) else >&2 echo -e "${ERROR} No data view found"