Embedded Systems Programming - PowerPoint PPT Presentation

About This Presentation
Title:

Embedded Systems Programming

Description:

Cross development is the process of developing code on one ... Sometimes an emulator is used. Special tools are required. The standard PC compiler won't do! ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 14
Provided by: rich197
Category:

less

Transcript and Presenter's Notes

Title: Embedded Systems Programming


1
Embedded Systems Programming
  • Introduction to cross development techniques

2
What is cross development
  • Cross development is the process of developing
    code on one machine the host, to run on another
    machine the target
  • The host will be a normal, powerful machine
    running an operating system
  • The target will often be a single board computer
    that may have no or limited software and hardware
    resources

3
Targets
Host System
4
Features of cross development
  • The code created cant run on the host system
  • Sometimes an emulator is used
  • Special tools are required
  • The standard PC compiler wont do!
  • The code has to be downloaded

5
Why cross develop?
  • Code is cross developed for a number of reasons
  • Frequently the development cant be done on the
    board
  • The board has no disc, compiler, screen etc
  • The development environment is very powerful and
    fast
  • Games developers do this
  • Often the development might be done by a team on
    networked machines

6
Cross development tools
  • In order to do cross development you need special
    tool kits, sometimes called toolchains. These
    consist of
  • Cross compiler, assembler and linkers
  • Downloading and conversion software
  • Remote debuggers
  • Useful utilities
  • Files to dump or strip binary files, all in
    binutils.

7
Cross compilers
  • Before we understand what cross compilers do it
    might be worth reviewing what compilers do
  • Simply put they take an input text source program
    file and output an executable binary output file
    (or some error messages!)

Compiler
Source Program file
Executable Binary File
8
The compilation processmode detail
cc flags myfile.c thisfile.o
Preprocessing
Compilation
Optimisation
Link/loading
Assembler or Object format
Relocatable Object file
Executable Binary
Text
includes .h header files defines
Object files Library file Start-up code
optional
9
High Address Args and env vars Command line arguments and environment variables
StackV
Unused memory
Heap
Uninitialized Data Segment (bss) Initialized to zero by exec.
Initialized Data Segment Read from the program file by exec.
Low Address Text Segment Read from the program file by exec.
  • Text Segment The text segment contains the
    actual code to be executed. It's usually

10
Program Segments
char strnghello int count, this,
that main() int i, j, k char sp .. for
(i0i ! 100i) sp (char)
malloc(sizeof(i))
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com