Commit 914418ed authored by Daniel Silveira's avatar Daniel Silveira

Fixed ports and math examples

Also fixed paranoia example.
Enables all ARM tests to check failures

By Bruno Miguel da Silva Paz Gomes @bmgo added 2 commits 2 days ago
e5ed426a - AIR examples: Update SMP examples configuration
0f547f44 - Merge branch '69-testsuites-smp-examples-errors-in-sparc' into...
parent 65105848

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
......@@ -11,11 +11,11 @@ This folder contain examples for using AIR, they are the following:
*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
*math* - Example using math library (printf is not working properly)
*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
*shm* - Shared Memory Example
*testsuites* - Some of examples of the RTEMS testsuite (includes SMP and AMP multicore example in AIR)
#IOP Examples
#Ignore generated directories
iop/
coverage/
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<IOPartition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="iop.xsd" version="1.0" date="2013-06-05" name="iop_example" request_number="64" time_to_live="5">
<RemotePorts>
<Port Name="dsampling" LogicalDeviceId="0"/>
<Port Name="squeuing"/>
</RemotePorts>
<LogicalDevices>
<Device Id="0" Name="TESTER"/>
</LogicalDevices>
<PhysicalDevices>
<!-- UART 1: -->
<Device Id="1" Device="UART0" Baud="115200" Parity="N" DataBits="8" StopBits="1" DataBytes="64">
<PhysicalRoute Id="1" PortId="squeuing">
<UartHeader UartID="34"/>
</PhysicalRoute>
<LogicalRoute Id="2" LogicalDeviceId="0">
<UartHeader UartID="5"/>
</LogicalRoute>
</Device>
<!-- CAN 0: -->
<Device Id="2" Device="CAN0" Baud="500">
<PhysicalRoute Id="3" PortId="squeuing">
<CanHeader Extended="false" RTR="false" CanID="10"/>
</PhysicalRoute>
<LogicalRoute Id="4" LogicalDeviceId="0">
<CanHeader Extended="false" RTR="false" CanID="2"/>
</LogicalRoute>
</Device>
</PhysicalDevices>
<!-- Module Schedules -->
<ModuleSchedules>
<Schedule ScheduleIdentifier="1">
<DevicesConfiguration>
<Device DeviceId="1" Device="UART0" Reads="1"/>
<Device DeviceId="2" Device="CAN0" Reads="1"/>
</DevicesConfiguration>
<RoutesConfiguration>
<Route RouteId="1" Active="true"/>
<Route RouteId="2" Active="true"/>
<Route RouteId="3" Active="true"/>
<Route RouteId="4" Active="true"/>
</RoutesConfiguration>
</Schedule>
</ModuleSchedules>
</IOPartition>
/* ============================================================================
* Copyright (C) GMVIS Skysoft S.A., 2008-2013
* ============================================================================
* This file is part of the AIR - ARINC 653 Interface in RTEMS - Operating
* system.
* The license and distribution terms for this file may be found in the file
* LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
* ==========================================================================*/
/*
#include <rtems.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/sem.h>
#include <rtems/rtems/clock.h>
*/
#include <a653.h>
#include <imaspex.h>
#include <pprintf.h>
QUEUING_PORT_ID_TYPE qpid;
/*---------------------------------------------------------
* function: test *
* prints a simple string *
------------------------------------------------------------*/
void test(PARTITION_ID_TYPE self_id) {
unsigned char msg[1024]="empty\0";
RETURN_CODE_TYPE rc;
MESSAGE_SIZE_TYPE len;
pprintf ("Ready to receive\n", self_id, msg);
while(1) {
RECEIVE_QUEUING_MESSAGE(qpid, INFINITE_TIME_VALUE, msg, &len, &rc );
if (rc == NO_ERROR)
pprintf ("Partition %d: %s\n", self_id, msg);
else
if(rc == INVALID_CONFIG)
pprintf ("Partition %d Overflow: %s\n", self_id, msg);
}
}
int entry_func() {
RETURN_CODE_TYPE rc;
/*
rtems_name name = 2000;
rtems_mode mode = RTEMS_PREEMPT ;
rtems_mode mode_mask = RTEMS_PREEMPT_MASK;
rtems_id id;*/
PARTITION_ID_TYPE self_id;
CREATE_QUEUING_PORT("dqueuing", 1024, 32, DESTINATION, FIFO, &qpid, &rc );
if(NO_ERROR != rc){
pprintf("CREATE_QUEUING_PORT error %d\n", rc);
}
GET_PARTITION_ID(&self_id, &rc);
if(NO_ERROR != rc){
pprintf("GET_PARTITION_ID error %d\n", rc);
}
pprintf("Initializing partition %d...\n", self_id);
/*
if (RTEMS_SUCCESSFUL == rtems_task_create (name, 15, 4096, mode, mode_mask, &id)) {
rtems_task_start (id, (rtems_task_entry)test, self_id);
}*/
SET_PARTITION_MODE(NORMAL, &rc);
if (NO_ERROR != rc){
pprintf("SET_PARTITION_MODE error %d\n", rc);
}