New Live CDs have been posted with the latest version of RTXI (1.1.2). Please see the updated Live CD installation notes for instructions on how to use them.
One of the biggest changes in RTXI 1.1.2 is the ability to compile custom modules outside the RTXI source tree. Your code can be placed anywhere on your system and we provide a Makefile template in /usr/local/share/rtxi. The following sections will illustrate the sections of the code that you will need to edit. Be sure to leave other sections of the code untouched.
Make and compile your own class
- Rename your custom module folder and the CPP and header file.
- In the CPP file, change the reference to include your new header file.
- If you like, throughout the CPP and header file, change all the class names to your own class. If you started from the Hodgkin-Huxley neuron model, you would replace every instance of “Neuron” before the function declarations and implementions.
- Edit the Makefile to refer to your class and filename. You can, of course, incorporate other classes, and you must add the appropriate included files to the SOURCES list in the Makefile. List all the additional *.cpp and *.h files on the SOURCES line with a single space between each filename. If you use any additional libraries, you can add them using the “LIBS =” tag. Below is the sample Makefile provided as /usr/local/share/rtxi/Makefile.plugin_example. As noted, do not edit the last line. This will append additional code that correctly links your new module with other shared libraries on your system and makes them available to RTXI. For more examples of Makefiles, see any of the downloadable modules on this site.
Here is a sample Makefile:
PLUGIN_NAME = my_plugin HEADERS = my_plugin.h SOURCES = my_plugin.cpp LIB = ### Do not edit below this line ### include $$(shell rtxi_plugin_config --pkgdata-dir)/Makefile.plugin_compile
- Compile your module. Inside your module’s directory:
$ make
$ make installYou should see some libraries appear in that directory and my_plugin.so should be copied to /usr/local/lib/rtxi. When you go to the Module Loader in RTXI, you should see your new module there.




