1 Copyright 2006 Aplix Corporation. All rights reserved. May, 2006 Tokyo Jamboree #8 Cross-Development on Mac André Krützfeldt.

Slides:



Advertisements
Similar presentations
 Please sit next to your partner.  If you don’t have a partner, please find one now.
Advertisements

Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
STScI Tiger Upgrade CPT Project Manager: Jim Grice Technical Manager: Mark Calvin.
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.
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Software installation Chapter 7. Software installation Numerous software options Usually free Open source Several sources Installation CD Websites sourceforge.net.
Lab 1 Instructor: Jolanta Soltis.
Building the toolchain GET A FEEL!! [ These are the steps to install and build the toolchain on windows(cygwin) ]
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
© 2010 IBM Corporation IBM Experience Modeler - Theme Editor Installing Python Image Library Presenter’s Name - Presenter’s Title DD Month Year.
How to install CGAL Yuanzhen Wang. What is CGAL Computational Geometry Algorithms Library “Provide easy access to efficient and reliable geometric algorithms.
Julie McEnery1 Installing the ScienceTools The release manager automatically compiles each release of the Science Tools, it creates a set of wrapper scripts.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
A crash course in njit’s Afs
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
I like helping Mac users. But, please know that I work M-F EST and will get back to you as soon as I can. Timothy Solberg Cell:
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
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.
Lesson 4 Computer Software
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 9 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
LINUX System : Lecture 3 Vmware, Cygwin, LINUX installation Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Trilinos 101: Getting Started with Trilinos November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
An Implementation of iSCSI initiator on a Zaurus PDA Presented by They Yu Shu 12 August 2005.
CSC 215 : Procedural Programming with C C Compilers.
Guideline: How to build AMSS source code? History: 01/02/ Make Draft 05/02/2010 – Release /02/2010 – Updated.
Geant4 Installation Supported platforms:  Scientific Linux with gcc 4.1.2/4.6  Mac Os X 10.7 and 10.8 with gcc 4.21  Windows7 with Visual Studio.
March 2, 2005Wah-kai Ngai1 Installation of Geant4 1st HK Simulation Meeting.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring Mike Phenow.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
Advanced BioPSE NCRR How to Install and Configure J. Davison de St. Germain Chief Software Engineer SCI Institute December 2003 J. Davison.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
City College of New York 1 Player Stage Gazebo Rex Wong CCNY Robotic Lab A robotic research and development environment.
Building Your Own Android Systems from Source Adam C. Champion CSE 5236: Mobile App Development 1.
IPT – Getting Started June Online Resources Project Website Requirements Server Preparation Installation Running IPT Installation Demo Upgrade/Reinstall.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lab 8 Overview Apache Web Server. SCRIPTS Linux Tricks.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
Implementation of Embedded OS
Embedded Software Design Week II Linux Intro Linux Kernel.
 CSC 215 : Procedural Programming with C C Compilers.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Day 1 Session 2. Setup & Installation
“Adoption, Care and feeding of a REDCap Server”
Cygwin: getting the setup tool
Operating System Kernel Compilation
CSC 215 : Procedural Programming with C
Implementation of Embedded OS
Seamless Guest OS's and more!
Computer System Laboratory
Install external command line softwares
The Linux Operating System
Getting started in Eclipse
Canon.com/ijsetup - Download, setup- Installation. More info visit:
Operating System Kernel Compilation
Installing OpenRefine
slides borrowed and adapted from Alex Mariakis and CSE 390a
Microsoft Virtual Academy
Shells, Help, and Paths.
LING/C SC 581: Advanced Computational Linguistics
Computer System Laboratory
Computer System Laboratory
Cygwin: getting the setup tool
Presentation transcript:

1 Copyright 2006 Aplix Corporation. All rights reserved. May, 2006 Tokyo Jamboree #8 Cross-Development on Mac André Krützfeldt

2 Copyright 2006 Aplix Corporation. All rights reserved. Macintosh and Xcode OS X does come with Xcode bundled Newest version at: Includes all gnu compilers (4.0.1) and utilities Download is about 900MB Good for Apple development –you will need it For embedded systems, not applicable

3 Copyright 2006 Aplix Corporation. All rights reserved. Complete your Mac tools Make your development complete! Use fink It installs everything under /sw After install use FinkCommander

4 Copyright 2006 Aplix Corporation. All rights reserved. Complete your Mac tools (2) Add the fink distribution to your path –Easy: more “test -r /sw/bin/init.sh &&. /sw/bin/init.sh” >>.profile Close your terminal window and open it again. Now the path should look like: $ echo $PATH –/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/local/bin: /usr/sbin:/usr/local/teTeX/bin/powerpc-apple-darwin- current:/usr/X11R6/bin

5 Copyright 2006 Aplix Corporation. All rights reserved. Compile the Compiler Next step is to select a Cross Compiler Best:Crosstool Current version 0.42 Supports: gcc-2.95, gcc-3.2.x - gcc-4.0.x Check the current build results: /buildlogs/ If you intend to compile for Motorola devices, use: Crosstool for EZX Current version 0.5

6 Copyright 2006 Aplix Corporation. All rights reserved. Compiler the Compiler (2) Extract the downloaded files with: gzip if the file ends with.gz bzip2 if the file ends with.bz2 (Both in fink) Make sure you have ‘wget’ installed –the build process uses it –Check with: $ type wget wget is /sw/bin/wget You MUST be online to do the build! –It will get the sources to compile from websites

7 Copyright 2006 Aplix Corporation. All rights reserved. Compiler source download The scripts use wget to download the libraries and linux components defined in: gcc- -glib-.dat If you have a proxy setup, make sure that wget can work with it. If you cannot get wget to work, just run the demo-XYZ.sh It will try to access the sites, use -c to stop it and use a normal browser to download the needed files. Place then into the download directory, usually $HOME/download Start demo-XYZ.sh again

8 Copyright 2006 Aplix Corporation. All rights reserved. Setup the target directory At the end you will have to install your cross compiler. Best to setup the directory and rights now. sudo mkdir /opt/crosstool sudo chown $USER /opt/crosstool The following script will build the Motorola cross compiler and install the result into the same directory!

9 Copyright 2006 Aplix Corporation. All rights reserved. How to compile the compiler build.sh from ezx-crosstool derived from demo-*.sh #!/bin/sh set -ex CROSSTOOL_DIR=`pwd` TARBALLS_DIR=$CROSSTOOL_DIR/downloads RESULT_TOP=$CROSSTOOL_DIR/gcc-arm-iwmmxt SRC_DIR=$CROSSTOOL_DIR/src export TARBALLS_DIR RESULT_TOP SRC_DIR GCC_LANGUAGES="c,c++" export GCC_LANGUAGES # Really, you should do the mkdir before running this, # and chown /opt/crosstool to yourself so you don't need to run as root. mkdir -p $RESULT_TOP # Build the toolchain. Takes a couple hours and a couple gigabytes. eval `cat arm-ezx.dat gcc glibc dat` sh all.sh --notest echo Done.

10 Copyright 2006 Aplix Corporation. All rights reserved. What if there is an Error? Mostly errors are not really errors. The Mac uses different versions of GNU Utilities. Look at the error and see what produced it. E.g. Error in an awk-script is not the script: –Use fink and install ‘gawk’ –Run “./build.sh” again –Mostly the error is gone. Unfortunately it does take hours and the “./build.sh” always starts from the beginning.

11 Copyright 2006 Aplix Corporation. All rights reserved. Expected Error There is an expected error: At the end it will complain about: –PATH_MAX is undefined This is to be ignored. ALSO (known): Apple make does have a bug/feature:.m files are treated differently! (Objective-C) Get a make from gnu and compile it separately Copy it in /sw/bin do not copy it in /usr/bin!

12 Copyright 2006 Aplix Corporation. All rights reserved. Distributed Compile Once you are done, you will have a cross compiler for your embedded device. If you happen to have more than one Mac, you can distribute the cross compiler and compile in your network. Tool to use is‘distcc’ which is part OS X Xcode. (Very advanced, I have not tested it yet.)

13 Copyright 2006 Aplix Corporation. All rights reserved. Cross-compile Trick Some developers prefer to use a different shell for the cross compilation. This assures that the builds do not interfere. E.g. ‘tcsh’ uses‘.tcshrc’ Set the PATH and other values to the target compiler. And do not forget:./configure --host=arm-linux This tells configure that you are cross compiling

14 Copyright 2006 Aplix Corporation. All rights reserved. Set the environment The PATH must be set to the cross compiler: PATH=/opt/crosstool/gcc glibc-2.3.3/arm-linux/bin:… Also set the environment variables: AR=arm-linux-ar CC=arm-linux-gcc CXX=arm-linux-g++ LD=arm-linux-ld RANLIB=arm-linux-ranlib STRIP=arm-linux-strip

15 Copyright 2006 Aplix Corporation. All rights reserved. Tools for Mac iTerm as xterm substitute, it supports bookmarks:

16 Copyright 2006 Aplix Corporation. All rights reserved. Tools for Mac (2) Fugu to copy over ssh

17 Copyright 2006 Aplix Corporation. All rights reserved. Utilities for Mac Some devices use Ethernet over USB: Get the Mac driver at: Originally for the Zaurus, but works with most USBLan or USBNet enabled devices. If you want to enable a device this way, look at:

18 Copyright 2006 Aplix Corporation. All rights reserved. Devices A1200 Rokr E2 A780

19 Copyright 2006 Aplix Corporation. All rights reserved.