Using ssh and scp, Executing an opencl kernel on an soc, Building the host application – Altera RTE for OpenCL User Manual

Page 39: Executing an opencl kernel on an soc -10

Advertising
background image

To reboot the CPU, press the Warm reset button next to the four hard processor system (HPS) LEDs

on the board.

3. If you are unable to acquire the IP address, ensure that the Ethernet cable is in good working condition

and the Ethernet port on your network is enabled.

Using SSH and SCP

Instead of connecting the Cyclone V SoC Development Kit to the host system using UART over USB and

transferring files using a network drive, you can initiate a Secure Shell (SSH) connection and transfer files

using a Secure Copy (SCP) program.

1. To establish a connection between the Cyclone V SoC Development Kit and the host system via SSH,

invoke the

ssh root@<board_ip_address>

command from your development machine.

For instructions on how to identify <board_ip_address>, refer to the Ensuring IP Address Acquisition

section.

2. To transfer files, one at a time, from the host system to the board via SCP, invoke the

scp

<source_filename> root@<board_ip_address>:<target_filename>

command

from your development machine.

Executing an OpenCL Kernel on an SoC

The procedures outlined in this document are for building and running the host application for the

hello_world example design. To execute the hello_world OpenCL kernel on your SoC, you must first

create an

hello_world.aocx

Altera Offline Compiler Executable file. For instructions on obtaining the

hello_world example design and creating the

hello_world.aocx

file, refer to the Creating the FPGA

Hardware Configuration File of an OpenCL Kernel section of the Altera SDK for OpenCL Cyclone V SoC

Getting Started Guide.
Build your host application using the GNU Compiler Collection (GCC) cross-compiler available with the

SoC Embedded Design Suite (EDS).

Related Information

Creating the Hardware Configuration File of an OpenCL Kernel for SoC

Building the Host Application

Build your SoC-specific OpenCL host application using the GNU Compiler Collection (GCC) cross-

compiler available with the SoC Embedded Design Suite (EDS).
1. Perform the following tasks to download the hello_world design example.

a. Download the SoC-specific hello_world design example (<version> Arm32 Linux package (.tgz))

from the Hello World Design Example page within the Altera website.

b. Extract

exm_opencl_hello_world_arm32_linux_<version>.tar

to a location to which you have write

access.

c. Ensure that you set the environment variable AOCL_BOARD_PACKAGE_ROOT to point to the

Cyclone V SoC Development Kit Reference Platform (that is,

%ALTERAOCLSDKROOT%\board\c5soc

).

2. At a command prompt, invoke the following command to set the PATH environment variable:

SET PATH=%PATH%;<path_to_SoCEDS_installation_dir>\ds-5\sw\gcc\bin

3. Navigate to the

<path_to_exm_opencl_hello_world_arm32_linux_<version>>\hello_world

directory.

4. Invoke the

make -f Makefile

command. Alternatively, you can simply invoke the

make

command.

4-10

Using SSH and SCP

OCL005-15.0.0

2015.05.04

Altera Corporation

Getting Started with the Altera RTE for OpenCL for Altera ARMv7-A SoC

Send Feedback

Advertising