Vous êtes sur la page 1sur 19

BOOT LOADER A VITAL PART OF EMBEDDED SYSTEM DESIGN

Kalyan Madhu Bhaskar Surisetty


Systems Engineer KPIT Cummins Info systems Ltd

Some basic questions to ponder..


What is an Embedded System (ES) ? Where is it used ? Why is it so important ?

What r the precautions taken while designing any

embedded systems ? How to simplify the design ? What r the recent advancements ? How do I achieve more using less ?....to name a few

Let us have a quick walk thru the basics

Essential Components
Microcontroller / DSP Sensors Converters (A-D and D-A)

Actuators
Memory (On-chip and Off chip) Communication path with the interacting

environment

Embedded System Structure (Generic)

Sensor

A/D

Microcontroller

D/A

Actuator

Comm. module Memory

Display, Keypad etc

But then where is our favorite C?


I want you to do this bla bla bla But I cant understand what u say Ya now I understand
1101010100101010100001 0010101001010100010101 0010101010100100101010 1010101001010010010

Ok see this

#include <stdio.h> | | void main(void) { while(1) { if(sensorip == 1) glowredled(); else glowgreenled(); }}

Build+Compile+Link

Automotive Telecomm Air Crafts

Medical

Application Areas

Smart Buildings

Consumer What not?

A few applications

I think we had our quota of basics.......


Coming to our HERO.Who is this

BOOT LOADER ?
A Bootloader is the first program which executes (before

the main program) whenever a system is initialized. In PC It is used to boot he OS of the system. In case of microcontrollers, a bootloader enriches the capabilities of the microcontrollers and makes them self programmable device

Boot Loader!@#$%^&*()
Again coming back to the questionnaire. What is this ? Why is this required ?

Cant we do away with it ?


Is it really worth to discuss it ? What is the alternate to it ?

How is the programming done ?

1101010100101010100001 0010101001010100010101 0010101010100100101010 1010101001010010010

Programming devices are not always useful


Professional programming devices tend to be very

costly Might be difficult to get such programmer for every bench in any university or any facility Complex setup even for simple application Difficult to use in the field In the automotive industry, many Electronic Control Units are encapsulated in housings leaving very few pins accessible

There comes the Boot loader


Boot loader has to be programmed in the program

memory of the microcontroller just once, using a conventional programmer. After this, the microcontroller can be programmed without a programmer. Once in the microcontroller, the boot loader written in such a way that each time after reset it starts running like any conventional program. But then.how can it act as a programmer..?

Boot loader ..contd


First of all, depending on what type of boot loader it is, it

starts listening for incoming bytes via a specific interface. For instance, a UART boot loader will listen to the UART buffer of the micro, checking for incoming bytes. If the bytes start arriving, the boot loader will grab them and write them in the program memory in the sequence it receives them and at predefined locations. Once all bytes have been received, the boot loader executes a jump at the start of the memory zone it has received and then the normal program starts running.

A small example
A typical prog mem.
Prog. the boot loader using a

programmer Once the bootloader is in place, and the micro comes out of reset, the bootloader will start listening to one of the micro interfaces (like UART, SPI, I2C, CAN etc) for incoming bytes. If data does come through in the format expected by the bootloader, it starts writing the incoming bytes in the program memory

Example.contd
Step 1 right after reset, the

bootloader code existing there starts to listen the chosen external interface for incoming data. Step 2 the incoming data is written in the program memory as it would be written by a programmer Step 3 once the entire incoming data has been written, the bootloader executes a jump at the first instructions of the regular program.

Programming simplified

1101010100101010100001 0010101001010100010101 0010101010100100101010 1010101001010010010

A typical flow diagram of Boot.

Contd..

Any questions?

Vous aimerez peut-être aussi