Go Down

Topic: Question: What is a bootloader? (Read 568 times) previous topic - next topic

Voidugu

I apologize for my probably dumb question but what exactly is a bootloader?
Could you please explain everything that had to do with it and the arduino?
ie what's the purpose of a bootloader,how does it work etc
If you could link me another thread/topic i would be more than pleased to study it

Thanks in advance

johnwasser

http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

focalist

#2
Dec 12, 2012, 08:26 pm Last Edit: Dec 12, 2012, 08:27 pm by focalist Reason: 1
It's very simple really.  A bootloader is a small program that runs and sets things up before your main program runs.

In Arduino, one of it's main functions is to see if there is any commands at the serial port, like a request to rewrite the main program coming from the computer.

If you program the chip directly using ICSP, you don't need to have a bootloader, which frees up a little space and removes the short delay when your Arduino is reset... That delay is the bootloader program waiting and checking the serial port for commands.
When the testing is complete there will be... cake.

Voidugu

#3
Dec 12, 2012, 08:50 pm Last Edit: Dec 12, 2012, 08:53 pm by Voidugu Reason: 1
After reading the thing i got some more questions:

1)Is the bootloader loaded on the main chip's flash or EEPROM?
2)What are fuses (something bootloader related)?
3)What is the use of the second Atmel chip on the board?
4)What are the 6 pins labeled AREF on the UNO R3?
5)Can i program the main chip via its pins instead of using the ICSP pins?
6)Does the arduino C compiler, compile the source code into the Atmel's machine language?

Again thaank you people :)

retrolefty


After reading the thing i got some more questions:

1)Is the bootloader loaded on the main chip's flash or EEPROM?

Flash, placed at the very end of it's memory space. Any user's sketch will fill from start of flash up to beginning of bootloader program.

2)What are fuses (something bootloader related)?

They are 'firmware' switches internal to the chip that enable or disable various chip features.

3)What is the use of the second Atmel chip on the board?
It's a small microcontroller chip preprogrammed to act as a USB serial interface to allow communications
between the PC and the other AVR chip on the board. This serial link is used to upload user sketches to the AVR chip or for simple serial communications to the IDE's serial monitor or any PC based application that can use PC comm ports.


4)What are the 6 pins labeled AREF on the UNO R3?
There is only one shield pin named AREF on a arduino board. The six male pins next to the AREF label is for allowing for ISCP programming of the USB serial converter chip if it ever loses it's program or if one wishes to repurpose the chip function, say as to act as a USB host chip to read a keyboard or a mouse.
5)Can i program the main chip via its pins instead of using the ICSP pins?
The main chip can be programmed by the arduino IDE via the USB serial link using the bootloader on the main chip. Or the main chip can be programmed using a hardware programmer via it's ICSP pins. Using the serial link and bootloader is the more normal way most program their arduino boards.
6)Does the arduino C compiler, compile the source code into the Atmel's machine language?

Yes, the gcc C++ compiler/linker sends the final code, called object code and is comprised of only AVR instructions and user constant data.

Again thaank you people :)

Your welcome
Lefty


romninja

If i recall correctly, one of the fuses(or type of fuses.) is an internal oscilator, which eliminates the need to solder/attach a 16 mhz crystal oscilator to your circuit if you were to use an atmega chip out of your arduino board(like,in a breadboard) you could use the fuse for the internal oscilator to further minimize your circuit.

This information is not relevant if you use your atmega chip inside your arduino itself i believe,since this board has an oscilator on it, it's just for when you want to make multiple copies of your arduino,minimize the space it uses and while doing this,eliminate the need for the oscilator which saves on money.

Go Up