Discussion in 'Embedded Systems and Microcontrollers' started by ect_09, Oct 20, 2014.
what is the boot loader,
why we need it??
what is its purpose ???
It is a small program that is used to load larger programs. We need it because it would require removing the device an putting it in a programmer. The purpose is to get a program into a processor.
am using ICSP,
i didnt load it. but i can program my chip 18f452 with different HEX file.
A bootloader allows you to do the same thing without any hardware assist like ICSP, usually through a standard serial port. Maybe most PICs do not support such a thing, but the Atmel chips certainly do.
Through the ICSP you are loading the HEX file with a programmer; for which you don't need a bootloader.
But what if you didn't have a programmer, and need to load a HEX file directly with a USB cable connected to the PIC?... that would require a bootloader; which is a program that loads and executes your programs instead of doing it directly.
For example: you don't need a programer to load a sketch into an arduino; that's because its bootloader does it through the serial coms by the USB cable.
You can do it with a PIC that has a USB peripheral. both the MCHPFSUSB and MLA come with bootloaders.
At the dawn of computer time we had to key in a boot loader with toggle switches, and then execute it, to read the OS off of paper tape or other input devices. We sure do have it lucky these days.
Also it helps to understand the origin of the term boot loader. It is the shorten form of bootstrap loader.
Hence check the origin of the term bootstrap and booting.
The first computers came with a blank memory, i.e. there was no coherent program in the program memory.
You had to manually enter the shortest possible program into the computer memory via front panel toggle switches.
After doing this a few dozen times one would memorize the code.
Here is the bootstap loader (Read-In-Mode) for the DEC PDP-8 minicomputer:
07756 6014 RCC
07757 6011 RSF
07760 5357 JMP .-1
07761 6016 RRB
07762 7106 CLL RTL
07763 7006 RTL
07764 7510 SPA
07765 5357 JMP 7757
07766 7006 RTL
07767 6011 RSF
07770 5367 JMP .-1
07771 6016 RRS
07772 7420 SNL
07773 3776 DCA I 7776
07774 3376 DCA 7776
07775 5356 JMP 7756
07776 0000 AND 0
07777 5301 JMP 7701
And here is the bootstrap loader for the Data General Nova 2 minicomputer:
17757 126440 GET: SUBO 1,1
17760 063610 SKPDN TTI
17761 000777 JMP .-1
17762 060510 DIAS 0,TTI
17763 127100 ADDL 1,1
17764 127100 ADDL 1,1
17765 107003 ADD 0,1,SNC
17766 000772 JMP GET+1
17767 001400 JMP 0,3
17770 060110 BSTRP: NIOS TTI
17771 004766 JSR GET
17772 044402 STA 1,.+2
17773 004764 JSR GET
You only had to memorize the middle column of numbers.
It can't be any other way, when a simple 1 dollar MCU has 10 times more memory and is 20 times faster than my first computer.
Remember this piece of doggerel?
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
If I recall correctly, that was manditory posting on every minicomputer with flashing lights.
I first saw it on the console of the Princeton University IBM 7090 in 1962
Never saw that before. Still laughing
I saw it at MIT on an IBM 1130! Ca 1968