Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.

Slides:



Advertisements
Similar presentations
Program Development Tools The GNU (GNU’s Not Unix) Toolchain The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and.
Advertisements

Cygwin Linux for Windows Desktop Paul Stuyvesant.
LINUX-WINDOWS INTERACTION. One software allowing interaction between Linux and Windows is WINE. Wine allows Linux users to load Windows programs while.
Hands-on with the Sitara Linux SDK This presentation provides a hands-on overview of the Sitara Linux SDK. It focuses on the software and tools found in.
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
PROJECT IN DISTRIBUTED SYSTEMS IPERF FOR ANDROID Developers: Shir Degani, Yuval Degani Supervisors: Prof. Roy Friedman, Alex Kogan.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
ARM-DSP Communication Architecture
Author: Texas Instruments ®, Sitara™ ARM ® Processors Building Blocks for PRU Development Module 2 PRU Firmware Development This session covers how to.
Software Installation, release 4.0 Geant4 Users’ Workshop Tutorial SLAC February 18-22, 2002 Takashi Sasaki, Gabriele Cosmo,
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Introduction Purpose Objectives Content Learning Time
Software Installation The full set of lecture notes of this Geant4 Course is available at
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
Building with MPC Charles Calkins Principal Software Engineer Object Computing, Inc.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
Linux Operations and Administration
Introduction Purpose This training course introduces the free GNU tools that can be used for debugging embedded system application software in the Renesas.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
Tutorial 11 Installing, Updating, and Configuring Software
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
Introduction Purpose This course describes the process of installing the KPIT GNU toolchain on your PC. Objective Learn how easy it is to get information.
© 2013 IBM Corporation Get started on IBM Linux on Power SDK November 2013.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Software Engineering in Robotics Packaging and Deployment of Systems Henrik I. Christensen –
The In’s and Out’s of the IIS 6.0 Migration Tool The In’s and Out’s of the IIS 6.0 Migration Tool Chris Adams Web Platform Supportability Lead Microsoft.
(1) A Beginner’s Quick Start to SIMICS. (2) Disclaimer This is a quick start document to help users get set up quickly Does not replace the user guide.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Interfaces to External EDA Tools Debussy Denali SWIFT™ Course 12.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
GNU Make Computer Organization II 1 © McQuain What is make ? make is a system utility for managing the build process (compilation/linking/etc).
Samba – Good Just Keeps Getting Better The new and not so new features available in Samba, and how they benefit your organization. Copyright 2002 © Dustin.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
Test Specifications A Specification System for Multi-Platform Test Suite Configuration, Build, and Execution Greg Cooksey.
Debugging 1/6/2016. Debugging 1/6/2016 Debugging  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a program.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Yannick Patois - Datagrid Software Repository Presentation - March, n° 1 Datagrid Software Repository Presentation CVS, packages and automatic.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Embracing Embedded Environments for Development Success By : Mark Recoskie.
Implementation of Embedded OS
GNU Make Computer Organization II 1 © McQuain What is make ? make is a system utility for managing the build process (compilation/linking/etc).
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
김민수 Cortex-M4 Processor - Getting Started with the GNU Compiler Collection(gcc)
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Embedded Linux By Gus Wirth. What makes it embedded? ● Rather nebulous, line has blurred over the years ● Limited purpose ● Small resources compared to.
Topic 2: Hardware and Software
Development Environment
Microprocessor and Assembly Language
What is make? make is a system utility for managing the build process (compilation/linking/etc). There are various versions of make; these notes discuss.
Contiki and Code Composer Studio
Using Visual Studio and VS Code for Embedded C/C++ Development
Software Installation
Computer System Laboratory
Software Installation, release 4.0
What is make? make is a system utility for managing the build process (compilation/linking/etc). There are various versions of make; these notes discuss.
Presentation transcript:

Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1

Toolchain for ARM of Sitara Devices Applicable to other ARM-based devices, as well A tool chain is a collection of programs used to compile and build applications or libraries and generally includes several additional tools useful for debugging or troubleshooting issues. Starting with SDK 6.0, TI switched from a proprietary code generation tool to the Linaro cross compiler tool chain.

Cross Compiling Cross Compiler definition: A compiler that can convert instructions into machine code for a computer other than that on which it is run. Which of the following are examples of cross compiling? Compiling an application on your Linux laptop to run on your Linux desktop. Compiling a Windows application on a Macintosh. Compiling a Linux application on your PC for your Sitara EVM or Beaglebone.

Compiling a Simple Program

Adding the path to the environment allows simpler use of the tool chain by calling the commands directly instead of having to specify the entire path. Adding the toolchain path to the environment path: export PATH= :$PATH The simplest way to build an application is by listing the sources and specifying the name of the binary to be generated: arm-linux-gnueabihf-gcc -o Other flags such as the debug can be added: arm-linux-gnueabihf-gcc -g -o

Linux SDK: linux-devkit The Sitara toolchain is found in the Linux SDK in the linux-devkit directory.

Understanding Linux-devkit Host Tools Directory Target Headers & Libraries Environment-setup Linux-Devkit Toolchain, GDB, Qt compiler, and more Common environment variables that affect compiling

Code Generation Location

Linking to External Libraries The code generation tool should know the non-standard libraries and headers with which it compiles and links. This is done by passing the library name to the compiler in the command line or inside a make file. Find the name of the library file that is needed. Remove lib from the front and remove the extension. Then add -l to the front. Example: Link against PNG library (libpng.so) libpng.so -> png -> -lpng arm-linux-gnueabihf-gcc -lpng -o And don’t forget the Path

Environment-setup Purposes: –Point the compiler to the target’s headers and libraries –Automatically adds the tool chain binaries to your PATH. –Sets environment variables that affect cross compiling –Set compiler options specific to the SoC Using environment-setup: –Go to SDK linux-devkit directory –Modify the file environment-setup, as needed –source environment-setup

Environment-setup Example Setting toolchain path Setting environment variables that point to common toolchain tools. SoC-specific options alter the compiler’s default header and library search path

Compiler Path If the compiler name and path are not explicitly given, the compiler may build the executable for the host architecture and not the target architecture. The “file” command can tell you what compiler built the executable.

Compiler Search Path The compiler must know where to look for libraries and headers. If the user does not specify these paths explicitly, the compiler may find headers and libraries that do not belong to the desired target. Host Contamination occurs when the cross compiler finds and uses headers and libraries that belong to the host. Sysroot is the compiler option that sets the compiler’s default search path.

Compiling User Space vs. Kernel Space Example Kernel Space/BSP Software: –U-boot –Kernel –Kernel device drivers Example User Space Software –Qt –GStreamer –Busybox Environment-setup for the user space does not directly expose kernel space software. Kernel space software is protected from user space applications and can be access indirectly using APIs. Kernel space software should be portable to support multiple platforms.

Software Build Systems For simple application, a “simple” Makefile and make utility is sufficient to build an executable. Difficulties: –Portable – the same code for multiple architectures –Cross compiling – find the right tools, headers and libraries Build Systems is a set of tools and scripts used to build and deploy/install applications or libraries on different architectures. GNU build system, a.k.a. Autotools, is used by SDK to automate the process of building portable executables: –Config –Make install –Make

Building with Autotools /configure is used to determine the compiler, supported compiler options, available libraries and to allow users to determine which features to utilize make builds the application make install installs binaries and headers to either a default location or a user-specified location.

Configure Cross Compile Options Cross compiling software configure requires some options such as: --build=build The system on which the package is built. --host=host The system where built programs and libraries will run. --target=target The system for which the tools will create output when building compiler tools Environment-setup creates a environment variable with all this information already filled! And of course, the PATH must be defined.

Configure Help./configure –help displays a list of options that a user can use to influence the configuration and building of the piece of software.

Configure: Important Environment Variables

Configure: Feature Selection

Install Location By default, autotools installs libraries and applications on the host in the local directory. The user may choose to change the install location; For example, to put it in an NFS directory. The easiest way to accomplish this is by setting the software’s default install location in the autotools script

Configure Installation Options Default root Installation directory Usually don’t change

Configure Prefix Option By using the configure prefix option you can alter the default location where configure installs libraries and applications. The syntax is./configure --prefix=

Deploying to the Target Dynamically-linked libraries and headers that are used by applications must be in the filesystem of the target. If the libraries (and the headers) are in the cross-compiler system, they may not be visible to the target. The user must copy the contents of the directory that includes the libraries and headers into the file system of the target (either ramfs, or mount, or any other file system location).

Native Compiling Native compiling refers to building the executable on the target (e.g., the same machine on which the code will run). Benefits: –NO host contamination –Native compiling is simpler and requires less configuration and settings. Draw Backs: –Building on the target can be slower than building on a PC. Building Qt on a PC takes about 3+ hours. Building it on the Beaglebone can take 14+ hrs –Compiling may fail due to a lack of memory. –Some distributions do not provide the toolchain, so native compiling is not an option.

Different Approach: Yocto Open embedded/Yocto project is used to create a distribution file system for any architecture: Recipe scripts contain all the information that is required to build applications and libraries. There are over 2000 recipes for different systems Benefits: Open embedded makes handling dependencies simple. Easy updating or upgrading software Reproducing the entire file system is easy. Sitara provides a good starting point to use. Handles license restrictions for you easily! FREE

Different Approach: Yocto

For More Information Sitara Linux Software Developer's Guide: are_Developer’s_Guide are_Developer’s_Guide Sitara Linux SDK GCC Toolchain: GCC_Toolchain GCC_Toolchain Linux EZ Software Development Kit (EZSDK) for Sitara Processors: For questions regarding topics covered in this training, visit the support forums at the TI E2E Community website.TI E2E Community

Configure GUI make menuconfig

From the configure file

Configure using vi.config Then you have to “make oldconfig” again

Configure without the right PATH

Issues with Cross Compiling Cross compiling problems are when: 1.Cross compiling is less common than natively compiling 2.Programs aren’t developed to be portable. 3.Programs may require host tools to be build before the actual application or library can be built: 1.Example: Qt and Python 4.Programs uses some build system that isn’t cross compiling friendly. 5.Developer doesn’t follow the proper standard for the build system to make things portable. 6.For each large application or library it may take different steps to compile successfully.