NAI SSK Linux Guide (SSK 1.x)

Overview

This document describes how to set up a Linux development environment and build the software libraries and sample applications of NAI’s Software Support Kit (SSK) 1.x, either on an Intel-based NAI board (e.g. 75INT2) or on a Linux host PC with an NAI PCI board (e.g. 79C3, 79G5) installed.

Environment Setup

The Linux Library SSK can be used with Intel-based NAI boards (eg. 75INT2) or NAI boards that live in the PCI slot of a Linux-based PC (eg. 79C3, 79G5). In both cases, the NAI Linux SSK was tested with CentOS 6.5. Other Linux distributions and kernel versions may function, but support is not guaranteed.

The pre-installed OS on the 75INT2 has the following default credentials:

  • username: nai
  • password: 123456
  • default root password: 123456.

Building and Loading NAI PCI driver

Run the following series of commands to build and load the NAI PCI driver on your Linux Host:

cd /home/nai/NAI_SSK/Drivers/PCI
$ make clean
$ make all
$ sudo chmod a+x nai_install.sh
$ sudo ./nai_install.sh load

Development Environment Setup

NAI Intel x86 boards are pre-installed with CentOS 64-bit v6.5 and GCC development tools and standard C libraries are pre-loaded in OS. To install these libraries on a non-NAI Linux host or reinstall onboard, run the following commands:

$ sudo yum groupinstall “Development Tools”
$ sudo yum install libstdc++-devel.i686
$ sudo yum install glibc-devel.i686

Now that your host is configured with the proper tools and NAI drivers, you can now choose your favorite IDE to develop C programs with and open the Software Support Kit.

Building and Running a Project

PACKAGE LAYOUT

The NAI Linux SSK includes the following folders:

ResourceDescription
App/Linux_x86Contains pre-built 32-bit x86 Linux executable ELF files
AppSrcContains the source for module-specific NAI sample applications
DocumentationContains NAI’s API library, API function mappings, and reference documents
DriversContains I2C and PCI drivers for using NAI boards in Linux
IncludeContains the header files(.h) needed by the applications to call functions in the NAI library (.so) file
Libraries/naibrdContains the source code and GNU Makefile to build NAI SSK Linux share library (.so) and static library (.a)

Building NAI SSK Library

NAI provides the source code of hte NAI SSKLibrary, and you can also rebuild the library on the NAI Intel board.

  1. Enter the following commands to build the NAI SSK Library:

Note

To build the SSK for a 64-bit host, change the references to x86_32 to x86_64 in all make commands.

$ cd <directory of NAI SSK on host PC>/Libraries/naibrd
$ make clean NAI_TARGET_BOARD_TYPE=x86_32
$ make all NAI_TARGET_BOARD_TYPE=x86_32
  1. Enter the following commands to install the NAI SSK share library:
$ sudo make uninstall NAI_TARGET_BOARD_TYPE=x86_32
$ sudo make install NAI_TARGET_BOARD_TYPE=x86_32

Building naiapp_common Library

naiapp_common is a library included in the AppSrc folder of the NAI SSK package that is used by the sample applications. It must be built and installed like the naibrd library in order for the sample applications to run.

  1. Enter the following commands to build the naiapp_common library:
$ cd <directory of NAI SSK on host PC>/AppSrc/naiapp_common
$ make clean NAI_TARGET_BOARD_TYPE=x86_32
$ make all NAI_TARGET_BOARD_TYPE=x86_32
  1. Enter the following commands to install the naiapp_common share library:
$ sudo make uninstall NAI_TARGET_BOARD_TYPE=x86_32
$ sudo make install NAI_TARGET_BOARD_TYPE=x86_32

Building NAI Sample Applications

NAI provides source code of the sample applications in the NAI SSK package, and you can rebuild the sample application on the NAI Intel board or Linux host.

  1. Enter the following commands to build the NAI SSK sample applications:
$ cd <directory of NAI SSK on host PC>/AppSrc
$ make clean NAI_TARGET_BOARD_TYPE=x86_32
$ make all NAI_TARGET_BOARD_TYPE=x86_32

The compiled .elf files of all sample applications are now available to be run from the /App directory of the package.