Andreas Burghart 6 October 2014 v1.0



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

PetaLinux SDK User Guide. Application Development Guide

Yocto Project ADT, Eclipse plug-in and Developer Tools

Surface and Volumetric Data Rendering and Visualisation

SIM900 Eclipse environment install Application Note_V1.00

How to install and use the File Sharing Outlook Plugin

BRIC VPN Setup Instructions

DEPLOYING A VISUAL BASIC.NET APPLICATION

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

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

ACTIVE DIRECTORY DEPLOYMENT

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

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

SQL Server 2008 R2 Express Edition Installation Guide

IIS, FTP Server and Windows

Setting Up a Windows Virtual Machine for SANS FOR526

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

Deployment of Keepit for Windows

Introduction to Android Development

Zynq-7000 Platform Software Development Using the ARM DS-5 Toolchain Authors: Simon George and Prushothaman Palanichamy

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

DraganFly Guardian: API Instillation Instructions

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

Installing Cobra 4.7

Installation Guidelines (MySQL database & Archivists Toolkit client)

Informatics for Integrating Biology & the Bedside. i2b2 Workbench Developer s Guide. Document Version: 1.0 i2b2 Software Release: 1.3.

NSi Mobile Installation Guide. Version 6.2

Ingenious Testcraft Technical Documentation Installation Guide

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

USING SSL/TLS WITH TERMINAL EMULATION

Using Microsoft Visual Studio API Reference

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Compiere ERP & CRM Installation Instructions Linux System - EnterpriseDB

Installation Guide Command WorkStation 5.5 with Fiery Extended Applications 4.1

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

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

Installing the Microsoft Network Driver Interface

Getting Started with Kinetis SDK (KSDK)

Getting Started with Android Development

Upgrading Your Web Server from ClientBase Browser Version 2.0 or Above to Version 2.1.1

Universal Management Service 2015

Remark FTP Utility. For Remark Office OMR. User s Guide

NetBeans IDE Field Guide

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

NovaBACKUP xsp Version 15.0 Upgrade Guide

Virtual Office Remote Installation Guide

Pearl Echo Installation Checklist

Eclipse installation, configuration and operation

The Yocto Project Eclipse plug-in: An Effective IDE Environment for Embedded Application and System Developers

WinTask x64 Scheduler for Windows 7 64 bit, Windows 8/ bit and Windows 2008 R2 64 bit. Scheduler Quick Start Guide

Quick Start Guide. Installation and Setup

Linux Development Environment Description Based on VirtualBox Structure

Creating a Java application using Perfect Developer and the Java Develo...

Installing the Android SDK

System Administration Training Guide. S100 Installation and Site Management

Developing applications on Yocto. Lianhao Lu Intel Corporation Feb. 29th, 2012

Signiant Agent installation

Installation and Deployment

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

Android Environment SDK

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

WA2262 Applied Data Science and Big Data Analytics Boot Camp for Business Analysts. Classroom Setup Guide. Web Age Solutions Inc.

CSA Software Listing Table of Contents. Both Windows and Mac platforms are supported.

Creating a Distribution List from an Excel Spreadsheet

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Using the Dashboard Screen Manager v1.0. This guide provides information about setting up and using the Dashboard Screen Manager.

Voice over IP. Orator Dictation Voice-over-IP Quick Start Installation Guide

Board also Supports MicroBridge

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Creating client-server setup with multiple clients

How to Install Eclipse. Windows

ENABLE LOGON/LOGOFF AUDITING

Updating Your Applied Account

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

Waspmote IDE. User Guide

Installation Instruction STATISTICA Enterprise Small Business

A Tutorial on installing and using Eclipse

Creating a DUO MFA Service in AWS

Tutorial: setting up a web application

Installing, Uninstalling, and Upgrading Service Monitor

To begin, visit this URL:

BioWin Network Installation

Features - Microsoft Data Protection Manager

ContentWatch Auto Deployment Tool

INF-USB2 and SI-USB Quick Start Guide

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

Installing Oracle 12c Enterprise on Windows 7 64-Bit

Compiere 3.2 Installation Instructions Windows System - Oracle Database

Server Installation, Administration and Integration Guide

Android Environment SDK

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

4cast Client Specification and Installation

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

OroTimesheet 7 Installation Guide

ESX System Analyzer Version 1.0 Installation Guide

Eddy Integrated Development Environment, LemonIDE for Embedded Software System Development

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

Introduction. Before you begin. Installing efax from our CD-ROM. Installing efax after downloading from the internet

Developing Embedded Linux Devices Using the Yocto Project

How to Install Applications (APK Files) on Your Android Phone

Transcription:

Yocto Qt Application Development Andreas Burghart 6 October 2014

Contents 1.0 Introduction... 3 1.1 Qt for Embedded Linux... 3 1.2 Outline... 4 1.3 Assumptions... 5 1.4 Corrections... 5 1.5 Version... 5 2.0 Yocto Qt Toolchain Generation and Installation... 6 2.1 Yocto Qt Toolchain Generation... 6 2.2 Yocto Qt SDK Installation... 6 3.0 Qt Creator Installation and Setup... 7 3.1 Qt Creator Installation... 7 4.0 Configure Target Connection and Toolchain... 8 4.1 Create New Device Configuration... 8 4.2 Setup New Build & Run Configuration... 9 5.0 Create Qt Project and Application... 12 5.1 Create New Qt Project... 12 5.2 Add Your Application Source Code... 13 6.0 Build Your Project and Deploy Application... 16 6.1 Build Your Application... 16 6.2 Deploy Application Binary to Target... 17 7.0 Run and Debug Your Application on the Target... 19 7.1 Run Your Application... 19 7.2 Debug Your Application... 20 Page 2

1.0 INTRODUCTION Qt Application Development for Yocto Systems 1.1 Qt for Embedded Linux Qt for Embedded Linux is a C++ framework for GUI and application development for embedded devices. It runs on a variety of processors, usually with Embedded Linux. Qt for Embedded Linux provides the standard Qt API for embedded devices with a lightweight window system. Qt for Embedded Linux applications write directly to the framebuffer, eliminating the need for the X Window System and saving memory. The Linux framebuffer is enabled by default on all modern Linux distributions and provides an efficient way to develop GUI applications for embedded Linux devices. Page 3

1.2 Outline Qt Application Development for Yocto Systems The aim of this application note is to guide the user through the steps to set up a Qt application development environment for Yocto systems using Qt Designer. The application note will guide the user through the setup of a Qt sample project, deployment of the build results to a Yocto system and required configurations necessary for application debugging. Figure 1-1: Yocto Application Development Workflow Overview Page 4

1.3 Assumptions Qt Application Development for Yocto Systems This application note has been written for use by technically competent personnel with a good understanding of the usage of a Linux desktop operating system and common Linux commands. This application note applies to all Digi ARM embedded modules running Digi Embedded Yocto (DEY). A DEY 1.6 installation on the development host and a Digi ConnectCore 6 SBC target hardware platform is assumed. It s further assumed the Digi ConnectCore 6 SBC is running a previously compiled dey-image-graphical operating system image with the following extra image features included: EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug eclipse-debug dey-qt" Follow the Digi Embedded Yocto 1.6 First Steps Guide (SBC), P/N: 90001423_A for detailed instructions about the installation of DEY and the building of the dey-image-graphical image. 1.4 Corrections Requests for corrections or amendments to this application note are welcome and should be addressed to: embedded.presales@digi.com. Requests for new application notes can be sent to the same address. 1.5 Version Version Number: 0.1 Status: DRAFT Page 5

2.0 YOCTO QT TOOLCHAIN GENERATION AND INSTALLATION 2.1 Yocto Qt Toolchain Generation To build a Qt enabled image the dey-qt extra image feature needs to be included in your project. Make sure the project configuration (conf/local.conf) is configured with the following extra image features: EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug eclipse-debug dey-qt" Initialize the build environment for the ccimx6sbc platform and build the matching toolchain with the following commands: source /usr/local/dey-1.6/mkproject.sh -p ccimx6sbc bitbake meta-toolchain-qt The resulting SDK file is located in your project folder in the tmp/deploy/sdk directory: dey-eglibc-i686-meta-toolchain-qt-cortexa9hf-vfp-neon-toolchain-qt-1.6.1.sh 2.2 Yocto Qt SDK Installation Run the.sh file to install the toolchain in a directory of choice (this example assumes installation into /opt/dey-1.6/graphical/qt/ccimx6sbc):./dey-eglibc-i686-meta-toolchain-qt-cortexa9hf-vfp-neon-toolchain-qt-1.6.1.sh Enter target directory for SDK (default: /opt/poky/1.6): /opt/dey-1.6/graphical/qt/ccimx6sbc/ You are about to install the SDK to "/opt/dey-1.6/graphical/qt/ccimx6sbc/". Proceed[Y/n]? Y [sudo] password for <user>: **** Extracting SDK...done Setting it up...done SDK has been successfully set up and is ready to be used. Page 6

3.0 QT CREATOR INSTALLATION AND SETUP 3.1 Qt Creator Installation Download the standalone Qt Creator IDE from the Qt Website: http://qt-project.org/downloads. Install Qt Creator by running the install file:./qt-creator-opensource-linux-x86-3.2.1.run Patch the qtcreator.sh start script to source the Yocto environment setup script at Qt Creator start-up, with the following patch code: diff --git a/qtcreator.sh b/qtcreator.sh index aca30f5b9ecf..114f69717877 100755 --- a/qtcreator.sh +++ b/qtcreator.sh @@ -1,3 +1,4 @@ +source /opt/dey-1.6/graphical/qt/ccimx6sbc/environment-setup-cortexa9hf-vfp-neon-dey-linux-gnueabi #! /bin/sh makeabsolute() { You can copy & paste the above patch code into a new file e.g. named 0001-Source-Yoctoenvironment-script-setup.patch and apply the patch with the following command: patch qtcreator.sh < 0001-Source-Yocto-environment-script-setup.patch Make sure the path given in the patch file matches the path to the dey environment setup script of your development system. Start Qt Creator: /usr/local/qtcreator-3.2.1/bin/qtcreator.sh & Page 7

4.0 CONFIGURE TARGET CONNECTION AND TOOLCHAIN 4.1 Create New Device Configuration In Qt Creator menu go to the Tools -> Options" Select Devices and Add a new Generic Linux Device : Configure the target connection with your targets IP address, login and password and run the optional Device Test : Page 8

4.2 Setup New Build & Run Configuration Select Build & Run, go to the Kits tab and Add a new kit. In the Sysroot: field, browse to the sysroot folder of your Qt toolchain installation directory and point to cortexa9hf-vfp-neon-dey-linux-gnueabi: /opt/dey-1.6/graphical/qt/ccimx6sbc/sysroots/cortexa9hf-vfp-neon-dey-linux-gnueabi Page 9

Move to the Qt Version tab and make sure your toolchain s qmake is selected. If not Auto-detected, add it manually: /opt/dey-1.6/graphical/qt/ccimx6sbc/sysroots/i686-pokysdk-linux/usr/bin/qmake Move to the Compilers tab and Add you gcc compiler from your toolchain installation folder: /opt/dey-1.6/graphical/qt/ccimx6sbc/sysroots/i686-pokysdk-linux/usr/bin/arm-dey-linuxgnueabi/arm-dey-linux-gnueabi-gcc Page 10

Move to the Debuggers tab and Add your gdb debugger from your toolchain installation folder: /opt/dey-1.6/graphical/qt/ccimx6sbc/sysroots/i686-pokysdk-linux/usr/bin/arm-dey-linuxgnueabi/arm-dey-linux-gnueabi-gdb Go back to the Kits tab and chose the just configured arm-dey-linux Compiler and Debugger. Finalize your settings by pressing the Ok button: Page 11

5.0 CREATE QT PROJECT AND APPLICATION 5.1 Create New Qt Project In Qt Creator menu go to the File -> New File or Project " and Choose an Empty Qt Project from the Other Project category: Enter a project Name and select the Create in folder within your workspace directory: Page 12

Select the just created ccimx6sbc kit and finish the project setup: 5.2 Add Your Application Source Code Go to the File -> New File or Project " to add your new application C++ Source File : Page 13

Complete the new project setup by pressing the Finish button on the Project Management dialog box: Write your application source code into the newly added source code file (or copy and paste the hello world example code from above): Page 14

Hello World Qt example code: Qt Application Development for Yocto Systems #include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("hello world!"); hello.show(); return app.exec(); } Page 15

6.0 BUILD YOUR PROJECT AND DEPLOY APPLICATION 6.1 Build Your Application In Qt Creator menu go to the Build -> Build All : The application source code will be guild using your Yocto Qt toolchain configuration. Page 16

6.2 Deploy Application Binary to Target In the left side tool bar in Qt Creator go to the Projects and select the Run configuration of your kit: We should be able to add files to deploy, but the controls are not visible. Manually add files to deploy in your.pro project configuration file located in your project directory: nano CC6_QT_HelloWorld/CC6_QT_HelloWorld.pro Add the following code to the.pro file and save it: TARGET = CC6_QT_HelloWorld target.files = CC6_QT_HelloWorld target.path = / INSTALLS += target Page 17

Qt Creator may notify you that the.pro file changed. Accept the changes by pressing the Yes to All button: Your Files to Deploy list in Qt Creator should now get updated and show the added files: Page 18

7.0 RUN AND DEBUG YOUR APPLICATION ON THE TARGET 7.1 Run Your Application In the left side tool bar in Qt Creator press the green arrow Run button to execute the application on your target: You should see the Hello World application come up on your target s display: Page 19

7.2 Debug Your Application Similar to running the application you can press the debug arrow on the left side tool bar in Qt creator to start debugging: Page 20