Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
26
of
106
5.3.3.2. RTEMS application example
In order to use the error manager driver on RTEMS environment, the following code
structure is suggested to be used:
Inclusion of
<fcntl.h>
and <unistd.h>
are required for using the POSIX functions:
open
,
close, ioctl
.
Inclusion of
<errno.h>
is required for retrieving error values on failures.
Inclusion of <
bsp/error_manager_rtems.h>
is required for accessing error manager
device name
RTEMS_ERROR_MANAGER_DEVICE_NAME.
CONFIGURE_APPLICATION_NEEDS_ERROR_MANAGER_DRIVER
must be defined for using
the error manager driver. By defining this as part of RTEMS configuration, the driver will
automatically be initialised at boot up.
5.3.4. Limitations
Many of the error mechanisms are currently unverifiable outside of radiation testing due to
the lack of mechanisms of injecting errors in this release.
#include <bsp.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <bsp/error_manager_rtems.h>
#define
CONFIGURE_APPLICATION_NEEDS_ERROR_MANAGER_DRIVER
#include <bsp/bsp_confdefs.h>
#include <rtems/confdefs.h>
#define CONFIGURE_INIT
rtems_task Init (rtems_task_argument argument);
rtems_task Init (rtems_task_argument ignored)
{}