Commit bf3991ad authored by Maxime Perrotin's avatar Maxime Perrotin

Add Demo_PeekPoke_Linux

parent 72529929
TASTE-Dataview DEFINITIONS ::= BEGIN
MyInteger[]
MyReal[]
MyBool[]
MyEnum[]
MySeq[]
MyChoice[]
MySeqOf[]
MyOctStr[]
END
\ No newline at end of file
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- 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)
-- Simple types:
MyInteger ::= INTEGER (0..255)
MyReal ::= REAL (0.0 .. 1000.0)
MyBool ::= BOOLEAN
MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
MySeq ::= SEQUENCE {
input-data MyInteger,
output-data MyInteger,
validity ENUMERATED { valid, invalid }
}
MyChoice ::= CHOICE {
a BOOLEAN,
b MySeq
}
MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
MyOctStr ::= OCTET STRING (SIZE (3))
-- You can also declare constants
myVar MySeqOf ::= { hello, world }
END
---------------------------------------------------
-- AADL2.1
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS x86_partition
END x86_partition;
PROCESS IMPLEMENTATION x86_partition.others
END x86_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
WITH interfaceview::IV::Peek_Poke::TASTE_Probe;
WITH interfaceview::IV::Peek_Poke::TASTE_Probe_Console;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
};
IV_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
IV_TASTE_Probe : SYSTEM interfaceview::IV::Peek_Poke::TASTE_Probe::TASTE_Probe.others {
Taste::FunctionName => "TASTE_Probe";
};
IV_TASTE_Probe_Console : SYSTEM interfaceview::IV::Peek_Poke::TASTE_Probe_Console::TASTE_Probe_Console.others {
Taste::FunctionName => "TASTE_Probe_Console";
};
x86_partition : PROCESS deploymentview::DV::Node1::x86_partition.others {
Taste::coordinates => "103490 75961 138866 95559";
Deployment::Port_Number => 0;
};
x86_native : PROCESSOR ocarina_processors_x86::x86.native {
Taste::coordinates => "99068 70361 143288 98359";
};
PROPERTIES
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function1;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function2;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_TASTE_Probe;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_TASTE_Probe_Console;
Actual_Processor_Binding => (reference (x86_native)) APPLIES TO x86_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "93541 62361 148815 102359";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
This diff is collapsed.
Test the PeekPoke functionality with imported component from TASTE V2
Compile and link with -no-pie to make sure the symbols are absolute in the binaries
#!/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 function1.zip && zip function1 function1/* && cd $OLDPWD
cd "$SKELS" && rm -f function2.zip && zip function2 function2/* && 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 function1:"$SKELS"/function1.zip \
--subC function2:"$SKELS"/function2.zip \
--subC taste_probe:/home/taste/tool-inst/share/components_library/peekpoke/taste_probe.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
/* User code: This file will not be overwritten by TASTE. */
#include "function1.h"
int maxime;
int thanassis = 42;
void function1_startup()
{
maxime = 1;
/* Write your initialization code here,
but do not make any call to a required interface. */
}
void function1_PI_pulse()
{
puts("pulse");
maxime ++;
thanassis ++;
/* Write your code here! */
}
/* This file was generated automatically: DO NOT MODIFY IT ! */
/* Declaration of the functions that have to be provided by the user */
#ifndef __USER_CODE_H_function1__
#define __USER_CODE_H_function1__
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void function1_startup();
void function1_PI_pulse();
extern void function1_RI_doSomething(const asn1SccMyBool *);
#ifdef __cplusplus
}
#endif
#endif
/* User code: This file will not be overwritten by TASTE. */
#include "function2.h"
void function2_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
}
void function2_PI_doSomething(const asn1SccMyBool *IN_abc)
{
/* Write your code here! */
}
/* This file was generated automatically: DO NOT MODIFY IT ! */
/* Declaration of the functions that have to be provided by the user */
#ifndef __USER_CODE_H_function2__
#define __USER_CODE_H_function2__
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void function2_startup();
void function2_PI_doSomething(const asn1SccMyBool *);
#ifdef __cplusplus
}
#endif
#endif
TASTE-BasicTypes DEFINITIONS ::= BEGIN
T-Int32[]
T-UInt32[]
T-Int8[]
T-UInt8[]
T-Boolean[]
END
\ No newline at end of file
TASTE-BasicTypes DEFINITIONS ::=
BEGIN
-- Set of TASTE predefined basic types
T-Int32 ::= INTEGER (-2147483648 .. 2147483647)
T-UInt32 ::= INTEGER (0 .. 4294967295)
T-Int8 ::= INTEGER (-128 .. 127)
T-UInt8 ::= INTEGER (0 .. 255)
T-Boolean ::= BOOLEAN
END
taste-update-data-view
export USER_CFLAGS=-no-pie
export USER_LDFLAGS=-no-pie
Markdown is supported
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