Commit b157e436 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Add an RTEMS build via Gaisler's RTEMS4.10

parent 4abfc715
DataView DEFINITIONS ::=
BEGIN
MyInteger ::= INTEGER (0..65535)
END
---------------------------------------------------
-- AADL2.0
-- TASTE
-- (c)Ellidiss Technologies
--
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS leon_partition
END leon_partition;
PROCESS IMPLEMENTATION leon_partition.others
END leon_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH ocarina_processors_leon;
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_Simple_C_Function : SYSTEM interfaceview::IV::Simple_C_Function.others {
Taste::coordinates => "903 923 1729 1416";
Taste::FunctionName => "Simple_C_Function";
};
leon_partition : PROCESS deploymentview::DV::Node1::leon_partition.others {
Taste::coordinates => "762 722 2102 1592";
Deployment::Port_Number => 0;
};
leon_rtems_posix : PROCESSOR ocarina_processors_leon::gr740.rtems410_gaisler_posix {
Taste::coordinates => "594 473 2269 1716";
};
PROPERTIES
Taste::APLC_Binding => (reference (leon_partition)) APPLIES TO IV_Simple_C_Function;
Actual_Processor_Binding => (reference (leon_rtems_posix)) APPLIES TO leon_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "385 118 2478 1893";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 2970 2100";
Taste::version => "1.3.17";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("~/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
PACKAGE interfaceview::IV
PUBLIC
WITH DataView;
WITH interfaceview::FV;
WITH Taste;
---------------------------------------------------
-- TASTE Interface View
---------------------------------------------------
--{ interfaceview obj234 2187 243
--The simplest possible demo.. If this one
--does not build.. We are in big trouble!
--}
SYSTEM interfaceview
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
Simple_C_Function: SYSTEM interfaceview::IV::Simple_C_Function.others
{ Taste::Coordinates => "1109 406 1773 1095"; };
END interfaceview.others;
---------------------------------------------------
-- TASTE Function: interfaceview::IV::Simple_C_Function
---------------------------------------------------
SYSTEM Simple_C_Function
FEATURES
cyclic_operation_obj197 : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::cyclic_operation_obj197.others
{ Taste::Coordinates => "1109 558 1109 558";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 2000 ms;
Taste::Deadline => 2000 ms;
Taste::Importance => MEDIUM ;};
PROPERTIES
Source_Language => C;
Taste::Instance_Name => "Function0";
END Simple_C_Function;
SYSTEM IMPLEMENTATION Simple_C_Function.others
SUBCOMPONENTS
cyclic_operation_obj197_impl : SUBPROGRAM interfaceview::FV::cyclic_operation_obj197.others
{ Compute_Execution_Time => 0ms..2000ms ;};
CONNECTIONS
SUBPROGRAM ACCESS cyclic_operation_obj197_impl -> cyclic_operation_obj197;
END Simple_C_Function.others;
PROPERTIES
Taste::Coordinates => "0 0 2970 2100";
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview::IV;
PACKAGE interfaceview::FV
PUBLIC
WITH DataView;
WITH TASTE;
SUBPROGRAM cyclic_operation_obj197
END cyclic_operation_obj197;
SUBPROGRAM IMPLEMENTATION cyclic_operation_obj197.others
END cyclic_operation_obj197.others;
END interfaceview::FV;
#!/bin/bash
if [ ! -e /opt/rtems-4.10 ] ; then
echo The Gaisler RTEMS4.10 toolchain must be placed under /opt/rtems-4.10.
exit 1
fi
export PATH=/opt/rtems-4.10/bin:$PATH
# This script will build your TASTE system (by default with the C runtime).
# You should not change this file as it was automatically generated.
# If you need additional preprocessing, create a file named 'user_init_pre.sh'
# and/or 'user_init_post.sh - They will never get overwritten.'
# Inside these files you may set some environment variables:
# C_INCLUDE_PATH=/usr/include/xenomai/analogy/:$C_INCLUDE_PATH
# unset USE_POHIC
if [ -f user_init_pre.sh ]
then
echo [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 '[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 '[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="./"
# Update the data view with local paths
taste-update-data-view || exit 1
cd "$SKELS" && rm -f simple_c_function.zip && zip simple_c_function simple_c_function/* && cd $OLDPWD
[ ! -z "$CLEANUP" ] && rm -rf binary
if [ -f ConcurrencyView.pro ]
then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
fi
if [ ! -z "$USE_POHIC" ]
then
OUTPUTDIR=binary.c
ORCHESTRATOR_OPTIONS+=" -p "
elif [ ! -z "$USE_POHIADA" ]
then
OUTPUTDIR=binary.ada
else
OUTPUTDIR=binary
fi
if [ -f user_init_post.sh ]
then
echo [INFO] Executing user-defined init script
source user_init_post.sh
fi
assert-builder-ocarina.py \
--fast \
--debug \
-p \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o binary.c \
--subC simple_c_function:"$SKELS"/simple_c_function.zip \
$ORCHESTRATOR_OPTIONS
This diff is collapsed.
#ifndef GENERATED_ASN1SCC_DATAVIEW_UNIQ_H
#define GENERATED_ASN1SCC_DATAVIEW_UNIQ_H
/*
Code automatically generated by asn1scc tool
*/
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef asn1SccSint asn1SccT_Int32;
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_ENCODING 4
#define asn1SccT_Int32_REQUIRED_BITS_FOR_ENCODING 32
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_ACN_ENCODING 4
#define asn1SccT_Int32_REQUIRED_BITS_FOR_ACN_ENCODING 32
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_XER_ENCODING 39
void asn1SccT_Int32_Initialize(asn1SccT_Int32* pVal);
flag asn1SccT_Int32_IsConstraintValid(const asn1SccT_Int32* val, int* pErrCode);
#ifndef ERR_asn1SccT_Int32
#define ERR_asn1SccT_Int32 1001 /*(-2147483648 .. 2147483647)*/
#endif
typedef asn1SccUint asn1SccT_UInt32;
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_ENCODING 4
#define asn1SccT_UInt32_REQUIRED_BITS_FOR_ENCODING 32
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_ACN_ENCODING 4
#define asn1SccT_UInt32_REQUIRED_BITS_FOR_ACN_ENCODING 32
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_XER_ENCODING 41
void asn1SccT_UInt32_Initialize(asn1SccT_UInt32* pVal);
flag asn1SccT_UInt32_IsConstraintValid(const asn1SccT_UInt32* val, int* pErrCode);
#ifndef ERR_asn1SccT_UInt32
#define ERR_asn1SccT_UInt32 1002 /*(0 .. 4294967295)*/
#endif
typedef asn1SccSint asn1SccT_Int8;
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_Int8_REQUIRED_BITS_FOR_ENCODING 8
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_Int8_REQUIRED_BITS_FOR_ACN_ENCODING 8
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_XER_ENCODING 37
void asn1SccT_Int8_Initialize(asn1SccT_Int8* pVal);
flag asn1SccT_Int8_IsConstraintValid(const asn1SccT_Int8* val, int* pErrCode);
#ifndef ERR_asn1SccT_Int8
#define ERR_asn1SccT_Int8 1003 /*(-128 .. 127)*/
#endif
typedef asn1SccUint asn1SccT_UInt8;
#define asn1SccT_UInt8_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_UInt8_REQUIRED_BITS_FOR_ENCODING 8
#define asn1SccT_UInt8_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_UInt8_REQUIRED_BITS_FOR_ACN_ENCODING 8
#define asn1SccT_UInt8_REQUIRED_BYTES_FOR_XER_ENCODING 39
void asn1SccT_UInt8_Initialize(asn1SccT_UInt8* pVal);
flag asn1SccT_UInt8_IsConstraintValid(const asn1SccT_UInt8* val, int* pErrCode);
#ifndef ERR_asn1SccT_UInt8
#define ERR_asn1SccT_UInt8 1004 /*(0 .. 255)*/
#endif
typedef flag asn1SccT_Boolean;
#define asn1SccT_Boolean_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BITS_FOR_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BITS_FOR_ACN_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BYTES_FOR_XER_ENCODING 36
void asn1SccT_Boolean_Initialize(asn1SccT_Boolean* pVal);
flag asn1SccT_Boolean_IsConstraintValid(const asn1SccT_Boolean* val, int* pErrCode);
typedef asn1SccUint asn1SccMyInteger;
#define asn1SccMyInteger_REQUIRED_BYTES_FOR_ENCODING 2
#define asn1SccMyInteger_REQUIRED_BITS_FOR_ENCODING 16
#define asn1SccMyInteger_REQUIRED_BYTES_FOR_ACN_ENCODING 2
#define asn1SccMyInteger_REQUIRED_BITS_FOR_ACN_ENCODING 16
#define asn1SccMyInteger_REQUIRED_BYTES_FOR_XER_ENCODING 43
void asn1SccMyInteger_Initialize(asn1SccMyInteger* pVal);
flag asn1SccMyInteger_IsConstraintValid(const asn1SccMyInteger* val, int* pErrCode);
#ifndef ERR_asn1SccMyInteger
#define ERR_asn1SccMyInteger 1005 /*(0 .. 65535)*/
#endif
/* ================= Encoding/Decoding function prototypes =================
* These functions are placed at the end of the file to make sure all types
* have been declared first, in case of parameterized ACN encodings
* ========================================================================= */
flag asn1SccT_Int32_Encode(const asn1SccT_Int32* val, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
flag asn1SccT_Int32_Decode(asn1SccT_Int32* pVal, BitStream* pBitStrm, int* pErrCode);
flag asn1SccT_UInt32_Encode(const asn1SccT_UInt32* val, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
flag asn1SccT_UInt32_Decode(asn1SccT_UInt32* pVal, BitStream* pBitStrm, int* pErrCode);
flag asn1SccT_Int8_Encode(const asn1SccT_Int8* val, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
flag asn1SccT_Int8_Decode(asn1SccT_Int8* pVal, BitStream* pBitStrm, int* pErrCode);
flag asn1SccT_UInt8_Encode(const asn1SccT_UInt8* val, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
flag asn1SccT_UInt8_Decode(asn1SccT_UInt8* pVal, BitStream* pBitStrm, int* pErrCode);
flag asn1SccT_Boolean_Encode(const asn1SccT_Boolean* val, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
flag asn1SccT_Boolean_Decode(asn1SccT_Boolean* pVal, BitStream* pBitStrm, int* pErrCode);
flag asn1SccMyInteger_Encode(const asn1SccMyInteger* val, BitStream* pBitStrm, int* pErrCode, flag bCheckConstraints);
flag asn1SccMyInteger_Decode(asn1SccMyInteger* pVal, BitStream* pBitStrm, int* pErrCode);
#ifdef __cplusplus
}
#endif
#endif
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include "simple_c_function.h"
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
void simple_c_function_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface!! */
printf ("[Startup] Expected output: \"Hello, world...\" every 2 seconds\n");
}
void simple_c_function_PI_cyclic_operation()
{
static cnt = 0;
printf ("Hello, world...\n");
fflush(stdout);
if (cnt++ == 5) {
exit(0);
}
// extern void rtems_stack_checker_report_usage();
// rtems_stack_checker_report_usage();
}
/* 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_simple_c_function__
#define __USER_CODE_H_simple_c_function__
#ifdef __cplusplus
extern "C" {
#endif
void simple_c_function_startup();
void simple_c_function_PI_cyclic_operation();
#ifdef __cplusplus
}
#endif
#endif
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