Pages: [1] 2   Go Down
Author Topic: What Are The Pros And Cons Of Not Using The Arduino Bootloader  (Read 2974 times)
0 Members and 1 Guest are viewing this topic.
Down Under (Australia), SA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 88
Newbie is an understatement
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What Are The Pros And Cons Of Not Using The Arduino Bootloader. i have been searching and cant find out what is better bootloader or no bootloader.


To bootload or to not bootload.... that is the question
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Without the bootloader you gain about 2k of program memory space. But you have to use a dedicated programmer. With the bootloader you can upload the code directly via usb. Using a dedicated programmer also allows you to have more control over "obscure" things like the fuses (sort of hw option flags). Whether you need those 2k and more control over the chip depends on your app, skill and availability of tools.

HTH
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 210
Posts: 13030
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Without the bootloader you gain about 2k of program memory space.

0.5K
Logged

Down Under (Australia), SA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 88
Newbie is an understatement
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well i already know how the use the UNO as an ISP. i just made a shield so i can program the attiny chips
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Without the bootloader you gain about 2k of program memory space.

0.5K


Ouch, that was the old bootloader, optiboot since some time now... Thanks.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pro:
1) you get more space;
2) next complexity;
3) you have full control of the mcu all the time;
4) if it is possible, you have got to try it;
...

Con:
1) then it is not an arduino anymore;
2) why pay more and get less?
3) nobody cares about the extra space;
4) just because it is there doesn't mean you have to try it;
...
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5656
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What Are The Pros And Cons Of Not Using The Arduino Bootloader. i have been searching and cant find out what is better bootloader or no bootloader.

To bootload or to not bootload.... that is the question

Pros for not using the bootloader: Lots.
Cons: None that I can think of (except you need to buy an ISP programmer, obviously)

Well, OK, there's one con: Using an ISP programmer means you can write a sketch so big that other people with bootloaders won't be able to use it.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Edison Member
*
Karma: 30
Posts: 2494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unless you buy a more advanced processor, more memory, more eeprom, etc.....
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As handy as programming via usb cable and a button on the IDE is, I don't see how one would take the Arduinity out of Arduino. But hey, I'm a (very) lazy software guy after all... ;P
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 115
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As handy as programming via usb cable and a button on the IDE is, I don't see how one would take the Arduinity out of Arduino. But hey, I'm a (very) lazy software guy after all... ;P

I program via a USB cable and a button on the IDE all the time without using the bootloader.  You do not have any reset or DTR issues to deal with.  You can connect chatty devices to the hardware serial port without confusing the bootloader.  Whatever your final design is a programming port is just about mandatory a serial port not so much. 

Be picky on what you choose as a programmer, there are a few nice home brew ones that also provide ttl serial and GPIO's (to the USB attached PC).  There weakness is no high voltage programming to clear problematic fuses and the like.
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In my definition of "handy" I also include the fact that I just need a USB cable and nothing else. But I agree that a good (in your sense) programmer is a one-time purchase, i.e. a one-time "inconvenience".

Thanks for clarifying things a bit for me smiley
Logged

Boston Suburbs
Offline Offline
God Member
*****
Karma: 16
Posts: 955
I am above your silly so-called "Laws", Mister Ohm.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I picked up one of those USB-ASP jobbies off ebay for a couple of dollars, and been using it to program ATMEGA8's.  Since I chose to use the chip config which utilizes the internal oscillator instead of a crystal, that also reduces the cost and complexity of the build to the chip plus two caps.  Since I am just building color mixing PWM controllers for RGB LED strips with them, the program being used is quite small, so even the 8k of the ATMEGA8 is overkill-- but since all I really need is 3 analog inputs (pots for colors) and 3 digital outputs (PWM) the ATMEGA8, costing $1.20 each shipped, is a great choice and still supports almost all Arduino functionality.  If we say that the caps are ten cents a pop, we are still under a dollar and a half FOR THE WHOLE BUILD!

Running from internal clocks there is some speed drift, but if all you are doing is mixing PWM-- who cares?  Now, sure I could build a PWM system from 555's, but unlike a 555 based "dumb" fader, my fader has setting memories, patterns, and might actually be cheaper than a "simple" timer based solution.  It certainly is less complex to physicially build- a part count of THREE is hard to beat.

If I were to use a bootloader, there would be a boot wait while waiting for a signal on the serial port.. without a bootloader, it runs immediately without any of that delay- another consideration.

So I'd say that you should try it.  It allows you more design flexibility by allowing you to choose a processor which fits your needs, removes the boot delay, and also teaches you a new way to talk to the processor.  Learning new stuff to mess with is always amusing and leads to new ideas.

Now that the ATMEGA prices are reaching such low points, I'll be building all sorts of nonsense.. and not bothering to make reusable shields when the headers are more expensive than just committing a whole MCU to a build..
« Last Edit: October 01, 2012, 02:12:42 pm by focalist » Logged

When the testing is complete there will be... cake.

Offline Offline
Newbie
*
Karma: 3
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I were to use a bootloader, there would be a boot wait while waiting for a signal on the serial port.. without a bootloader, it runs immediately without any of that delay- another consideration.

Well, that isn't entirely true - I've been using a variant of optiboot that only pauses after a reset, on cold boot it starts immediately.  It's weird going back to my stock Arduino and re-discovering the cold boot delay.  But it is nice flashing my in-circuit ATtiny85 projects just by hitting the upload button and having it start immediately after flashing.

Quote
Now that the ATMEGA prices are reaching such low points, I'll be building all sorts of nonsense.. and not bothering to make reusable shields when the headers are more expensive than just committing a whole MCU to a build..

You're telling me - I was recently tempted by an auction of ATmega8's on eBay that was on the close order of a buck a chip delivered.  That's cheaper than I'm getting ATtiny85's!  More GPIO, same flash and memory, same basic level of avr-gcc support, the only thing that stopped me was my overflowing bin of parts I've accumulated.

Logged

SF Bay Area (USA)
Online Online
Tesla Member
***
Karma: 135
Posts: 6788
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In theory, there shouldn't be much difference.

In reality, the "device programmer" needed to program a chip without a bootloader has historically been a major stumbling block standing in the way of users trying to use microcontrollers.  Often proprietary and used with complex host-side software, often limited in their support of alternate operating systems, and often (significantly) more expensive than an Arduino itself.  And subject to certain target-bricking errors (like setting the fuses wrong) that are not possible to make when using a bootloader.

The forums are full of people who have been unable to get device programming to work, even to the extent necessary to burn the bootloader into new AVR devices.  Non-arduino forums have people complaining about having to switch firmware in their (official Atmel) programmers depending on the version of AVRStudio they're running, or if they're using linux instead of Windows.  And complaints of sketchy but cheap programmers from eBay that may or may not work.  And weird behavior when trying to program chips with large flash (mega2560.)

I mean... it's not THAT difficult to skip the bootloader and use an external programmer.  But it's a lot harder than just using the bootloader.

(that said, the state of AVR programming using alternate tools is "pretty good."  There are inexpensive programmers that are known to work well that are specifically aimed at the hobbyist community, and there is a lot of support.)
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The forums are full of people...

I think most of that is exaggerated and can be said about arduino and any other systems too.

Arduino's value-add is that it has significantly lowered the threshold to get into mcu programming and flattened the learning curve substantially. You don't need to read a datasheet to get a major function working, etc. So buying an arduino and striping it the arduino stuff doesn't make a lot of sense to me.

I would also point out the downside of that value-add: people don't read the datasheet and rely too heavily on the arduino library.

Logged

Pages: [1] 2   Go Up
Jump to: