SSK 1.X Linux (Makefile) Target
Edit this on GitLab
Overview
This Quick Start Guide describes how to run an NAI sample application on a NAI ARM Linux target board. Setting up the NAI SSK in a development environment will also be described.
Note
This manual assumes that the target board has been configured with an RS-232 Debug connection and an Ethernet port 1, all accessible to the programmer.
Prerequisites
Item |
Description |
Host PC: |
Windows 7 or later |
RS-232 Serial Cable: |
Used for accessing the Linux shell terminal on the ARM target board |
Ethernet Cable: |
Used for Telnet to download/upload files into the ARM target board and remote GDB debugging |
Adapter Board: |
Converts the HDMI connector on the ARM board to serial and Ethernet protocols |
Putty: |
SSH client for connecting to target board via Ethernet |
naibrd_SSK_Linux_ARM_Rev1.60 Library: |
NAI Board Software Support Kit for application development |
Tera Term: |
Serial Console used to interface with the Linux OS on the ARM target board |
Links to Resources
Putty - http://www.putty.org/
Tera Term - https://en.osdn.jp/projects/ttssh2/releases/
Naibrd_SSK_Linux_ARM_Rev1.60 Library – https://www.naii.com/Downloads/
ARM Board – Getting Started
Remote Connection
The serial connection and Ethernet port are accessed through the HDMI connector on ARM target boards. For ruggedized ARM enclosures, both ports are routed to a MIL connector. You may need an external adapter board (see below) to convert the HDMI connector to a serial and Ethernet port.
CAUTION
Ensure that target board is powered off, until directed to power it on.
HDMI Connector |
MIL Connector |
Note
The USB-A connector on the adapter board is not supported by the ARM target board.
Adapter Board
Serial Port
Note
The following procedures refer to NAI target board and are also applicable to the target board contained in the ruggedized enclosure.
-
Open serial console on Host PC (e.g. Tera Term, Mimicom) and do the following:
-
In Tera Term, select Setup→Serial Port…
-
-
Set Baud Rate to 115200.
-
Set Parity Bit to None.
-
Set flow control to “None”.
-
Power up the target board.
-
The default user name on the target Linux is “root” and password is “root”.
Ethernet Port
-
Connect the Ethernet port from target board and Host PC to a local network.
-
Open putty on host PC.
Note
The default IP address of the target board is available on the label or it can be obtained by running the ifconfig command from shell terminal.
-
Power up the target board.
-
The default user name on the target Linux is “root” and password is “root”.
Changing the Ethernet IP Addresses
The target board contains 2 Ethernet Interfaces. Each Ethernet Interface is assigned a unique MAC address and static IP address. The MAC addresses and static IP addresses are stored on the motherboard EEPROM. The static IP address can be changed using an EEPROM update utility provided with the unit. The MAC addresses should not be changed.
To access the EEPROM utility from the Linux shell terminal, proceed as follows:
-
Log in as a root user as described in the previous sections.
-
Display the contents of the motherboard EEPROM by typing:
mbeeprom_util display
-
The following or something similar (your model may vary) displays:
root@nai-niu1a:~# mbeeprom_util display
NAI ARM-SOC Motherboard EEPROM Utility (mbeeprom_util) Target Processor: Xilinx ARM Target OS: PetaLinux Build Revision: 3.32.3 Build Date: Oct 29 2014 08:26:22 UTC Displaying Motherboard EEPROM - Start 00000000: 4E 4F 4E 45 :NONE: 00000004: 32 33 31 34 :2314: 00000008: 42 4F 4F 31 :BOO1: 0000000C: 00 00 00 00 :: 00000010: 04 00 00 00 :: 00000014: 00 00 00 00 :: 00000018: 4E 49 55 00 :NIU: 0000001C: 31 41 00 00 :1A: 00000020: 01 00 02 00 :: 00000024: 01 00 02 00 :: 00000028: AA BB CC DD :ª»ÌÝ: 0000002C: EE FF 00 00 :îÿ: 00000030: 65 74 68 30 :eth0: 00000034: 00 00 00 00 :: 00000038: C0 A8 01 10 :À¨: 0000003C: FF FF FF 00 :ÿÿÿ: 00000040: C0 A8 01 01 :À¨: 00000044: 20 02 C0 A8 : À¨: 00000048: 01 01 00 00 :: 0000004C: 7C 99 D1 18 :\|Ñ: 00000050: 90 58 12 35 :X5: 00000054: 40 00 00 00 :@: 00000058: 11 22 33 44 :"3D: 0000005C: 55 66 00 00 :Uf: 00000060: 65 74 68 31 :eth1: 00000064: 00 00 00 00 :: 00000068: C0 A8 02 10 :À¨: 0000006C: FF FF FF 00 :ÿÿÿ: 00000070: C0 A8 02 01 :À¨: 00000074: 20 02 C0 A8 : À¨: 00000078: 01 02 00 00 :: 0000007C: 7C 99 D1 18 :\|Ñ: 00000080: 90 58 12 35 :X5: 00000084: 30 00 00 00 :0: 00000088: 00 0F 00 00 :: 0000008C: 00 00 00 00 :: 00000090: 00 00 00 00 :: 00000094: 41 CE 42 CE :AÎBÎ: 00000098: 41 CE 42 CE :AÎBÎ: 0000009C: E6 CD E7 CD :æÍçÍ: 000000A0: F0 CD F1 CD :ðÍñÍ: 000000A4: 00 00 00 00 :: 000000A8: 00 00 00 00 :: 000000AC: 00 00 00 00 :: 000000B0: 00 00 00 00 :: 000000B4: 00 00 00 00 :: 000000B8: 00 00 00 00 :: 000000BC: 00 00 00 00 :: 000000C0: 00 00 00 00 :: 000000C4: 00 00 00 00 :: 000000C8: 00 00 00 00 :: 000000CC: 00 00 00 00 :: 000000D0: 00 00 00 00 :: 000000D4: 00 00 00 00 :: 000000D8: 00 00 00 00 :: 000000DC: 00 00 00 00 :: 000000E0: 00 00 00 00 :: 000000E4: 00 00 00 00 :: 000000E8: 00 00 00 00 :: 000000EC: 00 00 00 00 :: 000000F0: 00 00 00 00 :: 000000F4: 00 00 00 00 :: 000000F8: 00 00 00 00 :: 000000FC: 00 00 00 00 :: Displaying Motherboard EEPROM – Start
The Eth-0 IP Address is stored at EEPROM address 00000038: C0 A8 01 10 (192.168.1.16)
The Eth-1 IP Address is stored at EEPROM address 00000068: C0 A8 02 10 (192.168.2.16)
To update the static IP addresses, enter the following commands (substitute your desired IP addresses):
root@nai-niu1a:~/NAII# mbeeprom_util set EthA_IPv4Address 192.168.1.16 root@nai-niu1a:~/NAII# mbeeprom_util set EthA_IPv4SubnetMask 255.255.255.0 root@nai-niu1a:~/NAII# mbeeprom_util set EthB_IPv4Address 192.168.2.16 root@nai-niu1a:~/NAII# mbeeprom_util set EthB_IPv4SubnetMask 255.255.255.0
The updated IP addresses will take effect on the next system reset.
CAUTION
The mbeeprom_util program will allow you to erase the entire contents of the EEPROM. DO NOT do this as it will erase important system parameters including the Ether Interface MAC addresses. The ARM board will not function without these settings.
DO NOT alter any of the other EEPROM fields as the ARM board will not function without the correct settings.
Development Environment Setup
Host PC
The recommended development platform is a PC with minimum 2GB RAM and 30GB hard drive space, and with Windows 7 or later.
Cross-Compiler
The ARM Linux Cross-Compiler package is available on Xilinx’s website. Download the software as follows:
-
If you have not done so already, create a Xilinx account and make sure you are signed into it for the duration of the installation (you will need to be signed in to complete some parts of the installation).
-
Navigate to:
-
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive.htmlLocate release 2014.2 and download “Vivado 2014.2 Full Image for Windows with SDK”.
-
On the “Download Center” page that comes up, fill out all of the required fields and then press “Next”.
-
In the window that pops up, select “Save File” and then click “OK” to save the file to the “Downloads” directory on your PC.
-
Unzip the “Xilinx_Vivado_SDK_Win_2014.2_0612_1.tar.gz” file, which should now be found in the “Downloads” directory on your PC.
-
Run xsetup.exe from the unzipped file folder.
-
Click “Yes” when the User Account Control window pops up.
Note
The Vivado 2014.2 Installation menu will prompt you to install a newer version of Vivado SDK.
DO NOT upgrade to the newer version of the SDK.
-
If a window pops up that says it is checking for the latest version, click “Ignore”. If a window labelled “A Newer Version Is Available” pops up, click “Continue”.
-
In the “Vivado 2014.2 Installer – Welcome” window, click “Next >”.
-
In the “Accept License Agreements” window that pops up, check all of the “I Agree” check boxes and then click “Next >”.
-
Select “Software Development Kit (Standalone)” edition to install. This package includes the Cross-Compiler and debugger for application development. Then click “Next >”.
-
In the 1st and 2nd window, click “Next >”. In the 3rd window, click “Install”.
-
After the installation is complete, if you do not already have a license file for the SDK on your computer, select “Get Free Licenses – Vivado WebPACK, SDK, free IP and more”. Then, click “Connect Now”.
Note
You don’t need to purchase a license for the Software Development Kit (Standalone).
-
When you click “Connect Now”, you will be taken to the Xilinx website. If you are not signed in to your Xilinx account, sign in. If the Xilinx website asks you to fill out some personal information, fill it out. Then, you will be taken to the “Product Licensing” page. Select “Vivado Design Suite: HL WebPACK 2015 and Earlier License”, and then click “Generate Node-Locked License”.
-
Click “Next”.
-
Click “Next” again. The license file will now be emailed to the email account you specified when creating your Xilinx account. Copy the license file to your PC so that it can be detected when you run the SDK.
-
Open Xilinx. You will be prompted to choose a workspace location. This will be where all the projects you create will be placed. There is no certain place where the workspace needs to be made; in this case, the workspace, called “Workspace,” is made in the C drive.
-
Exit the “Welcome” tab that shows up by default.
Access files on Target Board
This can be done within the Xilinx SDK by setting up a new SSH remote system from the Remote System Explorer.
-
Navigate to File→New→Other
-
In “Select a wizard” window, navigate to Remote System Explorer→Connection and double-click “Connection”.
-
In “Select Remote System Type” window, double-click “SSH Only”.
-
In “Remote SSH Only System Connection” window, enter the IP Address of the target board in both the “Host name:” and “Connection name:” fields. In the “Description:” field, enter “Host name = IP of remote target”. Then click “Finish”.
-
Navigate to Window→Open Perspective→Other…
-
In “Open Perspective” window, double-click “Remote System Explorer”. The SSH remote system that we will use should be set up, and the Remote System Explorer should be open.
-
In the Remote System Explorer (i.e. the “Remote Systems” tab), expand the <IP Address of target board> node and navigate to <IP Address of target board>/Sftp Files/Root///home/root. If you are prompted for credentials to access the “Root” directory, the User ID and Password are both “root”. Then, right-click “root” (<IP Address of target board>/Sftp Files/Root//home/root). This is the location on the board that we will copy executables to in order to run them on the board.
Building the “Hello World” Application
Create simple HelloWorld.c file on the Host PC as follows:
-
Navigate to File→New→Project→C/C++.
-
Select “C Project” and click “Next >”.
-
Select “Xilinx ARM Linux Executable” under “Project type:” and make sure “Xilinx ARM GNU/Linux Toolchain” is selected under “Toolchains:”. Also, set “Project name:” to “HelloWorld”. Then, click “Next >”.
-
You will be asked to select project configurations. Selecting Debug means debugging and symbolic information is included. Selecting Release means the compiler will optimize the executable and strip it of debugging information. By default, both Debug and Release configurations are selected. You can leave the defaults and select <Finish>.
-
Add the HelloWorld src file by right clicking on the HelloWorld project in the project explorer and then selecting New→File. This will cause the “New File” window to come up.
-
Make sure that HelloWorld is selected as the parent folder. Then, enter HelloWorld.c as the File Name and click the “Finish” button.
-
Type some code to execute in the HelloWorld.c file. Then, save the project and build it by clicking the hammer icon.
Running “Hello World” on the Target Board
An executable .elf file may be run from the board using either a Serial Console (Tera Term) or the Xilinx SDK.
-
Copy the HelloWorld.elf executable file from your PC to the /home/root directory of the target board.
-
In the Xilinx SDK, in the “Remote Systems” tab in the “Remote System Explorer” perspective, right-click “root” (<IP Address of target board>/Sftp Files/Root///home/root) and click “Export From Project…”
-
-
In the “Remote file system” window, in the left box, navigate to and select HelloWorld/Debug (but do not check either the “HelloWorld” or “Debug” folders, as this will copy over the entire folder). In the box on the right, select and check the check box next to “HelloWorld.elf”. Then, click “Finish”.
-
Run HelloWorld.elf using either the Serial Console or the Xilinx SDK.
Running “Hello World” Via the Serial Console (Tera Term used in this example)
-
Navigate to the /home/root directory of the target board using the serial console (Tera Term).
-
While in this directory, type chmod 777 HelloWorld.elf to change the permission mode of HelloWorld.elf to executable.
-
Stay in the /home/root directory and type ./HelloWorld.elf to run the program via the serial console.
Running “Hello World” via the Xilinx SDK
-
In the Xilinx SDK, with “HelloWorld” selected in the Project Explorer, go to Run→Run Configurations…
-
In the “Run Configurations” window, double-click “Target Communication Framework”. This will create a new TCF run configuration for the HelloWorld project, called “HelloWorld Debug” by default.
-
With the “HelloWorld Debug” configuration selected, under the “Target” tab, uncheck the check box labelled “Use local host as the target”. Then, in the “Available Targets:” list view, select the row saying “TCF Agent” in the “Name” column and lists the target board’s IP Address in the “Host” column. Then, verify that it says “TCP:<IP Address of target board>:<port number>” in the “Target ID:” text box. In this case, the IP Address is 192.168.1.16, and the port is 1534.
-
Click the “Apply” button.
-
Navigate to the “Application” tab.
-
Fill in the text boxes highlighted in the picture. For the “Project Name:” text box, you can click the “Browse…” button and select “HelloWorld” from the list of projects. Then, in the “Application” group box, next to the “Local File Path:” text box, you can click the “Search…” button and select “HelloWorld.elf” from the pop up menu. Then, type “/home/root/HelloWorld.elf” into the “Remote File Path:” field.
-
Click “Apply” to save all the changes you just made, and then click “Run” to run “HelloWorld” using the “HelloWorld Debug” run configuration.
Debugging “Hello World” via the Xilinx SDK
The process of Debugging a program via the Xilinx SDK is very similar to the process of Running a program via the Xilinx SDK.
-
If it has not been done already, copy the HelloWorld.elf executable file from your PC to the /home/root directory of the target board. This can be done via the Xilinx SDK. See step 1 of “file:///C:\Users\apexlab\AppData\Local\Microsoft\Windows\Temporary%20Internet%20Files\Content.IE5\BG0WV69L\Hello_World#Running[Running “Hello World” on the Target Board]” for more details.
-
If you have not done so already, create a run configuration for the HelloWorld project (see “file:///C:\Users\apexlab\AppData\Local\Microsoft\Windows\Temporary%20Internet%20Files\Content.IE5\BG0WV69L\Hello_World#Running[Running “Hello World” via the Xilinx SDK]”).
Note:
The run configuration you just made for the HelloWorld project can also be used as a debug configuration.
-
Navigate to Run→Debug Configurations…
-
In the “Debug Configurations” window, under “Target Communication Framework”, select “HelloWorld Debug” (the run configuration we created). The configuration properties you set up in Running “Hello World” via the Xilinx SDK should still be there.
-
Click “Debug” to start debugging the HelloWorld project.
Building naibrd_SSK_Linux_ARM_Rev1.60 Library
NAI provides a pre-built library and source code. You can also rebuild the library on your Host PC.
Note
Cross-Compiler and PATH must be configured on Host PC. Refer to Step 18 of subsection Cross-Compiler of section Development Environment Setup for details.
Note
The latest version of Linux Library for ARM Processor SSK can be found at: http://www.naii.com/Downloads.
-
Copy NAI SSK Library and Sample Application package to Host PC.
-
Build NAI SSK Library on Host PC to generate a (libnaibrd.so) file as follows:
-
Import <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\Libraries\naibrd as a project.
-
-
Click File→Import…
-
On the Import pop-up page, select the option “Existing Code as Makefile Project” under “C/C++” and then click the “Next >” button.
-
Click “Browse…” and navigate to <directory of naibrd_SSK_Linux_ARM_Rev1.60>\Libraries\naibrd. Once you navigate to this folder and click OK, the text box labelled “Project Name” will fill itself out with the name of the naibrd folder (which is “naibrd”).
-
Select “Xilinx ARM GNU/Linux Toolchain” under “Toolchain for Indexer Settings”, and then click “Finish”.
-
With naibrd Project selected in the Project Explorer, select Project→Properties→C/C++ Build→Environment, and click the “Add…” button.
-
Enter a new environment variable with Name = NAI_TARGET_BOARD_TYPE and Value = arm, and click “OK” button.
-
Click Apply Button
-
To Clean and Build the naibrd project, right-click on “naibrd” in the Project Explorer and click “Clean Project”. Then, with “naibrd” selected in the Project Explorer, either click the hammer icon at the top of the page or right-click on “naibrd” in the Project Explorer and click “Build Project”.
-
Copy NAI library (libnaibrd.so) from <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>/Libraries/naibrd to <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC >/Lib/Linux_ARM.
Copy from here
Copy to here
Note
NAI sample application MakeFile will link with the library (.so) file in /Lib/Linux_ARM folder. Ensure the latest library file is in that folder.
-
Build NAI SSK Library on Host PC to generate a (libnaiapp_common.so) file as follows:
-
Import <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\AppSrc\naiapp_common as a project.
-
-
Click File→Import…
-
On the Import pop-up page, select the option “Existing Code as Makefile Project” under “C/C++” and then click the “Next >” button.
-
Click “Browse…” and navigate to <directory of naibrd_SSK_Linux_ARM_Rev1.60>\AppSrc\ naiapp_common. Once you navigate to this folder and click OK, the text box labelled “Project Name” will fill itself out with the name of the naiapp_common folder (which is “naiapp_common”).
-
Select “Xilinx ARM GNU/Linux Toolchain” under “Toolchain for Indexer Settings”, and then click “Finish”.
-
With naiapp_common Project selected in the Project Explorer, select Project→Properties→C/C++ Build→Environment, and click the “Add…” button.
-
Enter a new environment variable with Name = NAI_TARGET_BOARD_TYPE and Value = arm, and click “OK” button.
-
Click Apply Button
-
To Clean and Build the naiapp_common project, right-click on “naiapp_common” in the Project Explorer and click “Clean Project”. Then, with “naiapp_common” selected in the Project Explorer, either click the hammer icon at the top of the page or right-click on “naiapp_common” in the Project Explorer and click “Build Project”.
-
Copy NAI library (libnaiapp_common.so) from <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>/AppSrc/naiapp_common to <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC >/Lib/Linux_ARM.
Copy from here
Copy to here
Building an NAI Sample Application
NAI provides prebuilt sample applications and source code. You can also rebuild the sample applications on your host PC.
Note
Cross-Compiler and PATH must be configured on Host PC. Refer to Step 18 of subsection Cross-Compiler of section Development Environment Setup for details.
Prerequisite: Pre-built naibrd_SSK_Linux_ARM_Rev1.60 Library including the following:
-
<directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\Lib\Linux_ARM
-
<directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\include
-
Copy naibrd_SSK_Linux_ARM_Rev1.60 Library and Sample Application package to Host PC.
-
Import <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\AppSrc into the Xilinx SDK.
-
Click File→Import…
-
-
On the Import pop-up page, select the option “Existing Code as Makefile Project” under “C/C++” and then click the “Next >” button.
-
Click “Browse…” and navigate to <directory of naibrd_SSK_Linux_ARM_Rev1.60>\AppSrc. Once you navigate to this folder and click OK, the text box labelled “Project Name” will fill itself out with the name of the AppSrc folder (which is “AppSrc”).
-
Select “Xilinx ARM GNU/Linux Toolchain” under “Toolchain for Indexer Settings”, and then click “Finish”.
-
With AppSrc Project selected in the Project Explorer, select Project→Properties→C/C++ Build→Environment, and click the “Add…” button.
-
Enter a new environment variable with Name = NAI_TARGET_BOARD_TYPE and Value = arm, and then click “OK”.
-
Hit “Apply” button
-
To Clean and Build the “AppSrc” project, right-click on “AppSrc” in the Project Explorer and click “Clean Project”. Then, with the “AppSrc” project selected in the Project Explorer, either click the hammer icon at the top of the page or right-click on “AppSrc” in the Project Explorer and click “Build Project”.
Running NAI Sample Application on Target Board
-
Copy naibrd_SSK_Linux_ARM_Rev1.60 to host pc if you have not done so already.
-
Upload the NAI Library (libnaibrd.so) to /usr/lib on the target board from Host PC.
Note
You can do this in the Xilinx SDK. The libnaibrd.so file should be in <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\Lib\Linux_ARM, and also in <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\Libraries\naibrd.
-
Go to the “Remote Systems” tab in the “Remote System Explorer” perspective, right-click “lib” (<IP Address of target board>/Sftp Files/Root///usr/lib), and click “Export From Project…”.
-
In the “Remote file system” tab, select the “naibrd” folder (but do not check it). Then, within that folder, select “libnaibrd.so” and check the check box next to it. Then, click “Finish
-
Upload the NAI Common Library (libnaiapp_common.so) to /usr/lib on the target board from Host PC.
Note
You can do this in the Xilinx SDK. The libnaiapp_common.so file should be in <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\Lib\Linux_ARM, and also in <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\AppSrc\naiapp_common.
-
Go to the “Remote Systems” tab in the “Remote System Explorer” perspective, right-click “lib” (<IP Address of target board>/Sftp Files/Root///usr/lib), and click “Export From Project…”.
-
In the “Remote file system” tab, select the “naiapp_common” folder (but do not check it). Then, within that folder, select “libnaiapp_common.so” and check the check box next to it. Then, click “Finish”.
-
Choose an executable ELF from <directory of naibrd_SSK_Linux_ARM_Rev1.60 on host PC>\AppSrc and upload it to /home/root/ on the target board.
-
In the “Remote Systems” tab, right-click “root” (<IP Address of target board>/Sftp Files/Root///home/root) and click “Export From Project…”
-
In the “Remote file system” window, select “AppSrc” in the left box (but do not check it), and then select and check the check box next to the project you want to run from the board (in this case, “TTL_BasicOps”). Then, click “Finish”.
-
Run the sample application executable ELF file using either the Serial Console or the Xilinx SDK.
Running NAI Sample Application on Target Board Using Serial Console (Tera Term)
-
Navigate to /home/root/ on the Linux shell terminal. (See picture below Step 3)
# cd /home/root/ |
-
Give Execute permission to application: (See picture below Step 3)
# chmod 777 <Sample Application> (e.g. chmod 777 TTL_BasicOps) |
-
Execute program from Linux shell terminal (See picture)
# ./<Sample Application> (e.g. # ./TTL_BasicOps ) |
Running NAI Sample Application on Target Board Using Xilinx SDK
-
We must create a Run Configuration for the sample program we just copied to the board. With the AppSrc project selected in the Project Explorer, go to Run→Run Configurations…
-
In the “Run Configurations” window, double-click “Target Communication Framework”. This will create a new Run Configuration for the AppSrc project, called “AppSrc Default” by default.
-
With the “AppSrc Default” configuration selected, under the “Target” tab, uncheck the check box labelled “Use local host as the target”. Then, in the “Available Targets:” list view, select the selection that says “TCF Agent” in the “Name” column and lists the target board’s IP Address in the “Host” column. Then, verify that it says “TCP:<IP Address of target board>:<port number>” in the “Target ID:” text box. In this case, the IP Address is 192.168.1.16, and the port is 1534.
-
Click the “Apply” button.
-
Navigate to the “Application” tab.
-
Fill in the text boxes highlighted in the picture. For the “Project Name:” text box, you can click the “Browse…” button and select “AppSrc” from the list of projects. Then, in the “Application” group box, next to the “Local File Path:” text box, you can click the “Search…” button and select the sample application you want to run from the pop up menu (in this case, TTL_BasicOps). Then, type “/home/root/<name of sample application you want to run>” into the “Remote File Path:” field.
-
In the Serial Console (Tera Term), navigate to the /home/root directory of the target board and type “chmod 777 <name of sample application in /home/root to run>” (ex. chmod 777 TTL_BasicOps) to give the sample application permission to run.
-
Click “Apply” to save all the changes you just made, and then click “Run” to run the program on the target board using the SDK.
Debugging NAI Sample Application on Target Board Using Xilinx SDK
The process of Debugging a program via the Xilinx SDK is very similar to the process of Running a program via the Xilinx SDK.
-
If it has not been done already, copy the naibrd library and naiapp library .so files (libnaibrd.so & libnaiapp_common.so) from your PC to the /usr/lib directory of the target board. This can be done via the Xilinx SDK. See step 2 of “Running NAI Sample Application on Target Board” for more details.
-
If it has not been done already, copy the sample program executable ELF file you want to run on the board from your PC to the /home/root directory of the target board. This can be done via the Xilinx SDK. See step 3 of “Running NAI Sample Application on Target Board” for more details.
-
If you have not done so already, create a run configuration for the sample application you want to run on the board, and use the serial console to get permission to run the sample application executable file you copied from your PC to the /home/root directory of the target board (see ”Running NAI Sample Application on Target Board Using Xilinx SDK”).
Note:
The run configuration you just made for the HelloWorld project can also be used as a debug configuration.
-
With “AppSrc” selected in the Project Explorer, navigate to Run→Debug Configurations…
-
In the “Debug Configurations” window, under “Target Communication Framework”, select “AppSrc Default” (the run configuration we created). The configuration properties you set for “AppSrc Default” in “Running NAI Sample Application on Target Board Using Xilinx SDK” should still be there.
-
Click “Debug” to start debugging the sample application.
NAI Cares
North Atlantic Industries (NAI) is a leading independent supplier of Embedded I/O Boards, Single Board Computers, Rugged Power Supplies, Embedded Systems and Motion Simulation and Measurement Instruments for the Military, Aerospace and Industrial Industries. We accelerate our clients' time-to-mission with a unique approach based on a Custom-on-Standard Architecture™ (COSA™) that delivers the best of both worlds: custom solutions from standard COTS components.
We have built a reputation by listening to our customers, understanding their needs, and designing, testing and delivering board and system-level products for their most demanding air, land and sea requirements. If you are experiencing any problems with our products, we urge you to contact us as soon as possible.
Please visit us at: www.naii.com or select one of the following for immediate assistance:
Call Us
(631) 567-1100
© 2015 North Atlantic Industries, Inc. All rights reserved. All other brands or names are property of their respective holders.
This document has been produced for the customers of North Atlantic Industries, Inc. (NAI) with the intent and purpose of providing specific product operation information for systems integration. Unauthorized use or intent is prohibited without written permission from NAI. NAI reserves the right to revise this document to include product updates, corrections, and clarifications and may not conform in every aspect to former issues. The information provided in this document is believed to be accurate and is provided “as is” with no representations or warranties of any kind whether expressed or implied, including, but not limited to, warranties of design, merchantability or fitness for a particular purpose. North Atlantic Industries does not assume any responsibility for its use and shall not be responsible for any liability resulting from reliance upon any information contained herein. No licenses or rights are granted by implication or otherwise in connection therewith.