Software for embedding in a system Part 1




Embedded Systems in Tamil


Software for embedding into the system

  • ROM image
  • Programming Languages and
  • Program models

Rom Image

  • Final stage software also called ROM image (Just as an image is a unique sequence and arrangement of pixels, embedded software is also a unique placement and arrangement at each ROM address of bytes for instructions and data).
 ROM Memory

ROM Memory

Final machine software

  • Bytes at each address defined for creating the ROM image.
  • By changing this image, the same hardware platform works differently and can be used for entirely different applications.
  • Distinct ROM image in a distinct Embedded System.
  • Compressed Codes and Data ROM image may alternatively be compressed software (for example, the zip format) and data.
 Final Machine Software

Final Machine Software

Programming Languages

  • Machine Language Coding :
    • Programmer defines the addresses and the corresponding bytes or bits at each address.
    • Used in configuring some specific physical device or subsystem like transceiver.
  • Assembly Language Coding :
    • It is needed for Invoking Processor.
    • Specific Instructions is requiring to understanding of the processor and instruction set.

Three steps when using assembly language

  • Assembler
  • Linker and
  • Locator
 Assembly Language

Assembly Language

Assembler

 Assembler

Assembler

Loader

 Loader

Loader

Programming language C or C++ or Visual

 Different Program Layer

Different Program Layer

  • Application Software - Different Program Layers
  • Program layers:
    • Processor commands
    • Main function
    • Task functions and
    • Library functions
    • Interrupt service routines and kernel (scheduler), Compiler
    • Generates an object file. Using linker and locator, the file for ROM image is created for the targeted hardware. C++ and Java are other languages used for software coding.
 Converting C into ROM Image

Converting C Program into ROM Image

Program Models

 Programming Models

Programming Models

Sequential programming

#include<reg51.h>  

void main(void)  
{
  P1 = 0x00; 
  		 
  while(1)  
     {
       P1 = 0xFF;          
       for(int i=0;I < 250;i + +);   // Dummy for loop to get delay
       P1 = 0x00;  
       for(int i=0;I < 250;i + +); // Dummy for loop to get delay
     }
}
 Sequential Programming

Sequential Programming

Object Oriented Programming Model

class Program
 {
  static void Main(string[] args)
  { 
     KaaShivRectangle r = new KaaShivRectangle();
     r.Values(); 
  }
 }
  class KaaShivRectangle
  { 
   double length;
   double width;
   public void Values()
   {
       length = 5; 
       width = 4;
   }

Finite State Machine for data path

class Bomb : public Fsm
 {
int myTimeout;            // extended state variable
public:
 
   void initial(Event const *e); // initial pseudostate
   void setting(Event const *e);       // state handler
   void timing(Event const *e);        // state handler
   void blast(Event const *e);         // state handler
};
 Finite State Machine

Finite State Machine

Multithreaded programming

 Multithreading Programming

Multithreading Programming



Related Searches to Software for embedding in a system Part 1