You are on page 1of 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….to name a few ..  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 ?...

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 .

h> | | void main(void) { while(1) { if(sensorip == 1) glowredled(). }} Build+Compile+Link .But then where is our favorite C…? I want you to do this “bla bla bla……” But I can’t understand what u say Ya now I understand 1101010100101010100001 0010101001010100010101 0010101010100100101010 1010101001010010010 Ok… see this #include <stdio. else glowgreenled().

Automotive Telecomm Air Crafts Medical Application Areas Smart Buildings Consumer What not? A few applications .

Who is this BOOT LOADER ?  A Bootloader is the first program which executes (before the main program) whenever a system is initialized.I think we had our quota of basics. In PC It is used to boot he OS of the system.....  Coming to our HERO………. 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 ?  Can’t 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 .

many Electronic Control Units are encapsulated in housings leaving very few pins accessible .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.

 After this.how can it act as a programmer…. the microcontroller can be programmed without a programmer.There comes the Boot loader…  Boot loader has to be programmed in the program memory of the microcontroller just once.  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………. using a conventional programmer.

checking for incoming bytes..contd  First of all. . depending on what type of boot loader it is.  If the bytes start arriving. the boot loader executes a jump at the start of the memory zone it has received and then the “normal” program starts running. Once all bytes have been received. it starts “listening” for incoming bytes via a specific interface.  For instance.Boot loader …………………………………. the boot loader will grab them and write them in the program memory in the sequence it receives them and at predefined locations. a UART boot loader will listen to the UART buffer of the micro.

SPI.A small example…………  A typical prog mem. CAN etc) for incoming bytes.  Prog. the boot loader using a programmer  Once the bootloader is in place. the bootloader will start listening to one of the micro interfaces (like UART. I2C. and the micro comes out of reset. If data does come through in the format expected by the bootloader. it starts writing the incoming bytes in the program memory .

the bootloader executes a jump at the first instructions of the regular program. .Example……………………………………….contd  Step 1 – right after reset.  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 code existing there starts to listen the chosen external interface for incoming data.

Programming simplified………………………… 1101010100101010100001 0010101001010100010101 0010101010100100101010 1010101001010010010 .

A typical flow diagram of Boot……. .

.Contd…..

Any questions……………………………………? .