Quick Start Guide For Using Intel Compiler To Build Applications Targeting Quark SoC On Galileo Board



Similar documents
Andreas Burghart 6 October 2014 v1.0

Intel Do-It-Yourself Challenge Lab 2: Intel Galileo s Linux side Nicolas Vailliet

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

Using Intel C++ Compiler in Eclipse* for Embedded Linux* targets

PetaLinux SDK User Guide. Application Development Guide

Debugging with TotalView

SQL Server 2008 R2 Express Edition Installation Guide

Yocto Project Eclipse plug-in and Developer Tools Hands-on Lab

Embedded Software Development

Extending Remote Desktop for Large Installations. Distributed Package Installs

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

Centralized Mac Home Directories On Windows Servers: Using Windows To Serve The Mac

PrimeRail Installation Notes Version A June 9,

User s Manual

INTERNAL USE ONLY (Set it to white if you do not need it)

ASX SFTP External User Guide

for Networks Installation Guide for the application on the server July 2014 (GUIDE 2) Lucid Rapid Version 6.05-N and later

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Workshop Intel Galileo Board

Installing IBM Websphere Application Server 7 and 8 on OS4 Enterprise Linux

The Build Process. of (GNU Tools for ARM Embedded Processors)

Installing Java (Windows) and Writing your First Program

APPLICATION NOTE. How to build pylon applications for ARM

LT Auditor Windows Assessment SP1 Installation & Configuration Guide

Freshservice Discovery Probe User Guide

Lazy OpenCV installation and use with Visual Studio

IBM WebSphere Application Server Version 7.0

Install Pocket Inventory in a Windows Server 2003 R2 Standard Environment

CPSC 226 Lab Nine Fall 2015

Cosmic Board for phycore AM335x System on Module and Carrier Board. Application Development User Manual

Using a login script for deployment of Kaspersky Network Agent to Mac OS X clients

Hadoop Lab - Setting a 3 node Cluster. Java -

Install Pocket Inventory in a Windows Server 2008 Standard Environment

for Networks Installation Guide for the application on the server August 2014 (GUIDE 2) Lucid Exact Version 1.7-N and later

Viking VPN Guide Linux/UNIX

Embedded Linux development training 4 days session

Using Microsoft Visual Studio API Reference

SSL Tunnels. Introduction

Installation Guide: Delta Module Manager Launcher

Allscripts Professional EHR

WEB2CS INSTALLATION GUIDE

Informatica e Sistemi in Tempo Reale

Installing HSPICE on UNIX, Linux or Windows Platforms

Week Overview. Running Live Linux Sending from command line scp and sftp utilities

VERSION 9.02 INSTALLATION GUIDE.

INSTALLING SQL SERVER 2012 EXPRESS WITH ADVANCED SERVICES FOR REDHORSE CRM

Introduction to FileWave

Android: How To. Thanks. Aman Nijhawan

Preparing a SQL Server for EmpowerID installation

LabStats 5 System Requirements

ERIKA Enterprise pre-built Virtual Machine

INSTALL AND CONFIGURATION GUIDE. Atlas 5.1 for Microsoft Dynamics AX

Code::Block manual. for CS101x course. Department of Computer Science and Engineering Indian Institute of Technology - Bombay Mumbai

In order to upload a VM you need to have a VM image in one of the following formats:

SANbox Manager Release Notes Version Rev A

NovaBACKUP xsp Version 15.0 Upgrade Guide

Requirements & Install. Module 2 Single Engine Installation

Authenticate vsftpd (a secure FTP server for UNIXlike systems) with IDENTIKEY Authentication Sever

Virtual Appliance Installation Guide

Leak Check Version 2.1 for Linux TM

Yocto Project ADT, Eclipse plug-in and Developer Tools

Study and installation of a VOIP service on ipaq in Linux environment

How to Install MS SQL Server Express

GSM Click - Cross-Platform Development Quick Start Guide

Compiere ERP & CRM Installation Instructions Linux System - EnterpriseDB

User Manual - Help Utility Download MMPCT. (Mission Mode Project Commercial Taxes) User Manual Help-Utility

Pearl Echo Installation Checklist

Getting Started With Delegated Administration

INTERNAL USE ONLY (Set it to white if you do not need it)

Distributed convex Belief Propagation Amazon EC2 Tutorial

CactoScale Guide User Guide. Athanasios Tsitsipas (UULM), Papazachos Zafeirios (QUB), Sakil Barbhuiya (QUB)

Oracle Fusion Middleware 11gR2: Forms, and Reports ( ) Certification with SUSE Linux Enterprise Server 11 SP2 (GM) x86_64

Configure Backup Server for Cisco Unified Communications Manager

Introduction to Running Hadoop on the High Performance Clusters at the Center for Computational Research

Setup guide. Solution series MG3 Software GENIUSPRO installation

Network Shutdown Module V3 Extension of the User Manual for IBM BladeCenter architecture

High-Performance Reservoir Risk Assessment (Jacta Cluster)

Git Fusion Guide August 2015 Update

Remote Filtering Client Guide. iprism Web Security

PRECISION v16.0 MSSQL Database. Installation Guide. Page 1 of 45

SheevaPlug Development Kit README Rev. 1.2

White Paper. Fabasoft on Linux Cluster Support. Fabasoft Folio 2015 Update Rollup 2

Quick Deployment Step-by-step instructions to deploy Oracle Big Data Lite Virtual Machine

System Requirements - CommNet Server

How to Run the MQX RTOS on Various RAM Memories for i.mx 6SoloX

RPC and TI-RPC Test Suite Test Plan Document

Wireless Security Camera with the Arduino Yun

USER GUIDE. Snow Inventory Client for Unix Version Release date Document date

Oracle Product Data Quality

CSC230 Getting Starting in C. Tyler Bletsch

What Does Tequila Have to Do with Managing Macs? Using Open Source Tools to Manage Mac OS in the Enterprise!

System Requirements Table of contents

BorderGuard Client. Version 4.4. November 2013

SYMANTEC BACKUPEXEC2010 WITH StorTrends

Code Estimation Tools Directions for a Services Engagement

Transcription:

1. Introduction: Quick Start Guide For Using Intel Compiler This document explains how to build applications using Intel compiler for Intel Quark SoC X1000 on the Intel Galileo board. Quark is a Pentium ISA instruction compatible 32-bit SoC. It does not support SSE class instructions, so the binaries have to be built/cross-compiled with appropriate compiler flags targeting Quark SoC. Intel Galileo board is supported with downloadable software at: https://communities.intel.com/community/makers/drivers Arduino software development framework based applications can be developed to run on Intel Galileo board using the Arduino IDE that is downloadable from the above link. Please refer to the Intel Galileo Getting Started Guide for all details. Intel Galileo board runs Yocto based Poky Linux distribution. So, native Linux based applications can also be built using both GCC and Intel compiler. This document details necessary steps to cross-compile applications targeting the Intel Quark SoC on the Galileo board. Current scope of this document is limited to use Linux based host build system environment. 2. Prerequisites: This section details the host system and necessary tools for the steps coming up in next section to cross-compile the applications for target Quark SoC. a. Host system configuration supported Linux OS based machine: i. Download and install Intel System Studio with Intel Composer XE installed on the host. Download, install, and setup Arduino IDE SDK: o Refer to the Intel Galileo Getting Started Guide for this installation o Make sure that the Galileo software is installed and setup as per the following note: Note: The first time you compile and install a sketch, the Galileo software will be installed automatically. This requires appropriate file and directory access permissions. You may be required to run the IDE as root or using sudo arduino depending on your Linux distribution. 1

o Note the SDK setup success message in the Arduino IDE: /home/jdpatel/arduino-1.5.3/hardware/tools/install_script.sh Setting it up...done SDK has been successfully set up and is ready to be used. b. Optional Target system configuration Intel Galileo board setup: Note that this step is required for running the cross-compiled binaries only. It is not required for just cross-compiling the target binaries on the host system. Follow the Intel Galileo Getting Started Guide for following steps and configure Intel Galileo board for remote access over SSH. 3. Steps: This section provides the steps necessary to first setup the cross-compilation environment and then usage of proper flags for cross-compilation. Following hello-world example is used for cross-compilation in rest of the steps: cat HelloWorldQuark.c #include <stdio.h> int main(int argc, char* argv[]) { #ifdef INTEL_COMPILER printf("hello World from QUARK - using ICC!!!\n"); #else printf("hello World from QUARK - using GCC!!!\n"); #endif return(0); } A. Build using GCC compiler i. Include path for uclibc tools under Poky Linux SDK tools: export PATH=/home/jdpatel/arduino-1.5.3/hardware/tools/sysroots/x86_64- pokysdk-linux/usr/bin/i586-poky-linux-uclibc/:path which i586-poky-linux-uclibc-g++ ~/2rduino-1.5.3/hardware/tools/sysroots/x86_64-pokysdk-linux/usr/bin/i586- poky-linux-uclibc/i586-poky-linux-uclibc-g++ 2

Cross-compile using i586-poky-linux-uclibc-g++: i586-poky-linux-uclibc-g++ --sysroot=/home/jdpatel/3rduino- 1.5.3/hardware/tools/sysroots/i586-poky-linux-uclibc HelloWorldQuark.c o helloworld-quark-gcc./helloworld-quark-gcc -bash:./helloworld-quark-gcc: /lib/ld-uclibc.so.0: bad ELF interpreter: No such file or directory This is not an error because the cross-compiled binary is targeted to run on Quark SoC and not on the host system running on Core series processor. i Optional Copy binary to the Galileo board: Note replace 1.2.3.4 with actual ip-address of target in following step scp helloworld-quark-gcc root@1.2.3.4:/home/root/scratch/. helloworld-quark-gcc 100% 6281 6.1KB/s 00:00 iv. Optional Execute the cross-compiled binary on the target: Note replace 1.2.3.4 with actual ip-address of target in following steps Launch execution remotely on the target directly from the host: ssh root@1.2.3.4 '/home/root/scratch/quark-helloworld-gcc' Hello World from QUARK - using GCC!!! Or, login to the target and execute it locally: ssh root@1.2.3.4 # cd ~/scratch/ #./helloworld-quark-gcc Hello World from QUARK - using GCC!!! # B. Build using Intel compiler i. Source the Intel compiler from Intel System Studio package: 3

source /opt/intel/system_studio_2014.0.025/bin/iccvars.sh ia32 [jdpatel@core-fedora HelloWorldQuark] icc -V Intel(R) C Compiler for IA-32 applications, Version 14.0.0.025 Build 20140121 Copyright (C) 1985-2014 Intel Corporation. All rights reserved. Include path for uclibc tools under Poky Linux SDK tools (same as for build using GCC): export PATH=/home/jdpatel/arduino-1.5.3/hardware/tools/sysroots/x86_64- pokysdk-linux/usr/bin/i586-poky-linux-uclibc/:path which i586-poky-linux-uclibc-g++ ~/arduino-1.5.3/hardware/tools/sysroots/x86_64-pokysdk-linux/usr/bin/i586- poky-linux-uclibc/i586-poky-linux-uclibc-g++ i Cross-compile using ICC: icc -mia32 --sysroot=/home/jdpatel/arduino- 1.5.3/hardware/tools/sysroots/i586-poky-linux-uclibc -gnu-prefix=i586-pokylinux-uclibc- HelloWorldQuark.c -o helloworld-quark-icc./helloworld-quark-icc -bash:./helloworld-quark-icc: /lib/ld-uclibc.so.0: bad ELF interpreter: No such file or directory This is not an error because the cross-compiled binary is targeted to run on Quark SoC and not on the host system running on Core series processor. v. Optional Copy binary to the Galileo board: Note replace 1.2.3.4 with actual ip-address of target in following step scp helloworld-quark-icc root@1.2.3.4:/home/root/scratch/. helloworld-quark-icc 100% 15KB 14.9KB/s 00:00 vi. Optional Execute the cross-compiled binary on the target: Note replace 1.2.3.4 with actual ip-address of target in following steps Launch execution remotely on the target directly from the host: ssh root@1.2.3.4 '/home/root/scratch/quark-helloworld-icc' 4

4. Troubleshooting: Quick Start Guide For Using Intel Compiler Hello World from QUARK - using ICC!!! Or, login to the target and execute it locally: ssh root@1.2.3.4 # cd ~/scratch/ #./helloworld-quark-icc Hello World from QUARK - using ICC!!! # This section may help resolving some of the common errors related to above steps: i. If the Arduino SDK setup was not completed, following compilation error occurs: i586-poky-linux-uclibc-g++ --sysroot=/home/jdpatel/arduino- 1.5.3/hardware/tools/sysroots/i586-poky-linux-uclibc HelloWorldQuark.c -o helloworld-quark-gcc -bash: /home/jdpatel/arduino-1.5.3/hardware/tools/sysroots/x86_64-pokysdklinux/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-g++: /opt/clantontiny/1.4.2/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory Follow the Arduino SDK setup step explained in prerequisites section. While setting up the Arduino SDK, if you encounter following error: find: invalid mode +111 Setting it up...sdk could not be set up. Relocate script failed. Abort! Make following change in file ~/arduino-1.5.3/hardware/tools/install_script.sh: < executable_files=(sudo_exec find native_sysroot -type f -perm +111) --- > executable_files=(sudo_exec find native_sysroot -type f -perm /111) Arduino SDK setup step explained in prerequisites section should now be successful. 5