Go Down

Topic: Effect of bootloader on speed (Read 177 times) previous topic - next topic

bluejets

I've seen it mentioned before how a bootloader affects the processing speed as the programs runs on or through the interpreter. Think I have that right, so can someone point me to a discussion or tutorial on this.?
Thanks....

Coding Badly


No, you do not have that correct.

Either the bootloader is running or the application is running.  Never both at the same time. 

A bootloader delays the start of the application while it checks for work.

Once the application starts the bootloader is irrelevant.


Paul__B

And - there is no interpreter.

The IDE compiles "C" code to pure machine code for the AVR.

KeithRB

I think you have the Arduino confused with the PicAxe.

evildave_666

#4
Jan 20, 2015, 12:22 am Last Edit: Jan 20, 2015, 12:25 am by evildave_666
The bootloader has nothing to do with the speed unless it has something custom that sets CKDIV before starting the user code.

The speed of the delay/delayms functions (as well as other timing functions in libraries or user code) are affected by the ratio of the actual clock to F_CPU, which is derived at compile time, generally from a value set in the boards file.

In essence, F_CPU is the clock speed that the compiler "thinks" the target code will be running at. If the clock is a different speed the real timing values will be different.









bluejets

I think you have the Arduino confused with the PicAxe.
I believe you are correct...... thanks all... :-[

Krupski

I've seen it mentioned before how a bootloader affects the processing speed as the programs runs on or through the interpreter. Think I have that right, so can someone point me to a discussion or tutorial on this.?
Thanks....
The bootloader ONLY pulls code from the serial port and writes it to flash memory when you "burn" your program into the Arduino. From that point on, the bootloader does nothing but consume a little bit of space. In fact, if you use an ISP you can burn programs directly into the processor with no bootloader at all.

Bottom line is, the bootloader ONLY transfers your program to memory. Then it's not used at all. It does not affect your processing speed in any way.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

mart256

When you burn bootloader on arduino IDE, it also set the fuses. They can change the speed of the clock and set external or internal oscilator.

Maybe thats what you meant.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy