18
Introduction Purpose • This training course introduces the free GNU tools that can be used for debugging embedded system application software in the Renesas HEW (High-performance Embedded Workshop) integrated development environment. Objectives • Learn about the history, license, benefits, prerequisites, and other basic aspects of GNU tools. • Understand GNU terminology and toolchain contents. • Learn basic facts about KPIT GNU tools and credentials. • Know where to go for additional information Content • 18 pages • 2 questions Learning Time • 35 minutes

25956 INTRO TO GNU TOOLS PRINT

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Introduction

Purpose

• This training course introduces the free GNU tools that can be used for debugging embedded system application software in the Renesas HEW (High-performance Embedded Workshop) integrated development environment.

Objectives

• Learn about the history, license, benefits, prerequisites, and other basic aspects of GNU tools.

• Understand GNU terminology and toolchain contents.

• Learn basic facts about KPIT GNU tools and credentials.

• Know where to go for additional information

Content

• 18 pages

• 2 questions

Learning Time

• 35 minutes

• Recursive acronym for "GNU's Not Unix“

• UNIX-compatible software system

• GNU project is “Free software” developed by Free Software Foundation (FSF), founded by Richard Stallman

• GNU General Public License (GPL) —Intended to guarantee the freedom to share and change free software

What Is GNU?

1983 1984 1985 1989 1991

History of GNU

Basic GNU Philosophy: Produce open, non-proprietary software

GNU operating system is free software

- Gives users freedom to run, copy, distribute, study, change, and improve the software

- Has only one restriction: Users cannot limit further redistribution

- Provides freedom that is a matter of liberty, not price

GNU Freedom, Benefits

Because GNU software is open, it :

- Is fast, powerful, and more portable than its proprietary counterparts

- Evolves more rapidly than proprietary code, since users who want to make improvements are free to do so

GPL allows you to:

• Redistribute copies of free software

• Obtain the source code

• Change the source code or use pieces of it in new free programs

However. . .

• Changed source code must also be under GPL

General Public License

For more information:

http://www.gnu.org/licenses/gpl-faq.html

http://www.gnu.org/philosophy/selling.html

GNUCompiler

GNU Debugger

GNU Assembler

GNU Linker

Other utilities

Binutils

GNU Tools

What are GNU Tools?

• Complete set of tools for development of application software for embedded systems.

CLibraries

Cost Available freely in source format

Host platform Easily ported to multiple host platforms, such as

Windows, Unix, and Linux

Target platform Support available for a wide range of target CPUs,

and new CPUs can be added easily

Language Support provided for all widely-used and standardized

compiler languages: C, C++, Java, Ada, Fortran

Obsolescence Not an issue, due to open-source implementation

Portability Possesses uniform assembler language, linker syntax

Vendors Users aren’t locked to any vendor, nor limited to set

of suppliers

Why Use GNU Tools?

• Pros

- Tools are free

- Source code is included

- Bugs are fixed quickly and help is readily available through a vast support network on the Internet

- Mailing lists are available for queries and enhancements

• Cons

- No one commercial company is responsible for GNU tools

Pros and Cons of GNU Tools

Which of these statements correctly describe the advantages of using GNU tools? Select all that apply and then click Done.

A. GNU software is open, so it is more portable, evolves more rapidly, and is less prone to obsolescence than its proprietary counterparts.

B. GNU software is free software, so it is always redistributed without cost.

C. Recipients of the GNU GPL can change the source code, but this changed code must also be under GPL.

D. GNU development tools include a compiler, debugger, assembler, linker, and other binary utilities.

Question

Done

GNU Tools Checklist:

�Sources downloaded from FSF websites

�Linux or Unix Emulator (such as Cygwin) for building

�Disk space to process the data

�Knowledge about the build procedure

Prerequisites for Using Tools

• Build system – System on which the tools are built

• Host system – System on which the tools will run

• Target system – System for which the tools generate code

• Cross compiler – Compiler that produces programs that run on a different system

Windows System SH Embedded System

HOST TARGET

Development team needs a compiler that executes in the Windows environment, but produces executable code that can run on

an SH target. Thus, it needs a cross compiler.

Terminology

Typical Application Development Situation

• GCC: Compiler source code

• Binutils: Contains the source code of the assembler, linker, and other binary utilities such as “objcopy,” “nm,” “ranlib,” etc.

• Newlib: Collection of C libraries, including math library and various board-support packages ["libgloss"] for embedded systems

• GDB: GNU’s source-level debugger that lets you see what is going on “inside” your program while it executes

Contents of GNU Toolchain

GCC:

• Includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj, etc.)

• Works on native and cross targets

• Supports popular target processors, including Renesas SuperH, M16C, and H8 families, as well as ARM and MIPS chips

• Has source code consisting of GCC and many binary utilities such as ld, objcopy, strip, etc.

• Provides Configure scripts and Makefiles for configuring and building the GCC toolchain for host and target systems

GNU Compiler Source Code

GNU as

GCC

.c File

GNU ld

ELF .out

Newlib

Target assembly code

Relocatable machine code

Absolute machine code

Source program

Source code

Compiler

Assembler

Linker

Object code

GNU Compilation Process

Libraries

• Proven, pre-built, proven binary tools that allow more time for application development

- Compiler source code, Binutils, Newlib, and GDB source-level debugger that shows whatis happening inside program as it executes

• Tested and optimized for Renesas targets

• Free and easy to use

• Available for Windows and Linux platforms

• Easy download and installation

• Integrated with Renesas’ proprietary tools

• Free technical support at dedicated web portal

- GDB stubs, monitor programs, tutorials, documentation, FAQs, and discussion forum

KPIT GNU Tools

Support for all Renesas devices

Supporting Renesas

processors for last 5

years

Free and easy download +

easy installation

Posted more than 90

patches to FSF

Maintainer & check-in rights for different

GNU tools

FREE and prompt

technical support

8500+ registered

users

2100+ downloads per month

KPIT GNU Tools Credentials

Best GNU package for

Renesas processors

• KPIT GNU Tools for Renesas targets:

http://www.kpitgnutools.com

• GNU Compiler Collection (gcc):

http://gcc.gnu.org/

• Binary Utilities (binutils):

http://sourceware.org/binutils/

• Standard Libraries (newlib):

http://sourceware.org/newlib/

• GNU Debugger (gdb):

http://sourceware.org/gdb/

• GNU Packages:

http://www.gnu.org/software

http://directory.fsf.org/GNU

http://ftp.gnu.org

Sources for More Information

Match each GNU item to the most appropriate explanation by dragging the letters on the left to the correct locations on the right. Click Done when you are finished.

GDB

BinutilsB D

Done ResetShow

Solution

AGNU source-level debugger that lets you see what is going on “inside” your program

A

C GCC

Executes in one system but can produce programs that run in a different system

BContain the source code of the assembler, linker, and other binary utilities

D Cross Compiler CCompiler source code that includes front ends for C, C++, Objective-C, Fortran, Java, and ADA

Question

• Basic information about GNU tools

• Reasons for using them

• Prerequisites for using them

• KPIT GNU tools

• References

Course Summary

For more information, please visit our Web site:

http://america.renesas.com