-
Notifications
You must be signed in to change notification settings - Fork 1
3 Install
If you have followed the instructions on how to build Skinware, you can install it simply by:
$ sudo make installNow that Skinware is installed, you can write drivers, services or applications based on it. For that, please see the other tutorials. In the following, general instructions to build an application using Skinware are shown.
URT and Skinware are by default installed in standard locations. Therefore, you wouldn't need to indicate any flags
during compilation. During linking, you would just need to add -lskin -lurt to include both libraries. However,
URT itself uses a real-time application interface that is different based on its configuration. The urt-config tool
is written to provide the correct compile and link flags. In the near future, .pc files usable by pkg-config will
be provided which can simplify this process.
As an example, imagine a Skinware-based driver consisting of two compilable files: main.c, cyskin.c. You can build
this driver with the following commands (through make, automake or any other means):
$ gcc -std=gnu11 -c $(urt-config --user-cflags) main.c
$ gcc -std=gnu11 -c $(urt-config --user-cflags) cyskin.c
$ gcc -std=gnu11 -o cyskin_driver main.o cyskin.o -lskin -lurt $(urt-config --user-ldflags)Note that -std=gnu11 is used (although -std=gnu99 would have also been ok) due to the use of C99 semantics of the
inline keyword used in the headers.
If URT's back-end supports kernel modules (such as with RTAI), you could proceed similarly, except urt-config would
need to be consulted for --kernel-cflags and --kernel-symbols to set EXTRA_CFLAGS and KBUILD_EXTRA_SYMBOLS
parameters respectively before calling the kernel's Makefile:
$ kernel_path=/lib/modules/$(uname -r)
$ make -C "$kernel_path/build" M="$PWD" \
EXTRA_CFLAGS="$(urt-config --kernel-cflags)" \
KBUILD_EXTRA_SYMBOLS="$(urt-config --kernel-symbols) $kernel_path/skin/Module.symvers $kernel_path/urt/Module.symvers"Next: See other tutorials.