Presentation
-
Upload
chaitannya-mahatme -
Category
Technology
-
view
532 -
download
0
description
Transcript of Presentation
Building your own toolchain~ Chaitannya Mahatme
Overview of ARM architectures.
ARM 7
ARM 9
ARM 11
ARM7TDMI
ARM7TDMI (ARM7+Thumb+Debug+Multiplier+ICE)
This generation introduced the Thumb 16-bit instruction set
Audio controller in the SEGA Dreamcast D-Link DSL-604+ Wireless ADSL Router. iPod ,iRiver Most of Nokia's mobile phone range.
ARM 9
ARM moved from a von Neumann architecture (Princeton architecture) to a Harvard architecture with separate instruction and data bus (and caches), significantly increasing its potential speed.
Most important change was introduction of MMU, POSIX complaint OS could be ported.
All smart phones
ARM 11
SIMD instructions which can double MPEG-4 and audio digital signal processing algorithm speed
Cache is physically addressed, solving many cache aliasing problems and reducing context switch overhead.
TI OMAP2 series processors. All touch based smart phones.
Steps of Cross-Compilation
gcc: Run the cross-compiler on the host machine to produce assembler files for the target machine.
as: Assemble the files produced by the cross-compiler.
ld: Link those files to make an executable. You can do this either with a linker on the target machine, or with a cross-linker on the host machine.
Specifing target for your toolchain
arm-linux Armv4l : This makes support for the
ARM v4 architecture, as used in the StrongARM,
ARM7TDMI, ARM8, ARM9. Armv5l : This makes support for the
ARM v5 architecture, as used in the XScale and
ARM10.
EABI target
arm-eabi arm-none-eabi
In practice the target name makes almost
no practical difference to the toolchain you
Other EABI options
arm-none-gnueabi: this is the name as arm-none-eabi (specific to GNU compiler)
arm-unknown-eabi: bare metal arm-linux-eabi: Designed to be used
to build programs with glibc under a Linux environment. This would what you would use to build programs for an embeded linux ARM device.
CPU options
arm7, arm7tdmi, arm720t, arm9', arm9e, arm920, arm920t arm1136j-s, arm1176jz-s
Other configure options
--enable-interwork This allows for assembling Thumb and ARM code mixed into the same binaries (for those chips that support that)
--enable-multilib Multilib allows the use of libraries that are compiled multiple times for different targets/build types.
EABI for Linux
GNU EABI is a new Application Binary Interface (ABI) for Linux a.k.a Embedded ABI.
EABI specifies standard conventions for file formats, data types, register usage, stack frame organization, and function parameter passing of an embedded software program.
Why switch to EABI?
Compilers that support the EABI create object code that is compatible with code generated by other such compilers, thus you can link libraries generated with with object code generated with a different compiler.
Allows use of optimized hardfloat functions with the system's softfloat libraries
Uses a more efficient syscall convention, hence faster performance.
Since it's a newly adopted standard, will be more compatible with future tools.
Setting up build envoirnment.
Preferably use virtual box / Vmware. Create a new user for the installation. Set up the configure parameters in
the .profile Create separate dir for build and
source. Set PREFIX dir
Compilation process
Binutils glibc gcc gdb
Bootstrapping gcc
Install all the dependencies. The list of dependencies is on gcc.org Mandatory dependencies are GMP
and MPFR. The configure option --with-newlib
tells gcc we are using newlib (see below) and --without-headers tells GCC not to rely on any C library (standard or runtime) being present for the target.
Installing glibc
Before doing any configuring or compiling, you must set the C compiler that you’re using to be your cross-compiler, otherwise glibc will compile as a horrible mix of ARM code and native code
Make all-gcc. Make install-gcc
Installing gcc: Part II
Make Make install Add compiler to path variable
Get more info on http://wiki.openarmlab.org/
http://wiki.openarmlab.org/index.php?title=Building_your_own_toolchain
That's all Folks … Thank you