Embedded System Development Lecture 13 4/11/2007

Slides:



Advertisements
Similar presentations
Introduction to Computing Systems from bits & gates to C & beyond Chapter 7 LC-2 Assembly Language.
Advertisements

Wannabe Lecturer Alexandre Joly inst.eecs.berkeley.edu/~cs61c-te
Program Development Tools The GNU (GNU’s Not Unix) Toolchain The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and.
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS 9.1 Introduction Application programs are typically developed, compiled, and run on host system Embedded programs.
CS 31003: Compilers ANIRUDDHA GUPTA 11CS10004 G2 CLASS DATE : 24/07/2013.
Computer Organization CS224 Fall 2012 Lesson 12. Synchronization  Two processors or threads sharing an area of memory l P1 writes, then P2 reads l Data.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
CS4101 嵌入式系統概論 Design and Development 金仲達教授 國立清華大學資訊工程學系 Slides from Computers as Components: Principles of Embedded Computing System Design, Wayne Wolf,
Assembler/Linker/Loader Mooly Sagiv html:// Chapter 4.3.
Characteristics of Realtime and Embedded Systems Chapter 1 6/10/20151.
Embedded Systems Programming Introduction to cross development techniques.
Loader- Machine Independent Loader Features
Embedded Control Systems Introduction to cross development techniques.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Topic 1: Introduction to Computers and Programming
Railway Foundation Electronic, Electrical and Processor Engineering.
Software Development and Software Loading in Embedded Systems.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
1. Fundamentals of Computer Systems Define a computer system Computer Systems in the modern world Professional standards for computer systems Ethical,
Topics Introduction Hardware and Software How Computers Store Data
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Instruction Set Architecture
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Computer Systems Organization CS 1428 Foundations of Computer Science.
GCSE Information Technology Storing data Data storage devices can be divided into 2 main categories: Backing storage is used to store programs and data.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
The LC-3 – Chapter 7 COMP 2620 Dr. James Money COMP
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Chapter 17 Looking “Under the Hood”. 2Practical PC 5 th Edition Chapter 17 Getting Started In this Chapter, you will learn: − How does a computer work.
Lecture 11: System Fundamentals Intro to IT COSC1078 Introduction to Information Technology Lecture 11 System Fundamentals James Harland
This material exempt per Department of Commerce license exception TSU Address Management.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
Introduction to Assembly Programming Computer Architecture.
Software Toolchains. Instructor: G. Rudolph, Summer Motivation Desktop Programmers typically write code on the same kind of machine on which it.
CSc 453 Linking and Loading
Software Toolchains. Motivation 2 Write Run Edit, compile, link, run, debug same platform Desktop Write Run Edit, compile, link, debug on host; run on.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Hello world !!! ASCII representation of hello.c.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 10 –Linkers.
Chapter 17 Looking “Under the Hood”
Computer Basics.
Lecture 3 Translation.
Unit 2 Technology Systems
Assembler, Compiler, MIPS simulator
ECE 3430 – Intro to Microcomputer Systems
Topics Introduction Hardware and Software How Computers Store Data
A Closer Look at Instruction Set Architectures
Why to use the assembly and why we need this course at all?
System Programming and administration
Microprocessor and Assembly Language
CS4101 Introduction to Embedded Systems Design and Implementation
An Embedded Software Primer
Chapter 7 LC-2 Assembly Language.
Computer Organization & Compilation Process
Computers: Hardware and Software
Loaders and Linkers: Features
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS
Topics Introduction Hardware and Software How Computers Store Data
CMP 131 Introduction to Computer Programming
Handling Arrays Completion of ideas needed for a general and complete program Final concepts needed for Final.
ECE 352 Digital System Fundamentals
Chapter 17 Looking “Under the Hood”
CS 286 Computer Organization and Architecture
Computer Organization & Compilation Process
Program Assembly.
COMP755 Advanced Operating Systems
Presentation transcript:

Embedded System Development Lecture 13 4/11/2007 CS590 Embedded System Development Lecture 13 4/11/2007

Class Notes Homework #3 is out. It is due next week (4/18). Final project report/demo April 25th.

Tool Chains Most programming work for embedded systems is done on a host or workstation, a computer system on which all the programming tools run. Only after the program has been written, compiled, assembled and linked is it moved to the target, the system that is shipped to customers.

Tool Chains Native tools are toolsets that will build software to run on the host. What we need is a compiler that will run on the host but produce the binary instructions that will be understood by our embedded processor. Such a program is called a cross-compiler.

Tool Chains Various compilers and processors may exhibit behavior you might not expect. Variable sizes may vary Structures may be packed differently. Your ability to access 16-bit and 32-bit entities that reside at odd-numbered addresses may be different.

Tools Chains Just like cross-compilers, there are also cross-assemblers. When you are building the software, the output of one tool becomes the input to the next tool. A set of tools that is compatible in this way is called a tool chain.

Linking and Locating Linkers for embedded systems are often called locators or linker/locators because in addition to linking all the code together they also must handle locating the code at specific memory addresses. When a file is compiled, there may be references to specific addresses that hold a data item or are the address of a subroutine. Since the compiler can’t know at compile time what the ultimate addresses will be, it notes all the addresses that need to be filled in.

Linking and Locating The process of resolving all these unknown addresses is called address resolution. The information produced by the compiler that will allow these addresses to be resolved are commonly called fix-ups.

Linking and Locating Another issue that locators must resolve in the embedded environment is that some parts of the program need to end up in ROM and some parts need to end up in RAM. Most tool chains deal with this problem by dividing programs up into segments. Each segment is a piece of the program that the locator can place into memory independently of the other segments.

Linking and Locating Most cross-compilers automatically divide the module they compile into two or more segments: The Instructions Uninitialized Data Initialized Data Constant Strings You must tell the locator where to position the segments in memory.

Linking and Locating Other features that some locators offer: You can specify the ranges of ROM and RAM, and the locator will tell you if the program doesn’t fit. You can specify an address at which a segment is to end, and the locator will place the segment below that address. This is useful for things such as stacks. You can assign each segment to a group, and then tell the locator where the groups go, rather than dealing with the individual segments.

Initialized Data and Strings Initialized data causes special problems in embedded systems. The initial values must be in ROM, but it needs to run in RAM. One common way that locators deal with this is to create a “shadow” segment in ROM that contains all the initial values, and that segment is copied to the real initialized data segment at startup time.

Initialized Data and Strings Although the C standard specifies that any uninitialized variable that is not stored on the stack starts with a value of zero, this may or may not be true on your embedded system. Some tool chains automatically insert code that zeros out this memory area.

Initialized Data and Strings Strings present another potential issue. Should the strings be stored in RAM or ROM? Some compilers will put constant strings into the initialized data segment.

Locator Maps Most locators will create an output file, called a map, that lists where the locator placed each of the segments in memory. Typically, maps also include the addresses of public functions and global data variables.

Executing out of RAM RAM is typically faster than ROM. We may want to copy the code out of RAM and into ROM. We may want to compress the code image. Startup time considerations

Output File Formats Binary Intel Hex File Format Motorola S-Record Format

Getting Software onto the Target PROM Programmers ROM Emulators In-Circuit Emulators Flash Memory On-Chip Debugging

Class Project Any questions from last week? Final Demo/Presentation April 25th. Please email me your source code.