RTEMS Development Environment Guide
This sample application is in the following directory:
${RTEMS_ROOT}/testsuites/samples/ticker/
This application is designed as a simple test of the clock tick device driver. In addition, this application also tests the printf function from the RTEMS Standard C Library by using it to output the following messages:
*** CLOCK TICK TEST *** TA1 - tm_get - 09:00:00 12/31/1988 TA2 - tm_get - 09:00:00 12/31/1988 TA3 - tm_get - 09:00:00 12/31/1988 TA1 - tm_get - 09:00:05 12/31/1988 TA1 - tm_get - 09:00:10 12/31/1988 TA2 - tm_get - 09:00:10 12/31/1988 TA1 - tm_get - 09:00:15 12/31/1988 TA3 - tm_get - 09:00:15 12/31/1988 TA1 - tm_get - 09:00:20 12/31/1988 TA2 - tm_get - 09:00:20 12/31/1988 TA1 - tm_get - 09:00:25 12/31/1988 TA1 - tm_get - 09:00:30 12/31/1988 TA2 - tm_get - 09:00:30 12/31/1988 TA3 - tm_get - 09:00:30 12/31/1988 *** END OF CLOCK TICK TEST ***
The clock tick sample application utilizes a single initialization task and three copies of the single application task. The initialization task prints the test herald, sets the time and date, and creates and starts the three application tasks before deleting itself. The three application tasks generate the rest of the output. Every five seconds, one or more of the tasks will print the current time obtained via the tm_get directive. The first task, TA1, executes every five seconds, the second task, TA2, every ten seconds, and the third task, TA3, every fifteen seconds. If the time printed does not match the above output, then the clock device driver is not operating properly.
RTEMS Development Environment Guide
Copyright © 1988-2008 OAR Corporation