|
From: <jmk...@us...> - 2003-08-05 03:51:03
|
Update of /cvsroot/emc/rtapi In directory sc8-pr-cvs1:/tmp/cvs-serv18267 Modified Files: README Log Message: minor tweaks, all examples work except for a fifo overflow bug under rtai Index: README =================================================================== RCS file: /cvsroot/emc/rtapi/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 4 Aug 2003 06:00:24 -0000 1.2 --- README 5 Aug 2003 03:51:00 -0000 1.3 *************** *** 34,51 **** To run the examples: ! 1. Load the RT Linux functions: ! ./install_realtime_base ! 2. Load the real-time API functions: ! (NOTE: This has been added to the install_realtime_base script, ! so you can skip it and go straight to step 3) ! /sbin/insmod rtlib/rtl_rtapi.o ! or ! /sbin/insmod rtlib/rtai_rtapi.o ! depending upon which version of RT Linux you have. 3. Run the timer task example: --- 34,57 ---- To run the examples: ! 1. Open a shell window, and begin watching the kernel log: ! tail -f /var/log/messages ! leave this running, and go back to your original shell window ! 2. Load the RT Linux functions: ! Note: for this and most of the following steps you will need ! to be root. ! ./install_realtime_base ! See a number of messages pop up in the kernel log as components ! of the RTOS are installed... ! One of the last ones will be: ! ! <date> <time> <host> kernel: RTAPI: Initing ! ! This means that thertapi module (either rtl_rtapi.o or ! rtai_rtapi.o) is loaded. 3. Run the timer task example: *************** *** 53,68 **** /sbin/insmod rtlib/timertask.o Wait a few seconds, then remove the module: /sbin/rmmod timertask ! Look at the output in the kernel log: ! tail /var/log/messages ! Jun 18 10:50:14 rebozo kernel: timertask: started timer task ! Jun 18 10:50:18 rebozo kernel: timer task: timer count is 3251 ! You'll see that 3251 calls to the task were made. 4. Run the parallel port interrupt example: --- 59,89 ---- /sbin/insmod rtlib/timertask.o + A few messages will pop up in the kernel log as the task + is created and started: + + <date> <time> <host> kernel: RTAPI: clock_set_period ( 1000000 ) + <date> <time> <host> kernel: RTAPI: new_task c3ee3000, count = 1 + <date> <time> <host> kernel: RTAPI: start_task c3ee3000 + + c3ee3000 is the task handle, and will vary. + You'll also see a message from the timertask module... + + <date> <time> <host> kernel: timertask init: started timer task + Wait a few seconds, then remove the module: /sbin/rmmod timertask ! A couple more messages from rtapi: ! <date> <time> <host> kernel: RTAPI: stop_task c3ee3000 ! <date> <time> <host> kernel: RTAPI: delete_task c3ee3000, count = 0 ! And one from timertask: ! <date> <time> <host> kernel: timertask exit: timer count is 8174 ! ! This means that 8174 calls to the task were made. (I let it ! run for about 8 seconds.) 4. Run the parallel port interrupt example: *************** *** 74,83 **** /sbin/rmmod extint - tail /var/log/messages ! Jun 18 10:52:14 rebozo kernel: extint: interrupt count is 2522 ! 2,522 interrupts occurred, many for a single short of pin 10 due to ! contact noise. 5. Run the shared memory example: --- 95,106 ---- /sbin/rmmod extint ! Again, you'll get messages from RTAPI, and one from the ! extint module: ! <date> <time> <host> kernel: extint: interrupt count is 2522 ! ! This means 2,522 interrupts occurred, many for a single short ! of pin 10 due to contact noise. 5. Run the shared memory example: *************** *** 88,91 **** --- 111,175 ---- See the shared memory heartbeat incrementing. + Use crtl-C to break out of shmemusr. + Then remove the realtime task + + /sbin/rmmod shmemtask + + 6. Run the semaphore example: + + /sbin/insmod rtlib/master.o + + The master task will start giving the semaphore once per + second, printing to the log when it does. + + /sbin/insmod rtlib/slave.o + + The slave attempts to get the semaphore, and prints each + time it succeeds. Since the master has already given the + semaphore several times, and it is a counting semaphore, + the slave will run several times in a row. Once it catches + up with the master, it will run right after the master runs. + Stop the tasks in reverse order: + + /sbin/rmmod slave + /sbin/rmmod master + + 7. Run the FIFO example: + + /sbin/insmod rtlib/fifotask.o + + The realtime fifotask will begin writing strings to the + fifo once per second, and echoing the strings to the log + file. + + bin/fifousr + + The user mode program will read strings from the fifo and + and print them out. + + Use ctrl-c to exit fifousr, and stop the task: + + /sbin/rmmod fifotask + + + 8. More elaborate tests: + + In theory, you should be able to run any or all of the + above tests at the same time, doing insmod's and rmmod's + in any order. (Note - the semaphore master task must + always be installed before and removed after the slave + task.) + + 9. Shutting down. + + To remove the rtapi and the rest of the RTOS modules: + + ./remove_realtime_base + + If any tasks are still running, the script should print + the module names and refuse to procede. Shut down the + modules (rmmod) and try again. + + The Uninstall Process |