Why do a lot of people want to burn bootloaders into chips?

simplesi:
So why not just upload your final sketches to the standalone (non-bootloaded chip) project when its working :slight_smile:
(I'm sure that your method is good for some things but I'm wondering if people are spending time loading bootloaders when all they really need is to set the fuses to get their clock speeds right :slight_smile: )

That's exactly what I do, see Prototyping small embedded projects with Arduino | David Crocker's Solutions blog. Having a bootloader installed on the final system increases startup time, and if you are using the internal clock then it probably won't work anyway because the baud rate will not be accurate enough. However, if your hardware need a serial port anyway, then you could argue that including the bootloader makes reprogramming it easier.

Different strokes for different folks. The main thing is that there are several ways to migrate from using a arduino board as a prototyping/testing platform and then transferring the development effort over to a standalone project.

That is I feel the the biggest advantage of the Arduino 'system' has over any other development system I have seen or read about, easy transferal to the minimum circuitry required for any given project. That and the fact that the avr chips are still avalible in DIP packages makes it a very hobby friendly effort compared to most other 'platforms'.

Lefty

I'm repurposing a weather station that has an ATmega8 chip. I wanted to program the boot loader into it so that I can develop the new software directly on the hardware it will run on. When I get done, I'll flash the chip through ISP and lose the boot loader. I realize I could use ISP during that whole process but I prefer working in the Arduino IDE instead of in the gcc command line environment. Like retrolefty says, different strokes.

o why not just upload your final sketches to the standalone (non-bootloaded chip) project when its working

Because sometimes you have surrounded your stand alone system with all sorts of hardware. You don't know if it is right unless you have this hardware. You have built this properly and it is not that easy to connect that hardware into a standard arduino. In fact most of my projects go straight to standalone and never see a "conventional" arduino board.

I sometimes skip the bootloader entirely, I have the FTDI hooked up for serial debugging and program via USBtinyISP. It's great, no automatic closure of the serial monitor window and no reseting the Arduino when I open said window!

I wanted to program the boot loader into it so that I can develop the new software directly on the hardware it will run on.

I can see if your developing like that and need to access the serial port for debugging info via FTDI connections then that's a very good reason.

but I prefer working in the Arduino IDE instead of in the gcc command line environment.

Who doesn't! ... but the only time a command line is needed is to set the fuses - after that its IDE all the way :slight_smile: I'm thinking that what's needed is an option in the IDE to just set the fuses to the same settings as they would be if you'd burned the bootloader for your device.
But then, there would just be lots of posts asking how to burn the fuses so no real gain :slight_smile:
So I've probably got the answer to the question :slight_smile:

Simon

or via a £5 USB programmer.

The quick answer is that USB programmers are traditionally more expensive than that, and significantly more difficult to use. An Arduino is essentially a $10 microcontroller with a $10 USB interface that service double purpose: communications AND program loading. Adding a $10 programmer is a 33% cost increase... (those are sorta "wholesale" costs...)

It might have been an interesting idea on Uno-class boards (with a programmable USB controller) to have the USB controller double as an actual programmer, but that's not what happened...

westfw:

or via a £5 USB programmer.

The quick answer is that USB programmers are traditionally more expensive than that, and significantly more difficult to use. An Arduino is essentially a $10 microcontroller with a $10 USB interface that service double purpose: communications AND program loading. Adding a $10 programmer is a 33% cost increase... (those are sorta "wholesale" costs...)

Recently, the cost of USB programmers has really dropped,
these days, you can find USBASP programmers on EBAY for under $5 USD all day long.
In fact it has reached such a commodity level that you can now even get USBASP programmers in fancy "pretty"/"cool" colored
cases for about $10 USD.
http://www.ebay.com/itm/USBASP-ISP-Download-Programmer-Adapter-51-AVR-MCU-/150657060031?pt=LH_DefaultDomain_0&hash=item2313dc4cbf

These low cost programmers can work with the Arduino IDE with a few modifications
to a couple of control files so ease of use is the same once the control files have been updated.

What is somewhat ironic is that these days the USB to serial interface/cable costs more than a low cost USB ISP programmer.

But as far as overall cost goes, if you use "arduino"
boards that don't have the USB to serial interface on them because USB communication/data connectivity
is not needed for final operation, the cost of a USB to serial
device/cable (for debugging) and a USB programmer for programming can be divided across all your boards to give
a lower overall cost per board/project with savings starting after about the 2nd board/project vs something
like the UNO board.
So in some situations using a USB programmer can be cheaper
than using a USB to serial interface for uploading via bootloader.

One area where I think a bootloader makes the most sense is on the AT90/32U4 series AVRs
like the Teensy boards.
In that case, by having a USB based bootloader, you can completely eliminate the cost of both
the USB to serial device/cable and the USB programmer since it has USB support built right in to the AVR.

---bill

What is somewhat ironic is that these days the USB to serial interface/cable costs more than a low cost USB ISP programmer.

As long as you are allowing for using E-bay as a market place, I'm not so sure your statement hold true.

http://www.ebay.com/itm/370532286388?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

Lefty

You absolutely correct about the costs of the standalone USB to serial devices available now.
I overstated things a bit. (I am a bit surprised that the standard FTDI cables still go for about $20 though)
I was mainly comparing the costs of using a USB based ISP programmer without
using a bootloader to using an "UNO" type board or one with with the USB to serial built in
which makes using a separate programmer more expensive than using a bootloader.

There are some great low cost USB to Serial boards out there. I've actually looked
at that one. While usable, it is unfortunate that they didn't use the FTDI pinout -
it would have made it a direct drop in for the Arduino crowd.

--- bill

There are some great low cost USB to Serial boards out there. I've actually looked
at that one. While usable, it is unfortunate that they didn't use the FTDI pinout -
it would have made it a direct drop in for the Arduino crowd.

Yes a different pin order would have been sweet. I bought it (actually 3 now) because it's so easy to mod for the arduino auto-reset function. Just solder a .1 cap from the DTR hole pad to the base of the RST connector pin, turn the board over and cut the trace that was going to the RST pin, and you gain arduino auto-reset.

I bought a USBtiny programmer kit for $19 about two years ago, works great with the arduino IDE or standalone with AVRDUDE, so I know about 'bootloaderless' arduino possibilities. It's great having the flexibility and choices that the arduino platform allows. It's a real testament to it's open source roots.

Lefty

The pinout is easy to change with an adapter cable - and some even ship with 5 single female-female terminated wires to do that.

I think having some of these handy is very worthwhile - especially for putting together a permanent adapter to plug onto something, the ICSP header for example:

http://www.ebay.com/itm/USBASP-ISP-Download-Programmer-Adapter-51-AVR-MCU-/150657060031?pt=LH_DefaultDomain_0&hash=item2313dc4cbf

Why does the one on the left have a Sony logo?

That one installs a root kit onto your PC, at no extra charge. :wink:

XD

Just solder a .1 cap from the DTR hole pad to the base of the RST connector pin, turn the board over and cut the trace that was going to the RST pin, and you gain arduino auto-reset.

Just checking (as I'm a newbie) - are you saying one of these
http://www.ebay.com/itm/370532286388?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
plus quick modification and home-made pinout adaptor and you've got yourself a cheap FTDI setup to program chips with bootloader?

Simon

I think it is harder to brick a chip by using bootloader from my experience

simplesi:

Just solder a .1 cap from the DTR hole pad to the base of the RST connector pin, turn the board over and cut the trace that was going to the RST pin, and you gain arduino auto-reset.

Just checking (as I'm a newbie) - are you saying one of these
http://www.ebay.com/itm/370532286388?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
plus quick modification and home-made pinout adaptor and you've got yourself a cheap FTDI setup to program chips with bootloader?

Simon

Yes, I have tested that and it works fine. Of course the serial cable does not use the FTDI chip so a different USB driver will be required when you first plug it into your PC. I think my XP found a driver automatically but drivers for the chip used are easy to fine.

Lefty

Windows Vista SP2 found the CP2102 driver & downloaded(?)/installed it all by itself when I connected that module.

Lefty,
Adding a cap isn't needed if the board has one already, is it?