Configuring the fatal error handler
soja-misc at aries.uberspace.de
soja-misc at aries.uberspace.de
Tue Sep 15 13:58:29 UTC 2015
Hi,
We have problems configuring the fatal error handler in RTEMS. Following
the documentation we did the following:
void
fatalErrorHandler(Internal_errors_Source source, bool isInternal,
uint32_t errorCode);
rtems_extensions_table User_extensions = {
NULL, // task_create_extension,
NULL, // task_start_extension
NULL, // task_restart_extension
NULL, // task_delete_extension,
NULL, // task_switch_extension,
NULL, // task_begin_extension
NULL, // task_exitted_extension
&fatalErrorHandler // fatal_extension
};
#define CONFIGURE_INITIAL_EXTENSIONS User_extensions
#define CONFIGURE_INIT
#include "system.h"
void
fatalErrorHandler(Internal_errors_Source source, bool isInternal,
uint32_t errorCode)
{
printf("Fatal error handler: %i, %i, %lu\n", source, isInternal,
errorCode);
while (1)
{
}
}
"system.h" has mainly the configuration options for number of
tasks/semaphores/etc.
Now if I call rtems_fatal_error_occurred in my init task like below I
would expect to get a printout of the fatalErrorHandler function, but I
only get the message from before. Is there something else necessary to
register the error handler?
rtems_task task_system_init(rtems_task_argument /*ignored*/)
{
printf("Do fatal error\n");
rtems_fatal_error_occurred(33);
}
Best regards,
Jan
More information about the users
mailing list