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.

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.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
Embedded Systems Programming Introduction to cross development techniques.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
Software Installation, release 4.0 Geant4 Users’ Workshop Tutorial SLAC February 18-22, 2002 Takashi Sasaki, Gabriele Cosmo,
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Software Installation The full set of lecture notes of this Geant4 Course is available at
Building with MPC Charles Calkins Principal Software Engineer Object Computing, Inc.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
Building a Cross Compiler, Assembler and Linker Designed by Prof. Peng-Sheng Chen.
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.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
SKA/KAT SPIN Presentation Software Engineering (!?) Robert Crida.
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
DTIAtlasBuilder Adrien Kaiser Neuro Image Research and Analysis Laboratories University of North Carolina at Chapel Hill A tool to create an atlas from.
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.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Old Chapter 10: Programming Tools A Developer’s Candy Store.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Carrying Your Environment With You or Virtual Machine Migration Abstraction for Research Computing.
Interfaces to External EDA Tools Debussy Denali SWIFT™ Course 12.
GNU Make Computer Organization II 1 © McQuain What is make ? make is a system utility for managing the build process (compilation/linking/etc).
Writing a Run Time DLL The application loads the DLL using LoadLibrary() or LoadLibraryEx(). The standard search sequence is used by the operating system.
Test Specifications A Specification System for Multi-Platform Test Suite Configuration, Build, and Execution Greg Cooksey.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
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.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
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.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Embedded Linux By Gus Wirth. What makes it embedded? ● Rather nebulous, line has blurred over the years ● Limited purpose ● Small resources compared to.
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha Fall 2015
Developing and Distributing Cross-Platform Software with PyInstaller
Makefile Tutorial CIS5027 Prof: Dr. Shu-Ching Chen
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.
Prof: Dr. Shu-Ching Chen TA: Yimin Yang
Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Hector Cen Fall 2017
Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha
Cmake Primer.
Using Visual Studio and VS Code for Embedded C/C++ Development
Software Installation
Electronics II Physics 3620 / 6620
Computer System Laboratory
Appendix F C Programming Environment on UNIX Systems
Software Installation, release 4.0
SPL – PS1 Introduction to C++.
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:

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 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 we have switched from using a GCC based tool chain built by TI and moved to a GCC based tool chain built by Linaro.

3 Cross Compiling Whenever you are compiling an application or library for a platform other than the one it will be ran or used on then you are “cross compiling” Is this considered 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.

4 Compiling a Simple Program

5 To use your tool chain you need to add it to your environment’s PATH variable. This allows you to invoke your tool chain by simply calling it by its name instead of having to specify the entire path. Adding your tool chain’s path to your environment’s 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 You can add other flags such as the debug flag –arm-linux-gnueabihf-gcc - g -o Sitara Tool Chain is part of “Linux Development Kit” or Linux-devkit

6 Linux-devkit part of Linux SDK

7 Understanding Linux-devkit Host Tools Directory Target Headers and Libraries Environment-setup Linux-Devkit Toolchain GDB Qt compiler Etc.. Target’s headers and libraries Common environment variables that affects compiling

8 Code generation Location

9 Linking to External Libraries When linking against non standard C libraries and headers the compiler needs to be told what library to link against This is done by manually passing the library name to the compiler. (Usually make files already handle this for you) 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

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

11 Environment-setup Example

12 Environment-setup Example Setting tool chain path

13 Environment-setup Example Setting environment variables that point to common tool chain tools.

14 Environment-setup Example SOC specific options, alters the compiler’s default header and library search path

15 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 file

16 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 – When cross compiling software/compiler finds and uses headers and libraries that belong to the host Sysroot – Compiler option that set the compiler’s default search path.

17 Compiling User Space vs. Kernel Space Example Kernel Space/BSP Software –U-boot, kernel and kernel device drivers Example User Space Software –Qt, Gstreamer and Busybox Kernel space software is protected thus it should not be exposed to the environment variables set by environment-setup for the user space Kernel space software should be portable to support multiple platforms

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

19 Building with Auto Tools /configure – Used to determine what compiler your using, supported compiler options, available libraries and allows users to determine which features to use and which features not make – Builds the application make install – Install binaries, headers to either a default location or user specified location.

20 From the configure file

21 Configure GUI make menuconfig

22 Configure GUI make menuconfig

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

24 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 When building compiler tools: the system for which the tools will create output. Environment-setup creates a environment variable with all this information already filled! And of course, the PATH must be defined (see next slide)

25 Configure without the right PATH

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

27 Configure Help

28 Configure – Important Environment Variables

29 Configure – Feature Selection

30 Install Location By default auto tools will install 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 a NFS directory Easiest way to accomplish this is by setting the software’s default install location in the auto tools script

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

32 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=

33 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 where the libraries and headers are into the file system of the target (either ramfs, or mount or any other file system location)

34 Recap What we learned? 1.How to manually compile simple software. 2.How to link to external libraries. 3.How to build an auto tools based program. 4.How to build with libraries not included in the SDK. 5.How to deploy cross compiled libraries to the target

35 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.

36 Native Compiling Building the executable on the target (The same machine that the code will run on) Benefits: –Don’t worry about host contamination –Native compiling is simpler and requires less configurations and settings Draw Backs: –Building on an embedded device will be a lot slower than even 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 don’t provide the tool chain so it isn’t an option.

37 Different Approach – Build your own distribution Open embedded/Yocto project is used to create distribution file system for any architecture 1.A ‘recipe” scripts contains all the information that is required to build applications and libraries. There are Over 2000 for different systems Benefits: 1.Open embedded makes handling dependencies simple. 2.Easy updating or Upgrading software 3.Reproducing the entire file system is easy. 4.Sitara provides a good starting point to use. 5.Handles licenses restrictions for you easily! 6.FREE!!!!!!!