Hello world Ada-example on RaspberryPi

Jan Sommer soja-misc at aries.uberspace.de
Mon Jul 6 18:20:27 UTC 2015


Hi Jerome, 

Not sure that I understand what you mean.

Am Montag, 6. Juli 2015, 20:05:13 schrieb Hugues Jérôme:
> Check this
> 
> 	https://git.rtems.org/ada-examples/tree/rtems_init.c
> 
> I wonder whether this setting is BSP setting or not. If always seen this file there ..

That's the file which is used to setup the Ada-main task in the examples. 
If there is a call to delay I would assume that there is a computation like this:
TICKS_TO_WAIT = DELAY_IN_US / MICROSECONDS_PER_TICK
Then the thread will suspend for the correct number of TICKS, but somehow this does not seem to work correctly, because it results in delays 10*longer than expected if set to 1000 us per tick and has the correct delay for 10000 us per tick(see below). Question is why? Not sure if that can be a problem with the bsp.

Regards,

   Jan

> 
> Regards,
> 
> Le 6 juil. 2015 à 20:02, Jan Sommer <soja-misc at aries.uberspace.de> a écrit :
> 
> > Ok, in rtems_init.c 
> > 
> > #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
> > 
> > causes the 2.5s delay to be 25 s. If I set it to
> > 
> > #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
> > 
> > then the delay will be 2.5 s.
> > How (or where) is the number of ticks to wait computed when a delay is called in Ada?
> > 
> > Cheers,
> > 
> >   Jan
> > 
> > Am Sonntag, 5. Juli 2015, 23:11:36 schrieb Jan Sommer:
> >> Hi,
> >> 
> >> I tried to run the hello_world_ada example on the raspberryPi today and ran into a few issues.
> >> 
> >> First, there was the linking problem for the function _ada_pthread_minimum_stack_size where is that supposed to be defined?
> >> 
> >> There is also an issue with the current Makefile.shared in the top level example-directory. The Makefile of the hello_world program adds a define for the stack size to the CFLAGS and later includes the Makefile.shared. However there CFLAGS is set to "" in the beginning effectively deleting the stack size set previosly. I commented this line as well (don't know if it will have side effects in later examples).
> >> 
> >> The program then linked. Running the program on the Pi worked as well, but with one problem. The Delay of 2.5 s took 25 s. I changed the delay time several times and it always is accurately 10 time the set delay time.
> >> 
> >> I guess there is some clock setting wrong somewhere? Where would I need to correct that?
> >> 
> >> Cheers,
> >> 
> >>   Jan
> >> _______________________________________________
> >> users mailing list
> >> users at rtems.org
> >> http://lists.rtems.org/mailman/listinfo/users
> > 
> > _______________________________________________
> > users mailing list
> > users at rtems.org
> > http://lists.rtems.org/mailman/listinfo/users
> 



More information about the users mailing list