130 likes | 135 Views
Selecting a Cross Development Environment. Why do you need to select a CDE?. Through out your career the target systems will change rapidly Both the h/w and s/w The specification of the tools will be more important For example, small fast code may be essential
E N D
Why do you need to select a CDE? • Through out your career the target systems will change rapidly • Both the h/w and s/w • The specification of the tools will be more important • For example, small fast code may be essential • The requirements of the tools will be very specific • Specialist tools will be required.
What will you be selecting? • There can be confusion over both the role and interface between Compilers, Libraries and Operating Systems • It is possible to do without either a library and an operating system! Compiler Operating System Library Implements calls Adds functionality Does the calls Calls functions getchar,
Compilers, Libraries and OSs • The Compiler generates code • However code need linking and loading • The library provides functionality and interfaces to OS • Libraries have to interface to OS • The operating system actually implements the calls and permits the execution of code
Selecting a compiler #1 • The are a number of criteria for selecting a compiler • Target environment • Can impose a choice • Standards • Lots of them and confusing • Tools • A range of tools are very important • Library support • Documentation • Output format(s)
Selecting a compiler #2 • There are a number of criteria that can be used • Mature compiler • Portable • Widely used/known • Runs on same/compatible hardware • Variety of OS/RTOS interfaces • Supports a number of languages • Open source/open standard
Selecting a compiler #3 • Special features for xdevelopment • Inline and assembler linkage • Output of assembler code • Can turn off features • i.e. optimisation • Supports full processor family • Sophisticated linking • Good linker language supported
GCC • Long standing compiler development • Developed an editor emacs, compiler suite gcc and UNIX-like OS Hurd. Plus many other tools and utilities. • emacs and gcc have been the most successful and central to many developments – BSD, Linux • Developed by Richard Stallman and the Free Software Foundation
The GCC suite • The development tools are made up of • gcc , a set of compilers for C, C++, Ada, Java • The gnu linker, ld and assembler, as • Binutils, a collection of useful code development tools • ar, nm, objcopy, objdump, ranlib, size, strings, strip, addr2line
Using assembler in gcc • Compiling the code with • M68k-unknown-coff-gcc –m68000 –S asm.c • Creates…….
Using assembler in gcc • Compiling with • M68k-unknown-gcc –m68000 –S –O3 –fomit-frame-pointer • Creates…