Hello world Ada-example on RaspberryPi
soja-misc at aries.uberspace.de
Mon Jul 6 18:36:20 UTC 2015
Am Montag, 6. Juli 2015, 13:27:34 schrieb Joel Sherrill:
> Where is the delay initiated? in Ada code? a POSIX call? or with rtems_task_wake_after()?
In the Ada code of the hello.adb file of the example:
procedure Hello is
Put_Line ("*** GNAT/RTEMS Hello World Test ***");
Put_Line ("Welcome to the World of Lady Ada");
Put_Line ("Initiating 2.5 second delay");
Put_Line ("Delay Complete");
Put_Line ("*** END OF GNAT/RTEMS Hello World Test ***");
> Ultimately, the run-time translates Ada operations into POSIX calls.
Ok, so if it works in POSIX-C calls then it should work in Ada as well (given that the runtime calls the right POSIX functions).
> But under the hood, the smallest unit of time for a delay is a clock tick.
> So if it is 10 milliseconds, then every delay < that will be 10 milliseconds
> or greater.
I don't believe that is the issue here. The delay is 2.5 s and a tick is either 10 or 1 ms.
This should have enough margin.
> Just to make sure the math in the Pi clock driver is OK, it would be
> a good idea to change the microseconds per tick value in the ticker
> sample. If it stays true to running ~30 seconds, then the math is right
> in the driver. If it doesn't remain true to "real world" time, then
> the math in the Pi clock driver may be wrong.
Ok. Will try that next.
More information about the users