API-FDX Linux Getting Started Manual
15
GmbH
Section 6 – Recompilation and Reinstallation of the driver
5. COMPILING AND RUNNING THE SAMPLE PROJECT
The API-FDX BSP includes a subdirectory “
./samples/
” that consists of an API_FDX
application sample programs. This section contains the procedure which can be used to
compile and run any of the sample programs included in the sample workspace (once the BSP
has been installed).
The sample project has this directory layout.
./src/
The example source files
./obj/
The release object files, using
“
libaim_fdx.so
”
./obj_dbg/
The debug object files, using
“
libaim_fdx.so
”
To build the applications, change into the subdirectory
“
./samples/
” and run “
make –s
”.
The binaries will be located then in “
./obj/
”. In order to debug the applications, run
“
make –s
” inside “
./obj_dbg/
”
melcher:~$ cd ~/apifdx-linux-bsp-14.33/samples/obj
melcher:~/apifdx-linux-bsp-14.33/samples/obj$ make –s
melcher:~/apifdx-linux-bsp-14.33/samples/obj$ ./lib_aim_fdxtest
********************************************************************
Testprogramm for AFDX Target Software=======================
Rolf Heitzmann / Michael Riedinger AIM, 22.06.2004
Date and Time of creation of sample:Apr 3 2007 13:30:20
If the application in the samples directory fails to load because "
libaim_fdx.so
" can't be
found, then either
“
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
”
needs to be entered on the shell before the application is launched or a line
"
/usr/local/lib/
" must be added to “
/etc/ld.so.conf
” and then "
ldconfig
" be
called. Then try again.
Note: Applications can be built and used as a normal, non-root user.