Hello,

I try to get the a working gnat toolchain running to build binaries for the 
raspberry pi with rtems4.11.
For debugging purposes the pi is emulated in qemu.

Currently I try to get the following basic tasking example to run:

with Text_IO; use Text_IO;

procedure Hello is

   task Hello_Task;

   task body Hello_Task is
   begin
     Put_Line ("*** GNAT/RTEMS Hello World Test ***");
     New_Line;
     Put_Line ("Welcome to the World of Lady Ada");

     New_Line;
     Put_Line ("Initiating 20 second delay");
     delay 20.0;
     Put_Line ("Delay Complete");

     Put_Line ("*** END OF GNAT/RTEMS Hello World Test ***");
   end Hello_Task;

begin
    Put_Line ("Main program");
        null;
end Hello;

After rtems initialization a thread is created which calls the gnat_main 
function and then runs the rts and the task.
What I see so far is that after the hello_tasks delays itself the 
Complete_Master procedure (s-tassta.adb:444) is called, but with Self_Id set to 
the Id of the hello_task.
The call finishes and the runtime is cleaned before the task if able to wake up.
If I debug the same program on my desktop pc  Complete_Master is called with 
the Id of the main task. It then notices that it has to wait for its  dependent 
task (hello_task), sleeps until it finishes and  only then terminates the 
runtime.

I would like to know from where Complete_Master is called to break there and 
find out why it uses the wrong id.
Also general tips on how to debug that kind of thing would be greatly 
appreciated.

Thank you very much,

     Jan

Reply via email to