Commit b70c2cd5 authored by Laura Alexandra Sequeira Gouveia's avatar Laura Alexandra Sequeira Gouveia

Merge branch 'master' into TASTE

parents 3c6bc600 8af33830
......@@ -2,6 +2,11 @@
AIR has a user manual at https://gmvdrive.gmv.com/index.php/s/eScXCAybbecmT9b
You have two way of getting AIR
1) AIR is integrrated in TASTE toolchain available at https://taste.tuxfamily.org/
2) Download from repository where following instructions apply:
To install AIR after cloning from git, you should do the following:
## 1 - Install RTEMS toolchain for RTEMS 5
......@@ -55,6 +60,9 @@ Press 2 for leon4
Press 0 for fpu enabled
Press 0 for GRMON
Press 1 to install all RTOS
...
After configurator finishes execute
......@@ -82,10 +90,12 @@ will create the respective binary in the created *executables* folder.
## Support
Email to dtms@gmv.com or raise issue at our Gitlab
## Updating AIR repo to AIR v5.3 and configurator v4.2
## Updating AIR repo to AIR v5.3 and configurator v4.3
Since configurator v4.2 the RTOS paravirtualized versions are obtained via git submodules.
Pulling new AIR content into old AIR repo will generate conflicts. To get a new clean
AIR repo please execute (please backup any working folder)
git fetch
git reset origin/master --hard
Further information email air-product@gmv.com
# AIR Examples
This folder contain examples for using AIR, they are the following:
*bare_c* -Example using BARE RTOS
*gcov5* - Example to get code coverage
*hello_world* - Hello world, running in 3 partitions with RTEMS48I or RTEMS5
*hm* - Health Monitor usage
*iop_1553* - MIL-STD-1553 communication example, using IOP Partition
*iop_can* - CAN communication example, using IOP Partition
*iop_example* - Ethernet communication example, using IOP Partition
*iop_spw* - Spacewire communication example, using IOP Partition
*math* - Example using math library
*mms* - Example of using multiple module schedules (MMS)
*periodic* - Example using RTEMS periodic tasks
*ports* - Example of using Queuing and Sampling Ports
*posix* - Example of using POSIX threads
*smp* - Multicore example with SMP and AMP
*testsuites* - Some of RTEMS testsuite
......@@ -17,7 +17,7 @@
<Cache>CODE; DATA</Cache>
<Memory Size="0x100000" />
<Permissions>
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL; SET_TOD; SET_PARTITION_MODE;
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
......@@ -30,7 +30,7 @@
<Cache>CODE; DATA</Cache>
<Memory Size="0x100000" />
<Permissions>
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL; SET_TOD; SET_PARTITION_MODE;
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
......@@ -42,7 +42,7 @@
<Cache>CODE; DATA</Cache>
<Memory Size="0x100000" />
<Permissions>
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL; SET_TOD; SET_PARTITION_MODE;
FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
......
......@@ -6,15 +6,14 @@
* https://spass-git-ext.gmv.com/AIR/AIR/raw/master/air/LICENSE
*/
#define CONFIGURE_INIT
#include <air.h>
#include <rtems.h>
#ifdef RTEMS48I
#include <pprintf.h>
#include <pprintf.h>
#else
#include <time.h>
#include <sys/time.h>
#include <rtems/score/timespec.h>
#include <stdio.h>
#include <string.h>
#endif
#ifndef RTEMS48I
......@@ -29,19 +28,21 @@ static char *my_ctime( time_t t )
void entry_point(void)
{
struct timespec start;
int ticks_per_sec = 1000000 / air_syscall_get_us_per_tick();
while(1)
{
while(1)
{
#ifdef RTEMS48I
rtems_clock_get_uptime( &start );
pprintf( "\n\n*** RTEMS48I HELLO WORLD TEST **********\n" );
pprintf( "Time is %ld:%9ld", (long)start.tv_sec, start.tv_nsec);
#else
struct timespec start;
clock_gettime( CLOCK_REALTIME, &start );
clock_gettime( CLOCK_MONOTONIC, &start );
printf( "\n\n*** RTEMS5 HELLO WORLD TEST **********\n" );
printf( "Time is : %s:%ld\n", my_ctime(start.tv_sec), start.tv_nsec);
printf( "Time is : %s:%9ld\n", my_ctime(start.tv_sec), start.tv_nsec);
#endif
rtems_task_wake_after(ticks_per_sec/10);
......
......@@ -6,15 +6,14 @@
* https://spass-git-ext.gmv.com/AIR/AIR/raw/master/air/LICENSE
*/
#define CONFIGURE_INIT
#include <air.h>
#include <rtems.h>
#ifdef RTEMS48I
#include <pprintf.h>
#include <pprintf.h>
#else
#include <time.h>
#include <sys/time.h>
#include <rtems/score/timespec.h>
#include <stdio.h>
#include <string.h>
#endif
#ifndef RTEMS48I
......@@ -29,19 +28,21 @@ static char *my_ctime( time_t t )
void entry_point(void)
{
struct timespec start;
int ticks_per_sec = 1000000 / air_syscall_get_us_per_tick();
while(1)
{
while(1)
{
#ifdef RTEMS48I
pprintf( "\n\n*** RTEMS48I HELLO WORLD TEST **********\n" );
rtems_clock_get_uptime( &start );
pprintf( "\n\n*** RTEMS48I HELLO WORLD TEST **** PART1 ***\n" );
pprintf( "Time is %ld:%9ld", (long)start.tv_sec, start.tv_nsec);
#else
struct timespec start;
clock_gettime( CLOCK_REALTIME, &start );
clock_gettime( CLOCK_MONOTONIC, &start );
printf( "\n\n*** RTEMS5 HELLO WORLD TEST **** PART1 ***\n" );
printf( "Time is : %s:%ld\n", my_ctime(start.tv_sec), start.tv_nsec);
printf( "Time is : %s:%9ld\n", my_ctime(start.tv_sec), start.tv_nsec);
#endif
rtems_task_wake_after(ticks_per_sec/10);
......
......@@ -6,15 +6,14 @@
* https://spass-git-ext.gmv.com/AIR/AIR/raw/master/air/LICENSE
*/
#define CONFIGURE_INIT
#include <air.h>
#include <rtems.h>
#ifdef RTEMS48I
#include <pprintf.h>
#include <pprintf.h>
#else
#include <time.h>
#include <sys/time.h>
#include <rtems/score/timespec.h>
#include <stdio.h>
#include <string.h>
#endif
#ifndef RTEMS48I
......@@ -29,19 +28,21 @@ static char *my_ctime( time_t t )
void entry_point(void)
{
struct timespec start;
int ticks_per_sec = 1000000 / air_syscall_get_us_per_tick();
while(1)
{
while(1)
{
#ifdef RTEMS48I
pprintf( "\n\n*** RTEMS48I HELLO WORLD TEST **********\n" );
rtems_clock_get_uptime( &start );
pprintf( "\n\n*** RTEMS48I HELLO WORLD TEST **** PART2 ***\n" );
pprintf( "Time is %ld:%9ld", (long)start.tv_sec, start.tv_nsec);
#else
struct timespec start;
clock_gettime( CLOCK_REALTIME, &start );
clock_gettime( CLOCK_MONOTONIC, &start );
printf( "\n\n*** RTEMS5 HELLO WORLD TEST **** PART2 ***\n" );
printf( "Time is : %s:%ld\n", my_ctime(start.tv_sec), start.tv_nsec);
printf( "Time is : %s:%9ld\n", my_ctime(start.tv_sec), start.tv_nsec);
#endif
rtems_task_wake_after(ticks_per_sec/10);
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (C) 2018-2019 GMVIS Skysoft S.A.
Copyright (C) 2018-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2018-2019 GMVIS Skysoft S.A.
Copyright (C) 2018-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2018-2019 GMVIS Skysoft S.A.
* Copyright (C) 2018-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (C) 2008-2019 GMVIS Skysoft S.A.
Copyright (C) 2008-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2008-2019 GMVIS Skysoft S.A.
Copyright (C) 2008-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
#!/usr/bin/env python
#
# Copyright (C) 2008-2019 GMVIS Skysoft S.A.
# Copyright (C) 2008-2020 GMVIS Skysoft S.A.
#
# The license and distribution terms for this file may be
# found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
#!/usr/bin/env python
#
# Copyright (C) 2008-2019 GMVIS Skysoft S.A.
# Copyright (C) 2008-2020 GMVIS Skysoft S.A.
#
# The license and distribution terms for this file may be
# found in the file LICENSE in this distribution or at
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (C) 2017-2019 GMVIS Skysoft S.A.
Copyright (C) 2017-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2017-2019 GMVIS Skysoft S.A.
Copyright (C) 2017-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2017-2019 GMVIS Skysoft S.A.
* Copyright (C) 2017-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
/*
* ============================================================================
* This file was generated by the GMV's Configurator Tool and is part of an
* AIR - ARINC 653 Interface in RTEMS - application configuration.
* File Purpose : Partition Initialization
* ============================================================================
*/
#include <bare.h>
/**
* @brief Partition entry point
*/
extern int entry_func() __attribute__ ((weak));
/**
* @brief Program entry point
*/
int main(void) {
/* call entry point */
if (entry_func != NULL) {
entry_func();
}
return 0;
}
/**
* @file
* @brief Linker defintions for partition code
*/
MEMORY
{
rom : ORIGIN = 0x00000000, LENGTH = 0x00000000
ram : ORIGIN = 0x41000000, LENGTH = 0x00100000
}
......@@ -13,7 +13,7 @@
void entry_func() {
air_schedule_status_t status;
int i = 0, sched_a_id, sched_b_id, sched_id;
long int i = 0, sched_a_id, sched_b_id, sched_id;
air_syscall_get_schedule_id("schedA", &sched_a_id);
air_syscall_get_schedule_id("schedB", &sched_b_id);
while (1) {
......
......@@ -48,11 +48,12 @@
<Partition_Schedule PartitionIdentifier="10" PartitionName="master" PeriodDurationSeconds="1.0000" PeriodSeconds="3.0000" SetModuleSchedule="true">
<Window_Schedule PartitionPeriodStart="true" WindowDurationSeconds="1.0000" WindowIdentifier="110" WindowStartSeconds="0.0000"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="1" PartitionName="p1" PeriodDurationSeconds="1.0000" PeriodSeconds="3.0000">
<Window_Schedule PartitionPeriodStart="true" WindowDurationSeconds="1.0000" WindowIdentifier="11" WindowStartSeconds="1.0000"/>
<Partition_Schedule PartitionIdentifier="1" PartitionName="p1" PeriodDurationSeconds="0.5000" PeriodSeconds="1.5000">
<Window_Schedule PartitionPeriodStart="true" WindowDurationSeconds="0.5000" WindowIdentifier="111" WindowStartSeconds="1.0000"/>
<Window_Schedule PartitionPeriodStart="true" WindowDurationSeconds="0.5000" WindowIdentifier="112" WindowStartSeconds="2.5000"/>
</Partition_Schedule>
<Partition_Schedule PartitionIdentifier="2" PartitionName="p2" PeriodDurationSeconds="1.0000" PeriodSeconds="3.0000">
<Window_Schedule PartitionPeriodStart="true" WindowDurationSeconds="1.0000" WindowIdentifier="12" WindowStartSeconds="2.0000"/>
<Window_Schedule PartitionPeriodStart="true" WindowDurationSeconds="1.0000" WindowIdentifier="12" WindowStartSeconds="1.5000"/>
</Partition_Schedule>
</Module_Schedule>
......
/*
* ============================================================================
* This file was generated by the GMV's Configurator Tool and is part of an
* AIR - ARINC 653 Interface in RTEMS - application configuration.
* File Purpose : Partition Initialization
* ============================================================================
*/
#include <bare.h>
/**
* @brief Partition entry point
*/
extern int entry_func() __attribute__ ((weak));
/**
* @brief Program entry point
*/
int main(void) {
/* call entry point */
if (entry_func != NULL) {
entry_func();
}
return 0;
}
/**
* @file
* @brief Linker defintions for partition code
*/
MEMORY
{
rom : ORIGIN = 0x00000000, LENGTH = 0x00000000
ram : ORIGIN = 0x41000000, LENGTH = 0x00100000
}
......@@ -12,10 +12,11 @@
void entry_func() {
int id;
air_syscall_get_partition_id(NULL, &id);
air_partition_status_t status;
while (1) {
pprintf("Partition %d: present in schedule A\n", id);
air_syscall_get_partition_status(-1, &status);
pprintf("Partition %d: present in schedule A Window %d\n", status.identifier, status.window_id);
wake_after(50);
}
}
/*
* ============================================================================
* This file was generated by the GMV's Configurator Tool and is part of an
* AIR - ARINC 653 Interface in RTEMS - application configuration.
* File Purpose : Partition Initialization
* ============================================================================
*/
#include <bare.h>
/**
* @brief Partition entry point
*/
extern int entry_func() __attribute__ ((weak));
/**
* @brief Program entry point
*/
int main(void) {
/* call entry point */
if (entry_func != NULL) {
entry_func();
}
return 0;
}
/**
* @file
* @brief Linker defintions for partition code
*/
MEMORY
{
rom : ORIGIN = 0x00000000, LENGTH = 0x00000000
ram : ORIGIN = 0x41000000, LENGTH = 0x00100000
}
......@@ -12,10 +12,11 @@
void entry_func() {
int id;
air_syscall_get_partition_id(NULL, &id);
air_partition_status_t status;
while (1) {
pprintf("Partition %d: present in schedule A & B\n", id);
air_syscall_get_partition_status(-1, &status);
pprintf("Partition %d: present in schedule A & B Window %d\n", status.identifier, status.window_id);
wake_after(50);
}
}
/*
* ============================================================================
* This file was generated by the GMV's Configurator Tool and is part of an
* AIR - ARINC 653 Interface in RTEMS - application configuration.
* File Purpose : Partition Initialization
* ============================================================================
*/
#include <bare.h>
/**
* @brief Partition entry point
*/
extern int entry_func() __attribute__ ((weak));
/**
* @brief Program entry point
*/
int main(void) {
/* call entry point */
if (entry_func != NULL) {
entry_func();
}
return 0;
}
/**
* @file
* @brief Linker defintions for partition code
*/
MEMORY
{
rom : ORIGIN = 0x00000000, LENGTH = 0x00000000
ram : ORIGIN = 0x41000000, LENGTH = 0x00100000
}
......@@ -12,10 +12,11 @@
void entry_func() {
int id;
air_syscall_get_partition_id(NULL, &id);
air_partition_status_t status;
while (1) {
pprintf("Partition %d: present in schedule B\n", id);
air_syscall_get_partition_status(-1, &status);
pprintf("Partition %d: present in schedule B Window %d\n", status.identifier, status.window_id);
wake_after(50);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2008-2019 GMVIS Skysoft S.A.
Copyright (C) 2008-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (C) 2008-2019 GMVIS Skysoft S.A.
Copyright (C) 2008-2020 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......@@ -15,7 +15,8 @@
#include <imaspex.h>
#ifdef RTEMS48I
#include <printf.h>
#include <pprintf.h>
#define printf(f_, ...) pprintf((f_), ##__VA_ARGS__)
#endif
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......@@ -15,7 +15,8 @@
#include <imaspex.h>
#ifdef RTEMS48I
#include <printf.h>
#include <pprintf.h>
#define printf(f_, ...) pprintf((f_), ##__VA_ARGS__)
#endif
......
/*
* Copyright (C) 2008-2019 GMVIS Skysoft S.A.
* Copyright (C) 2008-2020 GMVIS Skysoft S.A.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
......@@ -15,7 +15,8 @@
#include <imaspex.h>
#ifdef RTEMS48I
#include <printf.h>
#include <pprintf.h>
#define printf(f_, ...) pprintf((f_), ##__VA_ARGS__)
#endif
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2019 GMVIS Skysoft S.A.
The license and distribution terms for this file may be
found in the file LICENSE in this distribution or at
https://spass-git-ext.gmv.com/AIR/AIR/raw/master/air/LICENSE
-->
<ARINC_653_Module ModuleName="shm">
<!-- partition 0 -->
<Partition PartitionIdentifier="1" PartitionName="p0"
Criticality="LEVEL_A" SystemPartition="False" EntryPoint="entry_point">
<PartitionConfiguration Personality="BARE" Cores="1">
<Libs>LIBAIR;</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x3000" Unit="0x1000" />
<Permissions>
FPU_CONTROL; CACHE_CONTROL; GLOBAL_TIME; SET_TOD; SET_PARTITION_MODE;
</Permissions>
</PartitionConfiguration>
</Partition>
<!-- partition 1 -->
<Partition PartitionIdentifier="2" PartitionName="p1"
Criticality="LEVEL_B" SystemPartition="False" EntryPoint="entry_point">
<PartitionConfiguration Personality="BARE" Cores="1">
<Libs>LIBAIR;</Libs>
<Cache>CODE; DATA</Cache>
<Memory Size="0x2000" Unit="0x1000" />
<Permissions>
FPU_CONTROL;
</Permissions>
</PartitionConfiguration>
</Partition>
<SharedMemory Id="1" Name="DEBUG" Size="0x1000" Unit="0x1000">
<PartitionAccess PartitionIdentifier="1" PartitionName="p0" Permissions="RW"/>
<PartitionAccess PartitionIdentifier="2" PartitionName="p1" Permissions="R"/>
</SharedMemory>
<!-- schedule 0 -->
<Module_Schedule ScheduleIdentifier="1" ScheduleName="sched" MajorFrameSeconds="1.0">
<Partition_Schedule PartitionIdentifier="1" PartitionName="p0"
PeriodDurationSeconds="0.1" PeriodSeconds="1">