Which bootloader should I use?

61 views
Skip to first unread message

László Monda

unread,
Apr 1, 2011, 6:30:43 PM4/1/11
to lufa-s...@googlegroups.com
Hi guys,

I've just noticed that there are three different bootloaders in the
LUFA SVN, namely CDC, DFU and HID.

We're builing a product with an open source firmware and I wanna make
our customers able to hack and upgrade the firmware easily if they
want to. On a related note, I'm interested about the best bootloader
for our purposes regarding being able to upgrade the firmware easily
in a cross-platform way. So I guess my question boils down to which
is the best bootloader that has the best tools on Linux, Mac and
Windows to upgrade the firmware.

What's the situation about these three bootloaders regarding my
question? I'm only used DFU with Linux so far.

Thanks in advance!

--
László Monda <http://monda.hu>

Opendous

unread,
Apr 2, 2011, 1:55:20 PM4/2/11
to LUFA Library Support List
Use the CDC Bootloader. It works with AVRdude which is already cross-
platform.

On Windows you will need to install drivers whether you use CDC or
DFU.

DFU is only useful to developers who plan on using Atmel's parts in a
custom board and want to test their production abilities.

LadyAda uses the CDC, for example.
http://ladyada.net/products/atmega32u4breakout/
http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=296

László Monda

unread,
Apr 3, 2011, 2:36:32 PM4/3/11
to lufa-s...@googlegroups.com, Opendous
On Sat, Apr 2, 2011 at 7:55 PM, Opendous <opendous...@gmail.com> wrote:
> Use the CDC Bootloader.  It works with AVRdude which is already cross-
> platform.

Having a single application on all platform to program the MCU is a
definitive advantage. I'm sold.

> On Windows you will need to install drivers whether you use CDC or
> DFU.

Ok, I was pretty much aware about that.

> DFU is only useful to developers who plan on using Atmel's parts in a
> custom board and want to test their production abilities.

Why DFU is only or mainly useful in the above situation?

> LadyAda uses the CDC, for example.
> http://ladyada.net/products/atmega32u4breakout/
> http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=296
>
> On Apr 1, 10:30 pm, László Monda <l...@monda.hu> wrote:
>> Hi guys,
>>
>> I've just noticed that there are three different bootloaders in the
>> LUFA SVN, namely CDC, DFU and HID.
>>
>> We're builing a product with an open source firmware and I wanna make
>> our customers able to hack and upgrade the firmware easily if they
>> want to.  On a related note, I'm interested about the best bootloader
>> for our purposes regarding being able to upgrade the firmware easily
>> in a cross-platform way.  So I guess my question boils down to which
>> is the best bootloader that has the best tools on Linux, Mac and
>> Windows to upgrade the firmware.
>>
>> What's the situation about these three bootloaders regarding my
>> question?  I'm only used DFU with Linux so far.
>>
>> Thanks in advance!
>>
>> --
>> László Monda <http://monda.hu>
>

> --
> You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
> To post to this group, send email to lufa-s...@googlegroups.com.
> To unsubscribe from this group, send email to lufa-support...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lufa-support?hl=en.

Opendous

unread,
Apr 3, 2011, 6:04:27 PM4/3/11
to LUFA Library Support List
>>DFU is only useful to developers who plan on using Atmel's parts
>>in a custom board and want to test their production abilities.
>
>Why DFU is only or mainly useful in the above situation?

I chose my words poorly. CDC is useful as avr-dude comes pre-
installed with all the GCC toolchains. HID is useful as it does not
require any drivers under Windows but needs additional software. DFU
is problematic as it requires both additional software and Windows'
drivers.

However, if you plan on manufacturing boards based on the USB AVRs
your manufacturing process will likely deal with the DFU Bootloader
(or ISP/JTAG). Atmel's FLIP includes batchisp.exe specifically to
program large batches of USB AVRs through DFU and include things like
serial numbers. This is the main usefulness of using the DFU
Bootloader on your boards.

On Apr 3, 6:36 pm, László Monda <l...@monda.hu> wrote:
> On Sat, Apr 2, 2011 at 7:55 PM, Opendous <opendous.supp...@gmail.com> wrote:
> > Use the CDC Bootloader.  It works with AVRdude which is already cross-
> > platform.
>
> Having a single application on all platform to program the MCU is a
> definitive advantage.  I'm sold.
>
> > On Windows you will need to install drivers whether you use CDC or
> > DFU.
>
> Ok, I was pretty much aware about that.
>
> > DFU is only useful to developers who plan on using Atmel's parts in a
> > custom board and want to test their production abilities.
>
> Why DFU is only or mainly useful in the above situation?
>
>
>
> > LadyAda uses the CDC, for example.
> >http://ladyada.net/products/atmega32u4breakout/
> >http://www.adafruit.com/index.php?main_page=product_info&cPath=16&pro...
>
> > On Apr 1, 10:30 pm, László Monda <l...@monda.hu> wrote:
> >> Hi guys,
>
> >> I've just noticed that there are three different bootloaders in the
> >> LUFA SVN, namely CDC, DFU and HID.
>
> >> We're builing a product with an open source firmware and I wanna make
> >> our customers able to hack and upgrade the firmware easily if they
> >> want to.  On a related note, I'm interested about the best bootloader
> >> for our purposes regarding being able to upgrade the firmware easily
> >> in a cross-platform way.  So I guess my question boils down to which
> >> is the best bootloader that has the best tools on Linux, Mac and
> >> Windows to upgrade the firmware.
>
> >> What's the situation about these three bootloaders regarding my
> >> question?  I'm only used DFU with Linux so far.
>
> >> Thanks in advance!
>
> >> --
> >> László Monda <http://monda.hu>
>
> > --
> > You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
> > To post to this group, send email to lufa-s...@googlegroups.com.
> > To unsubscribe from this group, send email to lufa-support...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/lufa-support?hl=en.

Dean Camera

unread,
Apr 3, 2011, 7:08:12 PM4/3/11
to LUFA Library Support List
There's three bootloaders in the SVN at the moment as you've seen. A
quick overview:

1) CDC (Virtual Serial). Fits into 4KB of space, and implements the
AVR109 bootloader protocol. This requires a driver INF file on
Windows, but works out of the box on other platforms. It's compatible
with any AVR109 host software, which means the cross-platform AVRDude,
any custom loaders you find and (theoretically, at least) Atmel's
AVROSP software.

2) DFU. Fits into 4KB of space, and requires dfu-programmer on Linux
or Atmel FLIP on Windows. This gives Windows users a nice GUI, but
requires a custom Windows driver from Atmel - other platforms are
command line only. It's also the most "proper" way of doing bootloader
updates, since it reports as the standard DFU class for Device
Firmware Updates, although in practise this means bunk all.

3) HID. Fits into 2KB of space IIRC for the smaller U2 parts, but is
just over that on the larger chips, so is a good choice if you need
all the flash space you can get. This does not support EEPROM
programming, but doesn't require custom drivers on any platform. It
*does* however require custom host software. This is new, and is based
on a modified version of Paul's PJRC Teensy loader software (I've
cloned the protocol and modified the published loader software).
Previously I had this compatible with Paul's GUI software, but this
was yanked at Paul's request. It's back in now on the provisio that
it's made compatible with the modified open source command line
programmer only, but I'm still working out if this will make it into
the next release or not.

Cheers!
- Dean

Michael Stephens

unread,
Apr 3, 2011, 7:31:59 PM4/3/11
to lufa-s...@googlegroups.com
A 2KB loader would be sweet for the 8U2's. I barely got anything useful on mine before I was out of RAM. I really like the HID as well.


Michael Stephens




László Monda

unread,
Apr 8, 2011, 4:26:15 PM4/8/11
to lufa-s...@googlegroups.com, Dean Camera
Thanks for elaborating on that, Dean.

I'll stick with CDC. It seems mature and using a single application
for it on all platfrom seems very appealing.

> --
> You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
> To post to this group, send email to lufa-s...@googlegroups.com.
> To unsubscribe from this group, send email to lufa-support...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lufa-support?hl=en.
>
>

--
László Monda <http://monda.hu>

László Monda

unread,
May 26, 2011, 6:48:53 PM5/26/11
to lufa-s...@googlegroups.com
Dean,

You've made a nice summary here about the bootloaders and I have a
relevant suggestion.

It's pretty hard for starters to understand many things about
bootloaders. They have search around on the web for lots of
information. What I'm about to suggest is to include some very useful
information about each of the bootloaders, such as:

* Origin and history
* Notes about the protocol
* Usage
* Programmers and their related arguments for Linux, Windows and
Macintosh (such as avrdude and dfu-programmer)
* Relevant links

Providing all that information in the LUFA docs themselves would make
it tremendously easier for starters to figure out which of protocols
they prefer and to be able to use them right off the bat.

I can probably compile this list myself and hand it over to you, so
let me know if you want me to do this, but you could probably do an
even better job.

Please let me know what you think.

Dean Camera

unread,
Jun 2, 2011, 9:47:36 AM6/2/11
to LUFA Library Support List
László,

That's a very good idea. I've added a bit more information to the
documentation of each bootloader, but I'm currently hopped up on Cold
medicine (it's Winter here, so time for me to get sick again) and so
didn't feel like writing all that much. If you have some better text
to add, I'd be happy to add it in.

Cheers!
- Dean
> > On Mon, Apr 4, 2011 at 1:08 AM, Dean Camera <abcminiu...@gmail.com> wrote:
> >> There's three bootloaders in the SVN at the moment as you've seen. A
> >> quick overview:
>
> >>  1) CDC (Virtual Serial). Fits into 4KB of space, and implements the
> >> AVR109bootloaderprotocol. This requires a driver INF file on
> >>> is the bestbootloaderthat has the best tools on Linux, Mac and
> >>> Windows to upgrade the firmware.
>
> >>> What's the situation about these three bootloaders regarding my
> >>> question?  I'm only used DFU with Linux so far.
>
> >>> Thanks in advance!
>
> >>> --
> >>> László Monda <http://monda.hu>
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
> >> To post to this group, send email to lufa-s...@googlegroups.com.
> >> To unsubscribe from this group, send email to lufa-support...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/lufa-support?hl=en.

László Monda

unread,
Jun 3, 2011, 3:51:05 PM6/3/11
to lufa-s...@googlegroups.com
Dean,

Thanks a lot for adding the documentation. I've just read the
relevant changeset and what you wrote it's so much better than I could
ever write.

Well done!

> For more options, visit this group at http://groups.google.com/group/lufa-support?hl=en.

Dean Camera

unread,
Jun 4, 2011, 1:09:00 AM6/4/11
to LUFA Library Support List
László,

I realise it's a bit sparse (needs more information on each
programmer, usage, etc.) but at least will help people out with the
initial bootloader setup. Hopefully in the future I'll find additional
time to polish it up a bit more.

Cheers!
- Dean

On Jun 4, 5:51 am, László Monda <l...@monda.hu> wrote:
> Dean,
>
Reply all
Reply to author
Forward
0 new messages