Software Development and Software Loading in Embedded Systems - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Software Development and Software Loading in Embedded Systems

Description:

... separate relocation step must be performed to create the executable binary image ... Create and initialize the heap (optional) ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 11
Provided by: sudh3
Category:

less

Transcript and Presenter's Notes

Title: Software Development and Software Loading in Embedded Systems


1
Software Development and Software Loading in
Embedded Systems
2
Cross Compilation
  • Development of embedded software is not generally
    done on the target processor
  • - Software development is done on a host
  • The compiler may run on one kind of processor
    (80x86) produce code for another ( 8051)
  • This is called a cross-compiler, but is otherwise
    not unlike any other compiler.

3
The Build and Load Process of Embedded
Application Programs
4
Linking and Locating
  • After compilation of modules, a set of object
    files must be linked together
  • - The linker runs on the host and does this
  • - The output is a relocatable program, with
    no fixed
  • addresses yet assigned to the code/data
  • A separate relocation step must be performed to
    create the executable binary image
  • - general-purpose computers generally do
    this
  • automatically, as the relocatable is
    loaded

5
Linking
6
Locating
7
Startup Code
  • Embedded software generally runs out of ROM, with
    all the modules linked together
  • - It is itself responsible for
    booting/initializing the system
  • In addition to your application code, it is
    necessary to have code to prepare the CPU for the
    execution of your C/C application.

8
C/C Startup Code Details
  • Copy initialized data from ROM to RAM
  • Zero uninitialized data area
  • Allocate space for and initialize the stack
  • Initialize the processors stack pointer
  • Create and initialize the heap (optional)
  • Execute constructors and initializers for all
    global variables (C only)
  • Enable interrupts
  • Call main()

9
Reset Vector
  • When a processor is started or reset, it must
    read its first instruction from a fixed known
    address
  • - A small piece of reset code is stored at
    that
  • address typically in a nonvolatile memory
    device
  • The reset code might just disable interrupts
    (since the vector table isnt initialized yet)
    and jump to the startup code
  • - Though sometimes additional hardware
    initialization is
  • required before the startup code can get
    control

10
The World Before main()
  • Reset code (assembly, at known address in ROM)
  • Hardware intialization (assembly, in ROM)
  • Startup code (assembly, in ROM)
  • C/C program (starting from main)
Write a Comment
User Comments (0)
About PowerShow.com