RTAI

Instructions for Installing RTAI kernel modules into an on-flash OpenWrt system.

Compiling

    1. Get OpenWrt from the Bifferboard git repo, using git clone git://github.com/bifferos/bb.git

    2. Under in the configuration menu for OpenWrt go to "Base system" -> "rtai-led-demo" and make sure it's selected <*>.

    3. Type 'make' to build

Example Code

See https://github.com/bifferos/bb/blob/master/package/rtai-examples/src/rtai-led-demo.c. In order to run the example, you'll need to do a few things:

    1. To get rid of the watchdog daemon and module, type "killall watchdog; rmmod rdc321x_wdt"

    2. Load some modules:

      1. insmod rtai_hal

      2. insmod rtai_lxrt

      3. insmod rtai_fifos

  1. run the example program rtai-led-demo, and pay close attention to the red LED on the board.

TODO

Some projects left as an exercise for the reader:

    1. Using two GPIO pins create a software UART. 4800 baud is probably achievable.

    2. Create a 'sound card' using 4 GPIO pins to form an SPI interface that feeds a D->A converter.

    3. Create a software PWM device for motor control