Some RTEMS Questions

Doyle, Bryon Thomas (Bryon) bdoyle at lucent.com
Fri Jul 8 14:44:52 UTC 2005


Chris, Thank you very much for your response. I managed to correct the task deletion problem by changing some code around. I made the task delete itself after printing out "hello world", instead of the rtems_delete(RTEMS_SELF) being called in the Init task, it is called in my user_task. The problem that I have now seems to involve the Interrupt handler, more specifically the Timer interrupt. I have confirmed that the timer values are set properly my using memory dumps during the driver initialization. However, RTEMS seems to not enter the routine that processes a "tick". It performs an operation that results CPU error when the interrupt occurs. I have tried to look through the interrupt handlers for the PPC405, but it is in assembly and I am hesitant to fiddle around with that level of detail in RTEMS. I was wondering if anybody had experienced similar troubles with the interrupts in general for a PowerPC 405 or 403?  I think that the problem lies in some parameter that is n!
 ot being set properly during the configuration of RTEMS, but so far I have not been able to find it. Thanks for any help.

Bryon Doyle
Summer Intern, Bell Labs
Lucent Technologies


Doyle, Bryon Thomas (Bryon) wrote:
> Hello I am working on a RTEMS port to a CSB472 board along with Ed Sutter.

Welcome.

> I have a couple questions about RTEMS that are not covered in the documentation.
> First of all, I have a simple question about what happens to RTEMS after the
> deletion of the only task.

Does this include the IDLE task ?

> In the process of the port, I have began to run
> some of the sample code and noticed something strange. After the task is to
> make a call to delete itself the RTEMS scheduler seems to go haywire, the task
> scheduler seems to want to execute the deleted task, and keeps trying to switch.
> This continues for approximately 80 iterations, then a fatal error is generated.

Is this the Init task ?

Does this happen with this code for init ?

#include <rtems.h>
void Init ()
{
   rtems_task_delete (RTEMS_SELF);
}

I would expect IDLE to be left running for-ever.

The 'exit' call should clean up and return you to the BSP just after the 
rtems_initialize_executive_late call.

> I have not made any modifications to the internals of the task scheduler in RTEMS.
> The question I have is what is the expected behavior of RTEMS following it deleting
> the only task? Does it go to the Idle task and sit forever? or should it exit
> gracefully and return control to a monitor running on the board.

IDLE is a task so unless you delete this task IDLE should be run and it 
will do what-ever your idle is suppose to do. Idle can be different for 
each CPU and your BSP can define your own idle if you need to manage 
power. On the m68k idle is a stop instruction in a loop.

-- 
  Chris Johns



More information about the users mailing list