RTEMS Ada Questions

Jérôme Hugues hugues.jerome at gmail.com
Tue Feb 13 08:41:29 UTC 2007

Le 12 févr. 07 à 19:41, avy st a écrit :

> However, having a look at RTEMS Ada hello example and the  
> elaboration code, I saw that, in my opinion, RTEMS was not even
> started, and no task was created when building the program as  
> described on the Wiki page. All RTEMS Ada examples
> EXPLICITLY create the tasks and start RTEMS on their main, which is  
> not the case in this examples.So, here are the questions:
> Is my observation correct?

I cannot tell, since I never run psim, but I got similar problems  
with Ada and tasking, it happens that a work around was to force the  
recompilation of the runtime along with the application. Joel  
confirmed that it might be required since GNAT does not support multilib

option is "gnatmake -a -f ..."

> If so, is there a way to create the environment task  
> 'automatically' (from the Ada code point of view), and run the Ada  
> main
> procedure in the context of the environment task automatically, as  
> is required and done bu all the Ada environments
> that I've worked with?

see Ada examples from RTEMS repo, I also publish the following  
archive for my students, it has some simple Ada programms


> What about defining tasks in Ada - defining a task type and an  
> object of that type? Would this automatically create a task
> as it should? Is Ada task=RTEMS task?

see the previous archive for such example, it has been tested with  
pc386 bsp on qemu. I expect it should work with other BSPs, except  
for some configuration points. Note that you must set up enough POSIX  
ressources for your Ada applications, since (AFAICT) Ada tasks are  
mapped onto POSIX threads by the GNAT runtime

> Is all this behavior documented anywhere?

I found most info by analysing the ada exemples CVS repository from  
the RTEMS rep.



More information about the users mailing list