Page 1
API-FDX Linux Getting Started Manual ARINC664 Interface Module API-FDX-2 V2 (PCI Version) AIM GmbH Sasbacher Str. 2 79111 Freiburg, Germany Tel: +49-761-45229-0 Fax: +49-761-45229-33 sales@aim-online.com www.aim-online.com April 2007 V14.3x Rev. A...
Page 3
GmbH API-FDX Linux Getting Started Manual ARINC664 Interface Module API-FDX-2 V2 (PCI Version) V14.3x Rev. A April 2007 60-15920-35-143X-A...
Page 4
Notice: The information that is provided in this document is believed to be accurate. No responsibility is assumed by AIM for its use. No license or rights are granted by implication in connection therewith. Specifications are subject to change without notice.
Page 5
GmbH DOCUMENT HISTORY The following table defines the history of this document. The description of changes/enhancements made to each version is defined in general terms. Version Cover Date Created by Description V14.33 April 2007 M. Melcher General Updates. Adaptations to Kernel Versions > 2.6.17 V13.11 May 2006...
Page 6
GmbH THIS PAGE IS INTENTIONALLY LEFT BLANK...
1. INTRODUCTION 1.1. General This Getting Started Manual has been developed to assist first time users of the AIM API-FDX boards with software installation, hardware setup, and starting a sample project Step by step instructions cover board installation, driver configuration and Board Software Package installation.
Section 1 – Introduction GmbH 1.2. How This Manual Is Organized This manual is organized as follows: Section 1, INTRODUCTION, contains an overview of this manual. Section 2, REQUIREMENTS, lists all the requirements the system must meet for the BSP. Section 3, NEW BSP INSTALLATION PROCEDURE, describes the procedure used to install the BSP software and the AFDX hardware on a system that does not have a previous API-FDX BSP installed.
Section 1 – Introduction GmbH 1.3. Conventions Used Within this document, a number of styles of text and layout will be used to help differentiate between the different kinds of information. Here are examples of the styles used and an explanation of what they mean: - keys that you press on the keyboard, like Ctrl and Enter.
Section 1 – Introduction GmbH 1.4. Applicable Documents AIM has developed several documents that may be used to aid the developer with other aspects involving the use of the API-FDX interface module. These documents and a summary of their contents are listed below:...
Section 2 – Requirements GmbH 2. REQUIREMENTS To install the BSP, your system must meet the following requirements. A linux 2.4 or 2.6 kernel, configured to provide module support make-3.80 gcc 3.x or gcc 4.x a free PCI slot for the board if not already installed API-FDX Linux Getting Started Manual...
Page 14
Section 2 – Requirements GmbH THIS PAGE IS INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
The firmware upgrade utility files are not installed on the system The software is available on CD from AIM or via a download from AIM-Online. Appendix A contains instructions for obtaining the BSP via a download from AIM-Online.
Section 3 – New BSP and Hardware Installation Procedure GmbH 3.1. Hardware Installation The API-FDX features full PCI Plug-and-Play capability. There are no jumpers or switches to modify before installation. The hardware installation is completed by performing the steps as described below: To install the API1-FDX board ESD Warning!!! The API-FDX boards are typical electronic devices that are sensitive...
To install the BSP software from the AIM provided CD or a download from AIM- Online 1. If using the AIM provided CD, insert the CD into the CD ROM drive and mount it with “ ” or the command your distribution recommends.
Page 18
Section 3 – New BSP and Hardware Installation Procedure GmbH Removing aim files Stopping module aim_fdx Uninstalling successful Compiling module for kernel linux-2.6.x Installing aim module to /lib/modules/2.6.17/extra//aim_fdx.ko Installing scripts /etc/init.d/aim_fdx, /etc//rc2.d/S99aim_fdx, /etc//rc2.d/K01aim_fdx Compiling library Installing library Installing includes Installing firmware Loading minimal driver for firmware update Device /dev/aim_fdx created on major no.
Section 3 – New BSP and Hardware Installation Procedure GmbH 3.3. Update the Onboard Flash Firmware The installation script updates all boards to the correct firmware version. A manual update is not necessary. API-FDX Linux Getting Started Manual...
To deinstall the BSP, cd into “./apifdx-linux-bsp-13.00/” and run “ ”. This will remove all the files created during the installation. ./install.sh --uninstall /home/melcher/apifdx-linux-bsp-14.33 # sh ./install.sh -–uninstall Removing aim files Stopping module aim_fdx Uninstalling successful /home/melcher/apifdx-linux-bsp-14.33 # API-FDX Linux Getting Started Manual...
PC driver software and the onboard target driver software. The BSP is available on CD from AIM or via a download from AIM-Online. Appendix A contains instructions for performing the download.
Page 22
Section 2 – Requirements GmbH THIS PAGE IS INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
******************************************************************** 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 “...
Page 24
Section 6 – Recompilation and Reinstallation of the driver GmbH THIS PAGE INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
Section 6 – Recompilation and Reinstallation of the driver GmbH 6. RUNNING THE BOARD TEST APPLICATIONS The library features some small test applications, that are used to test the functionality of the library and the BSP. Most of them require that both ports of the FDX Board are connected by a crossover cable.
Page 26
Section 6 – Recompilation and Reinstallation of the driver GmbH THIS PAGE INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
Section 7 – Recompilation and Reinstallation of the driver GmbH 7. RECOMPILATION AND REINSTALLATION OF THE DRIVER A recompilation of the module may be necessary if the kernel configuration has changed fundamentally, e.g. either a different kernel version is used or the kernel is switched from uniprocessor to SMP.
Page 28
Section 7 – Recompilation and Reinstallation of the driver GmbH THIS PAGE INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
ANDLE = 0; ANDLE = 0; ANDLE = 0; ANDLE 8.1.2. Basic Library Functions and AIM Resource Login Initialize the API, find available AyI-FDX resources, and login to local board and ports. bool MyFdxInit() DWORD dwTmp; bool bRetSuccess = false;...
Page 30
Section 8 – Programming the API-FDX Module GmbH // search the server-list for local server px_TmpServer = px_ServerNames; while ((px_TmpServer != NULL) && (!bFoundLocalServer)) if (stricmp(px_TmpServer->auc_ServerName, "local") == 0) bFoundLocalServer = true; else px_TmpServer = px_TmpServer->px_Next; //Query the local server configuration and login to the board and ports if (bFoundLocalServer) if (FdxQueryServerConfig("local", &pRLEHead) == FDX_OK) pRLE = pRLEHead;...
Page 31
Section 8 – Programming the API-FDX Module GmbH // free the resource-list if (pRLEHead != NULL) FdxCmdFreeMemory(pRLEHead, pRLEHead->ul_StructId); // free the server-list if (px_ServerNames != NULL) FdxCmdFreeMemory(px_ServerNames, px_ServerNames->ul_StructId); define success have valid handles global variables..bRetSuccess (g_ulBoardHandle && (g_ulPort1Handle 0) && (g_ulPort2Handle != 0);...
Section 8 – Programming the API-FDX Module GmbH 8.1.5. Setting up a UDP Port oriented Transmitter void MyFdxSetupTxPort() TY_FDX_TX_MODE_CTRL x_TxModeCtrl; TY_FDX_TRANSMIT_VL x_TxVL; TY_FDX_UDP_DESCRIPTION x_UdpDesc; AiUInt32 ul_BytesWritten; Char pBuf[50]; Int uiBufLen; //--- Set Port Transmitt mode to: individual/UDP-Port oriented x_TxModeCtrl.ul_TransmitMode = FDX_TX_INDIVIDUAL; FdxCmdTxModeControl(g_ulPort1Handle, &x_TxModeCtrl);...
Page 35
Section 8 – Programming the API-FDX Module GmbH //Write message to UDP Port on Sub VL 2 if (g_Udp2Port1Handle != NULL) sprintf(pBuf, “Testing UDP Port on Sub VL 60 -- Sub VL 2”); uiBufLen = strlen(pBuf); FdxCmdTxUDPWrite(g_ulPort1Handle, g_Udp2Port1Handle, uiBufLen, (const void *) pBuf, &ul_BytesWritten) API-FDX Linux Getting Started Manual...
Section 9 – Notes GmbH 9. NOTES 9.1. Acronyms and Abbreviations AIM PCI I-Architecture AIM PMC Architecture ARINC Aeronautical Radio, Incorporated BIOS Basic Input Output System Board Support Package Compact Disk CPCI Compact PCI C (Language) Virtual Instrument Dynamic Link Library...
Page 44
Section 9 – Notes GmbH THIS PAGE INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
Page 45
Appendix A – Downloading the BSP from AIM-Online GmbH APPENDIX A. DOWNLOADING THE BSP FROM AIM-ONLINE The AIM-Online DOWNLOAD AREA consists of current manuals, BSPs, and documentation categorized by product. To obtain the API-FDX BSP from AIM-Online Go to http:\\www.aim-online.com The aim-online.com main web page appears.
Page 46
Appendix A – Downloading the BSP from AIM-Online GmbH To download the BSP Select the BSP Software button (with or without manuals) This brings up a File Download dialog box. Select the Save this Program to Disk option Choose the destination location, and start the file transfer.
Page 47
Appendix B – Cross-Compilation GmbH B. CROSS-COMPILATION When the BSP is installed, it is compiled for the host’s environment. But module, library and example programs can be manually cross-compiled by setting these few environment variables. KERNEL_DIR=/targets/tmp/linux-2.4.21-ppc/ export KERNEL_INC_PATH=${KERNEL_DIR}/include/ export EXTRA_CFLAGS="-DDONT_USE_HIGH_PERF_COUNTER" export EXTRA_KERNEL_CFLAGS=-I${KERNEL_DIR}/arch/ppc export MAKEFLAGS=LOCAL_LIBRARY=y •...
Page 48
Appendix B – Cross-Compilation GmbH THIS PAGE INTENTIONALLY LEFT BLANK API-FDX Linux Getting Started Manual...
Need help?
Do you have a question about the API-FDX-2 V2 and is the answer not in the manual?
Questions and answers